summaryrefslogtreecommitdiff
path: root/openstackclient/network
diff options
context:
space:
mode:
authorSam Morrison <sorrison@gmail.com>2020-02-25 12:52:01 +1100
committerSam Morrison <sorrison@gmail.com>2020-03-05 09:04:59 +1100
commite410e61d204d09eeb7bcf0a33e3858ef7b110dd3 (patch)
tree13f8dadaa6663700c20018b55013164b517b2d1e /openstackclient/network
parente07324e30fbb24e89fd63d1c5a5fe485f693a45c (diff)
downloadpython-openstackclient-e410e61d204d09eeb7bcf0a33e3858ef7b110dd3.tar.gz
Always display direction for security group rules
The --long option is still accepted but is now ignored. Change-Id: I23dd9fa7cff310ee9a62ce32b843b822b93b7548 Story: #2007323
Diffstat (limited to 'openstackclient/network')
-rw-r--r--openstackclient/network/v2/security_group_rule.py17
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 f48478ea..150de166 100644
--- a/openstackclient/network/v2/security_group_rule.py
+++ b/openstackclient/network/v2/security_group_rule.py
@@ -480,7 +480,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
@@ -510,15 +510,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',
@@ -526,10 +530,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 = {}