Add handler for configuration w/o sec groups
If security groups was disabled in Neutron Sahara failed with 500 Error Code related to Neutron. Now we have handle this error simply returning empty list to Sahara if security groups is disabled. Closes-Bug: 1433017 Change-Id: I9cd25782b73be95ff74a5298eb209d95fd5f6ff6
This commit is contained in:
parent
882328204c
commit
bde7898d09
@ -170,12 +170,12 @@ def _get_neutron_limits():
|
||||
len(usage_fip))
|
||||
|
||||
usage_sg = neutron.list_security_groups(
|
||||
tenant_id=tenant_id)['security_groups']
|
||||
tenant_id=tenant_id).get('security_groups', [])
|
||||
limits['security_groups'] = _sub_limit(total_lim['security_group'],
|
||||
len(usage_sg))
|
||||
|
||||
usage_sg_rules = (neutron.list_security_group_rules(
|
||||
tenant_id=tenant_id)['security_group_rules'])
|
||||
usage_sg_rules = neutron.list_security_group_rules(
|
||||
tenant_id=tenant_id).get('security_group_rules', [])
|
||||
limits['security_group_rules'] = _sub_limit(
|
||||
total_lim['security_group_rule'], len(usage_sg_rules))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user