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 B646F102C2 for ; Tue, 31 Dec 2013 06:06:43 +0000 (UTC) Received: (qmail 26100 invoked by uid 500); 31 Dec 2013 06:05:33 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 26072 invoked by uid 500); 31 Dec 2013 06:05:26 -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 25960 invoked by uid 99); 31 Dec 2013 06:04:48 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 31 Dec 2013 06:04:48 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id C642090C6B1; Tue, 31 Dec 2013 06:04:47 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: girish@apache.org To: commits@cloudstack.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: git commit: updated refs/heads/master to 6c9b517 Date: Tue, 31 Dec 2013 06:04:47 +0000 (UTC) Updated Branches: refs/heads/master 14241ce23 -> 6c9b51792 CLOUDSTACK-5637: Detach volume before migrating Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/6c9b5179 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/6c9b5179 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/6c9b5179 Branch: refs/heads/master Commit: 6c9b517929b0be7a44eae830b9b7b6823850c638 Parents: 14241ce Author: Girish Shilamkar Authored: Tue Dec 31 11:34:16 2013 +0530 Committer: Girish Shilamkar Committed: Tue Dec 31 11:34:16 2013 +0530 ---------------------------------------------------------------------- test/integration/component/test_stopped_vm.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c9b5179/test/integration/component/test_stopped_vm.py ---------------------------------------------------------------------- diff --git a/test/integration/component/test_stopped_vm.py b/test/integration/component/test_stopped_vm.py index 4ba94bf..e8a90b7 100644 --- a/test/integration/component/test_stopped_vm.py +++ b/test/integration/component/test_stopped_vm.py @@ -22,6 +22,7 @@ import marvin from nose.plugins.attrib import attr from marvin.cloudstackTestCase import * from marvin.cloudstackAPI import * +from marvin.sshClient import SshClient from marvin.integration.lib.utils import * from marvin.integration.lib.base import * from marvin.integration.lib.common import * @@ -890,6 +891,8 @@ class TestDeployVM(cloudstackTestCase): "Running", "VM should be in Running state after deployment" ) + + self.debug("Stopping instance: %s" % self.virtual_machine.name) self.virtual_machine.stop(self.apiclient) self.debug("Instance is stopped!") @@ -938,6 +941,11 @@ class TestDeployVM(cloudstackTestCase): self.storage_id = spool.id self.storage_name = spool.name break + + self.debug("Detaching volume %s from vm %s" % (vol_response.id, self.virtual_machine.id)) + + self.virtual_machine.detach_volume(self.apiclient, vol_response) + self.debug("Migrating volume to storage pool: %s" % self.storage_name) Volume.migrate( self.apiclient, @@ -946,14 +954,14 @@ class TestDeployVM(cloudstackTestCase): ) volume = Volume.list( self.apiclient, - virtualmachineid=self.virtual_machine.id, - type='ROOT', - listall=True + virtualmachineid=self.virtual_machine.id, + type="ROOT", + listall=True, ) self.assertEqual( volume[0].storage, self.storage_name, - "Check volume migration response") + "Check volume migration response vol.storage %s self.storage_name %s" % (volume[0].storage, self.storage_name)) return