Skip to content

Commit

Permalink
Fixing two issues:
Browse files Browse the repository at this point in the history
1. If quota is not initialized in api server, while updating quota, we will get None. We need to handle this case.
2. Fixed a typo.

Change-Id: Ic9b92792ace6d7e07895ae6dff2a01a34247e87a
Closes-Bug: 1378077
  • Loading branch information
Sachin Bansal committed Oct 6, 2014
1 parent cb5251d commit 5f6adfb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions neutron_plugin_contrail/plugins/opencontrail/quota/driver.py
Expand Up @@ -137,7 +137,7 @@ def get_all_quotas(cls, context, resources):
for project in project_list:
if default_quota and (project['uuid'] == default_project.uuid):
continue
quotas = cls._get_tenant_quotas(context, resources, project['uuid'].
quotas = cls._get_tenant_quotas(context, resources, project['uuid'],
default_quota)
quotas['tenant_id'] = project['uuid']
ret_list.append(quotas)
Expand Down Expand Up @@ -166,7 +166,7 @@ def update_quota_limit(cls, context, tenant_id, resource, limit):
try:
proj_id = str(uuid.UUID(tenant_id))
proj_obj = cls._get_vnc_conn().project_read(id=proj_id)
quota = proj_obj.get_quota()
quota = proj_obj.get_quota() or vnc_api.QuotaType()
except vnc_exc.NoIdError:
return
except Exception as e:
Expand Down

0 comments on commit 5f6adfb

Please sign in to comment.