Skip to content

Commit

Permalink
Merge "Catch PermissionDenied exception on security_group_update so t…
Browse files Browse the repository at this point in the history
…hat we can return proper error when sg rule quota is exceeded." into R1.10
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Oct 16, 2014
2 parents e72eb5c + 1f95504 commit 05bfe8c
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
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,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:
exc_info = {'type': 'BadRequest', 'message': str(e)}
bottle.abort(400, json.dumps(exc_info))
return
#end _security_group_rule_create

Expand Down

0 comments on commit 05bfe8c

Please sign in to comment.