Merge "Fix a column name "protocol/port" to "port/protocol""
This commit is contained in:
@@ -167,15 +167,20 @@ class ListSecurityGroupRule(neutronV20.ListCommand):
|
||||
|
||||
resource = 'security_group_rule'
|
||||
list_columns = ['id', 'security_group_id', 'direction',
|
||||
'ethertype', 'protocol/port', 'remote']
|
||||
'ethertype', 'port/protocol', 'remote']
|
||||
# replace_rules: key is an attribute name in Neutron API and
|
||||
# corresponding value is a display name shown by CLI.
|
||||
replace_rules = {'security_group_id': 'security_group',
|
||||
'remote_group_id': 'remote_group'}
|
||||
digest_fields = {
|
||||
# The entry 'protocol/port' is leaving deliberetely for keep
|
||||
# compatibility,
|
||||
'remote': {
|
||||
'method': _get_remote,
|
||||
'depends_on': ['remote_ip_prefix', 'remote_group_id']},
|
||||
'port/protocol': {
|
||||
'method': _get_protocol_port,
|
||||
'depends_on': ['protocol', 'port_range_min', 'port_range_max']},
|
||||
'protocol/port': {
|
||||
'method': _get_protocol_port,
|
||||
'depends_on': ['protocol', 'port_range_min', 'port_range_max']}}
|
||||
|
@@ -116,7 +116,7 @@ class SimpleReadOnlyNeutronClientTest(base.ClientTestBase):
|
||||
('security-group-rule-list'))
|
||||
self.assertTableStruct(security_grp, ['id', 'security_group',
|
||||
'direction', 'ethertype',
|
||||
'protocol/port', 'remote'])
|
||||
'port/protocol', 'remote'])
|
||||
|
||||
def test_neutron_subnet_list(self):
|
||||
subnet_list = self.parser.listing(self.neutron('subnet-list'))
|
||||
|
@@ -492,7 +492,7 @@ class CLITestV20SecurityGroupsJSON(test_cli20.CLITestV20Base):
|
||||
remote_ip_prefix='10.2.0.0/16')]
|
||||
expected = {
|
||||
'cols': ['id', 'security_group', 'direction', 'ethertype',
|
||||
'protocol/port', 'remote'],
|
||||
'port/protocol', 'remote'],
|
||||
'data': [
|
||||
('ruleid1', 'group1', 'ingress', 'IPv4', '22/tcp', 'any'),
|
||||
('ruleid2', 'group2', 'egress', 'IPv6', '80-81/udp', 'any'),
|
||||
|
Reference in New Issue
Block a user