Repository: cloudstack Updated Branches: refs/heads/master 15a3bb318 -> f5ff78947
CLOUDSTACK-7441: Fixed template registration issue in test_resource_limits.py Signed-off-by: SrikanteswaraRao Talluri <tall...@apache.org> Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/f5ff7894 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/f5ff7894 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/f5ff7894 Branch: refs/heads/master Commit: f5ff78947e81b6929ba1223abd84906793d38ece Parents: 15a3bb3 Author: Gaurav Aradhye <gaurav.arad...@clogeny.com> Authored: Thu Sep 11 14:55:40 2014 +0530 Committer: SrikanteswaraRao Talluri <tall...@apache.org> Committed: Tue Sep 16 11:22:18 2014 +0530 ---------------------------------------------------------------------- test/integration/component/test_resource_limits.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f5ff7894/test/integration/component/test_resource_limits.py ---------------------------------------------------------------------- diff --git a/test/integration/component/test_resource_limits.py b/test/integration/component/test_resource_limits.py index 35128b4..f7fecb0 100644 --- a/test/integration/component/test_resource_limits.py +++ b/test/integration/component/test_resource_limits.py @@ -1270,6 +1270,10 @@ class TestResourceLimitsDomain(cloudstackTestCase): # appropriate error and an alert should be generated. try: + userapiclient = self.testClient.getUserApiClient( + UserName=self.account.name, + DomainName=self.account.domain) + # Set usage_vm=1 for Account 1 update_resource_limit( self.apiclient, @@ -1286,7 +1290,7 @@ class TestResourceLimitsDomain(cloudstackTestCase): max=2 ) virtual_machine_1 = VirtualMachine.create( - self.apiclient, + userapiclient, self.services["server"], templateid=self.template.id, accountid=self.account.name, @@ -1300,10 +1304,10 @@ class TestResourceLimitsDomain(cloudstackTestCase): 'Running', "Check VM state is Running or not" ) - virtual_machine_1.stop(self.apiclient) + virtual_machine_1.stop(userapiclient) # Get the Root disk of VM volumes = list_volumes( - self.apiclient, + userapiclient, virtualmachineid=virtual_machine_1.id, type='ROOT', listall=True @@ -1318,7 +1322,7 @@ class TestResourceLimitsDomain(cloudstackTestCase): self.debug("Creating template from volume: %s" % volume.id) # Create a template from the ROOTDISK template_1 = Template.create( - self.apiclient, + userapiclient, self.services["template"], volumeid=volume.id, account=self.account.name, @@ -1335,7 +1339,7 @@ class TestResourceLimitsDomain(cloudstackTestCase): self.debug("Creating template from volume: %s" % volume.id) # Create a template from the ROOTDISK template_2 = Template.create( - self.apiclient, + userapiclient, self.services["template"], volumeid=volume.id, account=self.account.name, @@ -1355,7 +1359,7 @@ class TestResourceLimitsDomain(cloudstackTestCase): # Exception should be raised for second template with self.assertRaises(Exception): Template.create( - self.apiclient, + userapiclient, self.services["template"], volumeid=volume.id, account=self.account.name,