You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ta...@apache.org on 2014/11/25 14:19:05 UTC

git commit: updated refs/heads/master to 30a2ade

Repository: cloudstack
Updated Branches:
  refs/heads/master 6eb4a40af -> 30a2ade17


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

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


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

Branch: refs/heads/master
Commit: 30a2ade17ac3bcdfe26351d0c86f28194c381b7a
Parents: 6eb4a40
Author: Ashutosh K <as...@clogeny.com>
Authored: Wed Nov 19 17:20:57 2014 +0530
Committer: SrikanteswaraRao Talluri <ta...@apache.org>
Committed: Tue Nov 25 18:48:53 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/30a2ade1/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