Skip to content

Commit

Permalink
Catch PermissionDenied exception on security_group_update so that we …
Browse files Browse the repository at this point in the history
…can return proper error when sg rule quota is exceeded.

Change-Id: I1ebfe45a50521653ec92f115e12b692cc554dec4
Closes-Bug: 1365463
  • Loading branch information
Sachin Bansal committed Oct 16, 2014
1 parent 8dadd77 commit ee83a14
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/config/vnc_openstack/vnc_openstack/neutron_plugin_db.py
Expand Up @@ -237,7 +237,11 @@ def _security_group_rule_create(self, sg_id, sg_rule):
rules.add_policy_rule(sg_rule)

sg_vnc.set_security_group_entries(rules)
self._vnc_lib.security_group_update(sg_vnc)
try:
self._vnc_lib.security_group_update(sg_vnc)
except PermissionDenied as e:
self._raise_contrail_exception('BadRequest',
resource='security_group_rule', msg=str(e))
return
#end _security_group_rule_create

Expand Down

0 comments on commit ee83a14

Please sign in to comment.