Skip to content

Commit

Permalink
match the project name too to get uuid, else in multiproject cases it…
Browse files Browse the repository at this point in the history
… gets uuid of wrong project

Change-Id: I10327d75bdb98aa130b83c5e7b45f4a244234537
  • Loading branch information
alokkumar223 committed Dec 4, 2015
1 parent e4053cf commit b88281e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fixtures/ipam_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def create(self):
self.name = str(self.fq_name[2])

for ipam in self.vnc.network_ipams_list()['network-ipams']:
if self.name in ipam['fq_name'] and self.project_name in ipam['fq_name']:
if self.name == ipam['fq_name'][2] and self.project_name == ipam['fq_name'][1]:
self.fq_name = ipam['fq_name']
self.already_present = True
self.ipam_id = ipam['uuid']
Expand All @@ -83,7 +83,7 @@ def create(self):
else:
self.vnc.network_ipam_create(self.obj)
for ipam in self.vnc.network_ipams_list()['network-ipams']:
if self.name in ipam['fq_name']:
if self.name == ipam['fq_name'][2] and self.project_name == ipam['fq_name'][1]:
self.fq_name = ipam['fq_name']
self.ipam_id = ipam['uuid']
break
Expand Down

0 comments on commit b88281e

Please sign in to comment.