Fixed issues in regression suite project cpu limits Signed-off-by: Abhinandan Prateek <aprat...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/c3c80964 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c3c80964 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c3c80964 Branch: refs/heads/4.4-forward Commit: c3c809647667229c4e46096a85dbbf75eec4d005 Parents: 7dc0fca Author: Gaurav Aradhye <gaurav.arad...@clogeny.com> Authored: Wed May 21 03:56:42 2014 -0700 Committer: Abhinandan Prateek <aprat...@apache.org> Committed: Mon May 26 10:47:13 2014 +0530 ---------------------------------------------------------------------- test/integration/component/test_cpu_project_limits.py | 3 ++- tools/marvin/marvin/lib/base.py | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c3c80964/test/integration/component/test_cpu_project_limits.py ---------------------------------------------------------------------- diff --git a/test/integration/component/test_cpu_project_limits.py b/test/integration/component/test_cpu_project_limits.py index b33b9f1..e795828 100644 --- a/test/integration/component/test_cpu_project_limits.py +++ b/test/integration/component/test_cpu_project_limits.py @@ -172,7 +172,8 @@ class TestProjectsCPULimits(cloudstackTestCase): projectid=project.id, networkids=networks, serviceofferingid=service_off.id) - vms = VirtualMachine.list(api_client, id=self.vm.id, listall=True) + vms = VirtualMachine.list(api_client, projectid=project.id, + id=self.vm.id, listall=True) self.assertIsInstance(vms, list, "List VMs should return a valid response") http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c3c80964/tools/marvin/marvin/lib/base.py ---------------------------------------------------------------------- diff --git a/tools/marvin/marvin/lib/base.py b/tools/marvin/marvin/lib/base.py index e5e558e..83233dd 100644 --- a/tools/marvin/marvin/lib/base.py +++ b/tools/marvin/marvin/lib/base.py @@ -578,7 +578,11 @@ class VirtualMachine: while timeout>0: try: - vms = VirtualMachine.list(apiclient, id=self.id, listAll=True) + projectid = None + if hasattr(self, "projectid"): + projectid = self.projectid + vms = VirtualMachine.list(apiclient, projectid=projectid, + id=self.id, listAll=True) validationresult = validateList(vms) if validationresult[0] == FAIL: raise Exception("VM list validation failed: %s" % validationresult[2])