summaryrefslogtreecommitdiff
path: root/openstackclient/network/v2
diff options
context:
space:
mode:
Diffstat (limited to 'openstackclient/network/v2')
-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 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 = {}