Return-Path: X-Original-To: apmail-cloudstack-commits-archive@www.apache.org Delivered-To: apmail-cloudstack-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 37DC69933 for ; Wed, 17 Dec 2014 12:25:20 +0000 (UTC) Received: (qmail 11787 invoked by uid 500); 17 Dec 2014 12:24:39 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 11714 invoked by uid 500); 17 Dec 2014 12:24:39 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 11125 invoked by uid 99); 17 Dec 2014 12:24:38 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Dec 2014 12:24:38 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 54A4A82E2D6; Wed, 17 Dec 2014 11:59:09 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: talluri@apache.org To: commits@cloudstack.apache.org Date: Wed, 17 Dec 2014 11:59:12 -0000 Message-Id: <84de6a50a0b1450e8abbb1aa6e81af6f@git.apache.org> In-Reply-To: <2eb56bde8a9b450ca5df33c0d281fcea@git.apache.org> References: <2eb56bde8a9b450ca5df33c0d281fcea@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [4/4] git commit: updated refs/heads/4.5 to ed5bc1c CLOUDSTACK-8071: Fixed api key issue in test_snapshots_improvement.py Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/ed5bc1c7 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/ed5bc1c7 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/ed5bc1c7 Branch: refs/heads/4.5 Commit: ed5bc1c7ea1885e95c7cad0045243c7f43e9f516 Parents: 9481460 Author: Ashutosh K Authored: Mon Dec 15 15:54:51 2014 +0530 Committer: SrikanteswaraRao Talluri Committed: Wed Dec 17 17:28:53 2014 +0530 ---------------------------------------------------------------------- .../component/test_snapshots_improvement.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ed5bc1c7/test/integration/component/test_snapshots_improvement.py ---------------------------------------------------------------------- diff --git a/test/integration/component/test_snapshots_improvement.py b/test/integration/component/test_snapshots_improvement.py index 6638ddd..1fd4239 100644 --- a/test/integration/component/test_snapshots_improvement.py +++ b/test/integration/component/test_snapshots_improvement.py @@ -303,7 +303,9 @@ class TestCreateSnapshot(cloudstackTestCase): def setUpClass(cls): cls.testClient = super(TestCreateSnapshot, cls).getClsTestClient() cls.api_client = cls.testClient.getApiClient() - + cls.hypervisor = cls.testClient.getHypervisorInfo() + if cls.hypervisor.lower() in ['hyperv']: + raise unittest.SkipTest("Snapshots feature is not supported on Hyper-V") cls.services = Services().services # Get Zone, Domain and templates cls.domain = get_domain(cls.api_client) @@ -345,13 +347,17 @@ class TestCreateSnapshot(cloudstackTestCase): self.services["account"], domainid=self.domain.id ) + + self.apiclient = self.testClient.getUserApiClient( + UserName=self.account.name, + DomainName=self.account.domain) self.cleanup = [self.account, ] return def tearDown(self): try: # Clean up, terminate the created instance, volumes and snapshots - cleanup_resources(self.apiclient, self.cleanup) + cleanup_resources(self.api_client, self.cleanup) except Exception as e: raise Exception("Warning: Exception during cleanup : %s" % e) return @@ -615,13 +621,8 @@ class TestCreateSnapshot(cloudstackTestCase): self.debug("Create a template from snapshot: %s" % snapshot.name) jobs.append(self.create_Template_from_Snapshot(snapshot)) - - userapiclient = self.testClient.getUserApiClient( - UserName=self.account.name, - DomainName=self.account.domain) - # Verify IO usage by submitting the concurrent jobs - self.testClient.submitCmdsAndWait(jobs, apiclient=userapiclient) + self.testClient.submitCmdsAndWait(jobs) self.debug("Verifying if templates are created properly or not?") templates = Template.list(