Skip to content

Commit f04da19

Browse files
author
Girish Shilamkar
committed
Revert "CLOUDSTACK-5637: Detach volume before migrating"
Volume need not be detached before being migrated. This reverts commit 3b3adbf.
1 parent 1425041 commit f04da19

1 file changed

Lines changed: 4 additions & 11 deletions

File tree

‎test/integration/component/test_stopped_vm.py‎

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -891,8 +891,6 @@ def test_09_stop_vm_migrate_vol(self):
891891
"Running",
892892
"VM should be in Running state after deployment"
893893
)
894-
895-
896894
self.debug("Stopping instance: %s" % self.virtual_machine.name)
897895
self.virtual_machine.stop(self.apiclient)
898896
self.debug("Instance is stopped!")
@@ -941,11 +939,6 @@ def test_09_stop_vm_migrate_vol(self):
941939
self.storage_id = spool.id
942940
self.storage_name = spool.name
943941
break
944-
945-
self.debug("Detaching volume %s from vm %s" % (vol_response.id, self.virtual_machine.id))
946-
947-
self.virtual_machine.detach_volume(self.apiclient, vol_response)
948-
949942
self.debug("Migrating volume to storage pool: %s" % self.storage_name)
950943
Volume.migrate(
951944
self.apiclient,
@@ -954,14 +947,14 @@ def test_09_stop_vm_migrate_vol(self):
954947
)
955948
volume = Volume.list(
956949
self.apiclient,
957-
virtualmachineid=self.virtual_machine.id,
958-
type="ROOT",
959-
listall=True,
950+
virtualmachineid=self.virtual_machine.id,
951+
type='ROOT',
952+
listall=True
960953
)
961954
self.assertEqual(
962955
volume[0].storage,
963956
self.storage_name,
964-
"Check volume migration response vol.storage %s self.storage_name %s" % (volume[0].storage, self.storage_name))
957+
"Check volume migration response")
965958

966959
return
967960

0 commit comments

Comments
 (0)