list_security_group_rules missing support for optional security_group_id parameter
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-neutronclient |
Fix Released
|
Undecided
|
Sridhar Gaddam |
Bug Description
The API specifies that an optional security-group-id can be passed to /v2.0/security-
http://
GET /v2.0/security-
Accept: application/json
{
"security_
"id": "3c0e45ff-
"protocol": null,
}
}
This feature is not supported in the current client:
https:/
summary: |
- ist_security_group_rules missing support for optional security_group_id + list_security_group_rules missing support for optional security_group_id tag |
summary: |
list_security_group_rules missing support for optional security_group_id - tag + parameter |
Changed in python-neutronclient: | |
assignee: | nobody → Sridhar Gaddam (sridhargaddam) |
Changed in python-neutronclient: | |
status: | New → In Progress |
Changed in python-neutronclient: | |
milestone: | none → 2.3.11 |
status: | Fix Committed → Fix Released |
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'