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/04 07:31:21 UTC

[05/11] git commit: updated refs/heads/master to 8b636bd

CLOUDSTACK-7682: Fixed usage event issue. Used api client of account for which we are checking the usage

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/88312363
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/88312363
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/88312363

Branch: refs/heads/master
Commit: 883123630c48d0246e811ba0366163fbdbc82010
Parents: 1f7ffb2
Author: Gaurav Aradhye <ga...@clogeny.com>
Authored: Wed Oct 8 11:25:15 2014 +0530
Committer: SrikanteswaraRao Talluri <ta...@apache.org>
Committed: Tue Nov 4 11:53:27 2014 +0530

----------------------------------------------------------------------
 test/integration/component/test_usage.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/88312363/test/integration/component/test_usage.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_usage.py b/test/integration/component/test_usage.py
index 81cce48..58cfbed 100644
--- a/test/integration/component/test_usage.py
+++ b/test/integration/component/test_usage.py
@@ -669,6 +669,9 @@ class TestTemplateUsage(cloudstackTestCase):
                             domainid=cls.domain.id
                             )
             cls._cleanup.append(cls.account)
+            cls.userapiclient = cls.testClient.getUserApiClient(
+                                    UserName=cls.account.name,
+                                    DomainName=cls.account.domain)
             cls.services["account"] = cls.account.name
 
             cls.service_offering = ServiceOffering.create(
@@ -742,7 +745,7 @@ class TestTemplateUsage(cloudstackTestCase):
 
         #Create template from Virtual machine and Volume ID
         self.template = Template.create(
-                                self.apiclient,
+                                self.userapiclient,
                                 self.services["templates"],
                                 self.volume.id,
                                 TestTemplateUsage.account.name,
@@ -750,7 +753,7 @@ class TestTemplateUsage(cloudstackTestCase):
                                 )
         self.debug("Created template with ID: %s" % self.template.id)
         # Delete template
-        self.template.delete(self.apiclient)
+        self.template.delete(self.userapiclient)
         self.debug("Deleted template with ID: %s" % self.template.id)
 
         # Fetch account ID from account_uuid