The issue is in the extend_list of ListSecurityGroupRule class which is always assuming that
the data includes security_group_id and remote_group_id fields, which may not be the case when
we filter on other fields.
neutron --debug security-group-rule-list -F direction
...
ERROR: neutronclient.shell 'remote_group_id'
Traceback (most recent call last):
File "/opt/stack/python-neutronclient/neutronclient/shell.py", line 692, in run_subcommand
return run_command(cmd, cmd_parser, sub_argv)
File "/opt/stack/python-neutronclient/neutronclient/shell.py", line 91, in run_command
return cmd.run(known_args)
File "/opt/stack/python-neutronclient/neutronclient/common/command.py", line 29, in run
return super(OpenStackCommand, self).run(parsed_args)
File "/usr/local/lib/python2.7/dist-packages/cliff/display.py", line 91, in run
column_names, data = self.take_action(parsed_args)
File "/opt/stack/python-neutronclient/neutronclient/common/command.py", line 35, in take_action
return self.get_data(parsed_args)
File "/opt/stack/python-neutronclient/neutronclient/neutron/v2_0/__init__.py", line 670, in get_data
self.extend_list(data, parsed_args)
File "/opt/stack/python-neutronclient/neutronclient/neutron/v2_0/securitygroup.py", line 137, in extend_list
sec_group_ids.add(rule[key])
KeyError: 'remote_group_id'
'remote_group_id'
The issue is in the extend_list of ListSecurityGro upRule class which is always assuming that
the data includes security_group_id and remote_group_id fields, which may not be the case when
we filter on other fields.
neutron --debug security- group-rule- list -F direction
...
RESP BODY: {"security_ group_rules" : [{"direction": "egress"}, {"direction": "ingress"}, {"direction": "ingress"}, {"direction": "egress"}]}
ERROR: neutronclient.shell 'remote_group_id' python- neutronclient/ neutronclient/ shell.py" , line 692, in run_subcommand python- neutronclient/ neutronclient/ shell.py" , line 91, in run_command python- neutronclient/ neutronclient/ common/ command. py", line 29, in run Command, self).run( parsed_ args) lib/python2. 7/dist- packages/ cliff/display. py", line 91, in run action( parsed_ args) python- neutronclient/ neutronclient/ common/ command. py", line 35, in take_action data(parsed_ args) python- neutronclient/ neutronclient/ neutron/ v2_0/__ init__. py", line 670, in get_data extend_ list(data, parsed_args) python- neutronclient/ neutronclient/ neutron/ v2_0/securitygr oup.py" , line 137, in extend_list group_ids. add(rule[ key])
Traceback (most recent call last):
File "/opt/stack/
return run_command(cmd, cmd_parser, sub_argv)
File "/opt/stack/
return cmd.run(known_args)
File "/opt/stack/
return super(OpenStack
File "/usr/local/
column_names, data = self.take_
File "/opt/stack/
return self.get_
File "/opt/stack/
self.
File "/opt/stack/
sec_
KeyError: 'remote_group_id'
'remote_group_id'