Skip to content

Commit 2218053

Browse files
Gaurav AradhyeAbhinandan Prateek
authored andcommitted
Fixed issues in regression suite project cpu limits
Signed-off-by: Abhinandan Prateek <aprateek@apache.org>
1 parent a0ad836 commit 2218053

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

test/integration/component/test_cpu_project_limits.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,8 @@ def createInstance(self, project, service_off, networks=None, api_client=None):
172172
projectid=project.id,
173173
networkids=networks,
174174
serviceofferingid=service_off.id)
175-
vms = VirtualMachine.list(api_client, id=self.vm.id, listall=True)
175+
vms = VirtualMachine.list(api_client, projectid=project.id,
176+
id=self.vm.id, listall=True)
176177
self.assertIsInstance(vms,
177178
list,
178179
"List VMs should return a valid response")

tools/marvin/marvin/lib/base.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,11 @@ def getState(self, apiclient, state, timeout=600):
572572

573573
while timeout>0:
574574
try:
575-
vms = VirtualMachine.list(apiclient, id=self.id, listAll=True)
575+
projectid = None
576+
if hasattr(self, "projectid"):
577+
projectid = self.projectid
578+
vms = VirtualMachine.list(apiclient, projectid=projectid,
579+
id=self.id, listAll=True)
576580
validationresult = validateList(vms)
577581
if validationresult[0] == FAIL:
578582
raise Exception("VM list validation failed: %s" % validationresult[2])

0 commit comments

Comments
 (0)