Repository: cloudstack
Updated Branches:
  refs/heads/4.5 a1e7feead -> aa1e26081


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

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

Branch: refs/heads/4.5
Commit: b9fed951ef6498c828f07ab120a242fcf15e14f6
Parents: a1e7fee
Author: Gaurav Aradhye <gaurav.arad...@clogeny.com>
Authored: Wed Oct 8 11:25:15 2014 +0530
Committer: SrikanteswaraRao Talluri <tall...@apache.org>
Committed: Thu Oct 30 15:28:39 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/b9fed951/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

Reply via email to