CLOUDSTACK-7506: Fix base library to read hypevisor value from dictionary as opposed to only from function parameter

Signed-off-by: SrikanteswaraRao Talluri <talluri@apache.org>
This commit is contained in:
Gaurav Aradhye 2014-09-08 16:45:20 +05:30 committed by SrikanteswaraRao Talluri
parent bbb3ea5983
commit d08d71427b
1 changed files with 4 additions and 1 deletions

View File

@ -1085,7 +1085,10 @@ class Template:
cmd.displaytext = services["displaytext"]
cmd.name = "-".join([services["name"], random_gen()])
cmd.format = services["format"]
cmd.hypervisor = hypervisor
if hypervisor:
cmd.hypervisor = hypervisor
elif "hypervisor" in services:
cmd.hypervisor = services["hypervisor"]
if "ostypeid" in services:
cmd.ostypeid = services["ostypeid"]