Skip to content

Commit

Permalink
standardize quota error message
Browse files Browse the repository at this point in the history
send overs=[resource_type] to match standard neutron
implementation of OverQuota exception

Change-Id: I4286fd3fc4c8687beb175de97d5d87ea51ea1f0c
Closes-Bug: #1590930
  • Loading branch information
sajuptpm committed Jun 20, 2016
1 parent 86366e7 commit 2ff4a03
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/config/vnc_openstack/vnc_openstack/neutron_plugin_db.py
Expand Up @@ -214,7 +214,7 @@ def _security_group_rule_create(self, sg_id, sg_rule):
resource='security_group_rule', msg=str(e))
except OverQuota as e:
self._raise_contrail_exception('OverQuota',
resource='security_group_rule', msg=str(e))
overs=['security_group_rule'], msg=str(e))
except RefsExistError as e:
try:
rule_uuid = str(e).split(':')[1].strip()
Expand Down Expand Up @@ -296,7 +296,7 @@ def _resource_create(self, resource_type, obj):
resource=resource_type, msg=str(e))
except OverQuota as e:
self._raise_contrail_exception('OverQuota',
resource=resource_type, msg=str(e))
overs=[resource_type], msg=str(e))
return obj_uuid
#end _resource_create

Expand Down Expand Up @@ -3373,7 +3373,7 @@ def floatingip_create(self, context, fip_q):
fip_uuid = self._vnc_lib.floating_ip_create(fip_obj)
except OverQuota as e:
self._raise_contrail_exception('OverQuota',
resource='floatingip', msg=str(e))
overs=['floatingip'], msg=str(e))
except Exception as e:
self._raise_contrail_exception('IpAddressGenerationFailure',
net_id=fip_q['floating_network_id'])
Expand Down

0 comments on commit 2ff4a03

Please sign in to comment.