ia64/xen-unstable

changeset 14832:4224d2877fac

Ensure xenapi create passes in values even if unused

signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
author Tom Wilkie <tom.wilkie@gmail.com>
date Thu Apr 12 12:48:27 2007 +0100 (2007-04-12)
parents 5a8cb6354df5
children e630c107988b
files tools/python/xen/xm/xenapi_create.py
line diff
     1.1 --- a/tools/python/xen/xm/xenapi_create.py	Thu Apr 12 15:07:20 2007 +0100
     1.2 +++ b/tools/python/xen/xm/xenapi_create.py	Thu Apr 12 12:48:27 2007 +0100
     1.3 @@ -48,7 +48,7 @@ def get_name_description(node):
     1.4  
     1.5  def get_text_in_child_node(node, child):
     1.6      tag_node = node.getElementsByTagName(child)[0]
     1.7 -    return tag_node.nodeValue
     1.8 +    return " ".join([child.nodeValue for child in tag_node.childNodes])
     1.9  
    1.10  def get_child_node_attribute(node, child, attribute):
    1.11      tag_node = node.getElementsByTagName(child)[0]
    1.12 @@ -264,7 +264,23 @@ class xenapi_create:
    1.13              "platform":
    1.14                  get_child_nodes_as_dict(vm, "platform", "key", "value"),
    1.15              "other_config":
    1.16 -                get_child_nodes_as_dict(vm, "other_config", "key", "value")
    1.17 +                get_child_nodes_as_dict(vm, "other_config", "key", "value"),
    1.18 +            "PV_bootloader":
    1.19 +                "",
    1.20 +            "PV_kernel":
    1.21 +                "",
    1.22 +            "PV_ramdisk":
    1.23 +                "",
    1.24 +            "PV_args":
    1.25 +                "",
    1.26 +            "PV_bootloader_args":
    1.27 +                "",
    1.28 +            "HVM_boot_policy":
    1.29 +                "",
    1.30 +            "HVM_boot_params":
    1.31 +                {},
    1.32 +            "PCI_bus":
    1.33 +               ""
    1.34              }
    1.35  
    1.36          if len(vm.getElementsByTagName("pv")) > 0:
    1.37 @@ -494,7 +510,7 @@ class sxp2xml:
    1.38          # Make version tag
    1.39  
    1.40          version = document.createElement("version")
    1.41 -        version.appendChild(document.createTextNode("1.0"))
    1.42 +        version.appendChild(document.createTextNode("0"))
    1.43          vm.appendChild(version)
    1.44          
    1.45          # Make pv or hvm tag