Skip to content

Commit

Permalink
Avoid trace when listing SG with non-existing tenant_id
Browse files Browse the repository at this point in the history
Currently when listing SGs with tenant_id that doesn't exist
we get a stacktrace. The behaviour of neutron/ML2 is to create
a default SG for the tenant_id given even if the tenant
doesn't exist. For contrail is seems to be better to return
an empty answer is this case.

This patch remove the traceback and return nothing
when listing SGs with a non existing tenant id.

Change-Id: I5521c7630036ed28f6c87ed542204800086e50bc
Partial-Bug: #1480901
  • Loading branch information
safchain authored and opencontrail-ci-admin committed Aug 6, 2015
1 parent a2057b4 commit 529c743
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/config/vnc_openstack/vnc_openstack/neutron_plugin_db.py
Expand Up @@ -484,8 +484,8 @@ def _security_group_list_project(self, project_id):
project_uuid = str(uuid.UUID(project_id))
# Trigger a project read to ensure project sync
project_obj = self._project_read(proj_id=project_uuid)
except Exception:
raise
except vnc_exc.NoIdError:
return []
else:
project_uuid = None

Expand Down

0 comments on commit 529c743

Please sign in to comment.