cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tall...@apache.org
Subject git commit: updated refs/heads/4.5 to 7197f8c
Date Tue, 25 Nov 2014 13:18:21 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/4.5 c25b6fab1 -> 7197f8c24


CLOUDSTACK-7942: Fixing account permission issue in test_template.py

Signed-off-by: SrikanteswaraRao Talluri <talluri@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/7197f8c2
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/7197f8c2
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/7197f8c2

Branch: refs/heads/4.5
Commit: 7197f8c24a8fd661cd4fabacd564399a6e537439
Parents: c25b6fa
Author: Ashutosh K <ashutosh@clogeny.com>
Authored: Wed Nov 19 17:20:57 2014 +0530
Committer: SrikanteswaraRao Talluri <talluri@apache.org>
Committed: Tue Nov 25 18:48:08 2014 +0530

----------------------------------------------------------------------
 test/integration/component/test_templates.py | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7197f8c2/test/integration/component/test_templates.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_templates.py b/test/integration/component/test_templates.py
index 769848d..753e71a 100644
--- a/test/integration/component/test_templates.py
+++ b/test/integration/component/test_templates.py
@@ -495,8 +495,12 @@ class TestTemplates(cloudstackTestCase):
         # 4. Deploy Virtual machine using this template
         # 5. VM should be in running state
 
+        userapiclient = self.testClient.getUserApiClient(
+                                    UserName=self.account.name,
+                                    DomainName=self.account.domain)
+
         volumes = Volume.list(
-                        self.apiclient,
+                        userapiclient,
                         virtualmachineid=self.virtual_machine.id,
                         type='ROOT',
                         listall=True
@@ -506,7 +510,7 @@ class TestTemplates(cloudstackTestCase):
         self.debug("Creating a snapshot from volume: %s" % volume.id)
         #Create a snapshot of volume
         snapshot = Snapshot.create(
-                                   self.apiclient,
+                                   userapiclient,
                                    volume.id,
                                    account=self.account.name,
                                    domainid=self.account.domainid
@@ -514,14 +518,14 @@ class TestTemplates(cloudstackTestCase):
         self.debug("Creating a template from snapshot: %s" % snapshot.id)
         # Generate template from the snapshot
         template = Template.create_from_snapshot(
-                                    self.apiclient,
+                                    userapiclient,
                                     snapshot,
                                     self.services["template"]
                                     )
         self.cleanup.append(template)
         # Verify created template
         templates = Template.list(
-                                self.apiclient,
+                                userapiclient,
                                 templatefilter=\
                                 self.services["template"]["templatefilter"],
                                 id=template.id
@@ -540,7 +544,7 @@ class TestTemplates(cloudstackTestCase):
         self.debug("Deploying a VM from template: %s" % template.id)
         # Deploy new virtual machine using template
         virtual_machine = VirtualMachine.create(
-                                    self.apiclient,
+                                    userapiclient,
                                     self.services["virtual_machine"],
                                     templateid=template.id,
                                     accountid=self.account.name,
@@ -550,7 +554,7 @@ class TestTemplates(cloudstackTestCase):
         self.cleanup.append(virtual_machine)
 
         vm_response = VirtualMachine.list(
-                                        self.apiclient,
+                                        userapiclient,
                                         id=virtual_machine.id,
                                         account=self.account.name,
                                         domainid=self.account.domainid


Mime
View raw message