Updated Branches:
  refs/heads/master 5233e3216 -> 195e823b1

CLOUDSTACK-2882: Fix the diskdevice based on hypervisor

KVM > /dev/vda
Xen > /dev/xvdd

Signed-off-by: Prasanna Santhanam <t...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/195e823b
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/195e823b
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/195e823b

Branch: refs/heads/master
Commit: 195e823b10c5519f90aefa74a0cb104f0ff57b07
Parents: 5233e32
Author: Prasanna Santhanam <t...@apache.org>
Authored: Fri Jun 7 16:23:06 2013 +0530
Committer: Prasanna Santhanam <t...@apache.org>
Committed: Fri Jun 7 17:08:19 2013 +0530

----------------------------------------------------------------------
 test/integration/smoke/test_vm_life_cycle.py |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/195e823b/test/integration/smoke/test_vm_life_cycle.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_vm_life_cycle.py 
b/test/integration/smoke/test_vm_life_cycle.py
index 8c78149..afe9b8a 100644
--- a/test/integration/smoke/test_vm_life_cycle.py
+++ b/test/integration/smoke/test_vm_life_cycle.py
@@ -730,6 +730,15 @@ class TestVMLifeCycle(cloudstackTestCase):
         cmd.virtualmachineid = self.virtual_machine.id
         self.apiclient.attachIso(cmd)
 
+        #determine device type from hypervisor
+        hosts = Host.list(self.apiclient, id=self.virtual_machine.hostid)
+        self.assertTrue(isinstance(hosts, list))
+        self.assertTrue(len(hosts) > 0)
+        self.debug("Found %s host" % hosts[0].hypervisor)
+
+        if hosts[0].hypervisor.lower() == "kvm":
+            self.services["diskdevice"] = "/dev/vda"
+
         try:
             ssh_client = self.virtual_machine.get_ssh_client()
         except Exception as e:

Reply via email to