diff options
| author | Zuul <zuul@review.opendev.org> | 2020-10-13 23:26:24 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2020-10-13 23:26:24 +0000 |
| commit | 2eeab20eca4b51feb6e81e8e59124f2b092e9b20 (patch) | |
| tree | c95aac07e852829217a87d28b279813d71fa9804 /openstackclient/network/v2 | |
| parent | 73765da3104cfdc977a77fb30ea0623a9ba67e5d (diff) | |
| parent | e410e61d204d09eeb7bcf0a33e3858ef7b110dd3 (diff) | |
| download | python-openstackclient-2eeab20eca4b51feb6e81e8e59124f2b092e9b20.tar.gz | |
Merge "Always display direction for security group rules"
Diffstat (limited to 'openstackclient/network/v2')
| -rw-r--r-- | openstackclient/network/v2/security_group_rule.py | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/openstackclient/network/v2/security_group_rule.py b/openstackclient/network/v2/security_group_rule.py index 1fbd97ab..a7703933 100644 --- a/openstackclient/network/v2/security_group_rule.py +++ b/openstackclient/network/v2/security_group_rule.py @@ -474,7 +474,7 @@ class ListSecurityGroupRule(common.NetworkAndComputeLister): action='store_true', default=False, help=self.enhance_help_neutron( - _("List additional fields in output")) + _("**Deprecated** This argument is no longer needed")) ) return parser @@ -504,15 +504,19 @@ class ListSecurityGroupRule(common.NetworkAndComputeLister): 'Ethertype', 'IP Range', 'Port Range', + 'Direction', + 'Remote Security Group', ) - if parsed_args.long: - column_headers = column_headers + ('Direction',) - column_headers = column_headers + ('Remote Security Group',) if parsed_args.group is None: column_headers = column_headers + ('Security Group',) return column_headers def take_action_network(self, client, parsed_args): + if parsed_args.long: + self.log.warning(_( + "The --long option has been deprecated and is no longer needed" + )) + column_headers = self._get_column_headers(parsed_args) columns = ( 'id', @@ -520,10 +524,9 @@ class ListSecurityGroupRule(common.NetworkAndComputeLister): 'ether_type', 'remote_ip_prefix', 'port_range', + 'direction', + 'remote_group_id', ) - if parsed_args.long: - columns = columns + ('direction',) - columns = columns + ('remote_group_id',) # Get the security group rules using the requested query. query = {} |
