Comment 1 for bug 1359230

Revision history for this message
Sridhar Gaddam (sridhargaddam) wrote :

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
...

RESP BODY: {"security_group_rules": [{"direction": "egress"}, {"direction": "ingress"}, {"direction": "ingress"}, {"direction": "egress"}]}

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'