Fixed Marvin Issue: Hypervisor value was hardcoded to XenServer while deploying VM if not specified

Signed-off-by: Santhosh Edukulla <santhosh.edukulla@gmail.com>
This commit is contained in:
Gaurav Aradhye 2014-08-05 14:04:19 +05:30 committed by Santhosh Edukulla
parent dfa607fb44
commit 2109418469
1 changed files with 5 additions and 2 deletions

View File

@ -354,7 +354,7 @@ class VirtualMachine:
projectid=None, startvm=None, diskofferingid=None,
affinitygroupnames=None, affinitygroupids=None, group=None,
hostid=None, keypair=None, ipaddress=None, mode='default',
method='GET', hypervisor="XenServer", customcpunumber=None,
method='GET', hypervisor=None, customcpunumber=None,
customcpuspeed=None, custommemory=None, rootdisksize=None):
"""Create the instance"""
@ -369,7 +369,10 @@ class VirtualMachine:
cmd.zoneid = zoneid
elif "zoneid" in services:
cmd.zoneid = services["zoneid"]
cmd.hypervisor = hypervisor
if hypervisor:
cmd.hypervisor = hypervisor
elif "hypervisor" in services:
cmd.hypervisor = services["hypervisor"]
if "displayname" in services:
cmd.displayname = services["displayname"]