summaryrefslogtreecommitdiff
path: root/neutronclient/neutron/v2_0/securitygroup.py
diff options
context:
space:
mode:
authorwatanabe.isao <zou.yun@jp.fujitsu.com>2015-01-27 09:37:20 +0900
committerwatanabe.isao <zou.yun@jp.fujitsu.com>2015-01-29 17:24:43 +0900
commit59d7564202c9a5acd57f23a2708291d1d1cb6a54 (patch)
tree51b7edaf73132a93d6647f27c6413a94ba96fa1e /neutronclient/neutron/v2_0/securitygroup.py
parent3e41128580bdf212a6680508fd9bc6104cdcce35 (diff)
downloadpython-neutronclient-59d7564202c9a5acd57f23a2708291d1d1cb6a54.tar.gz
Skip None id when getting security_group_ids
When getting security_group_ids in securitygroup.py, a None id is included into the list due to the remote group id is Null when the security group rule direction is egress. And this causes the calculation of the number of chunk_size is 1 more than the number it should be. Then the request page size excess the MAX request page size Then the RequestURITooLong exception happens again, and finally the commend fails. Co-Authored-By: Furukawa, Yushiro <y.furukawa_2@jp.fujitsu.com> Change-Id: Ib671cf3ddc6827793c4a86d2d3c8a34957f5dfd3 Related-Bug: 1271462 Closes-Bug: 1415692
Diffstat (limited to 'neutronclient/neutron/v2_0/securitygroup.py')
-rw-r--r--neutronclient/neutron/v2_0/securitygroup.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/neutronclient/neutron/v2_0/securitygroup.py b/neutronclient/neutron/v2_0/securitygroup.py
index 7f27eac..6bfd80d 100644
--- a/neutronclient/neutron/v2_0/securitygroup.py
+++ b/neutronclient/neutron/v2_0/securitygroup.py
@@ -134,7 +134,7 @@ class ListSecurityGroupRule(neutronV20.ListCommand):
sec_group_ids = set()
for rule in data:
for key in self.replace_rules:
- if key in rule:
+ if rule.get(key):
sec_group_ids.add(rule[key])
sec_group_ids = list(sec_group_ids)