ia64/xen-unstable

changeset 14820:38f3a6dedad6

Fix typo and make create send proper bools

signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
author Tom Wilkie <tom.wilkie@gmail.com>
date Thu Apr 12 11:31:17 2007 +0100 (2007-04-12)
parents 423c4a7b82e6
children dcbfe557e62d
files tools/python/xen/xm/create.dtd tools/python/xen/xm/xenapi_create.py
line diff
     1.1 --- a/tools/python/xen/xm/create.dtd	Thu Apr 12 08:02:38 2007 +0100
     1.2 +++ b/tools/python/xen/xm/create.dtd	Thu Apr 12 11:31:17 2007 +0100
     1.3 @@ -95,7 +95,7 @@
     1.4                   src             %URI; #REQUIRED
     1.5                   type            %VDI_TYPE; #REQUIRED
     1.6                   size            CDATA #REQUIRED
     1.7 -                 shareable       CDATA #REQUIRED
     1.8 +                 sharable        CDATA #REQUIRED
     1.9                   read_only       CDATA #REQUIRED>
    1.10  
    1.11  <!ELEMENT name   (label, 
     2.1 --- a/tools/python/xen/xm/xenapi_create.py	Thu Apr 12 08:02:38 2007 +0100
     2.2 +++ b/tools/python/xen/xm/xenapi_create.py	Thu Apr 12 11:31:17 2007 +0100
     2.3 @@ -212,8 +212,8 @@ class xenapi_create:
     2.4              "SR":               self.DEFAULT_STORAGE_REPOSITORY,  
     2.5              "virtual_size":     vdi.attributes["size"].value,
     2.6              "type":             vdi.attributes["type"].value,
     2.7 -            "shareable":        vdi.attributes["shareable"].value,
     2.8 -            "read_only":        vdi.attributes["read_only"].value,
     2.9 +            "sharable":         bool(vdi.attributes["sharable"].value),
    2.10 +            "read_only":        bool(vdi.attributes["read_only"].value),
    2.11              "other_config":     {"location":
    2.12                  vdi.attributes["src"].value}
    2.13              }
    2.14 @@ -629,10 +629,10 @@ class sxp2xml:
    2.15          vdi.attributes["src"] = src
    2.16          vdi.attributes["read_only"] \
    2.17              = (get_child_by_name(vbd_sxp, "mode") != "w") \
    2.18 -               and "true" or "false"
    2.19 +               and "True" or "False"
    2.20          vdi.attributes["size"] = '-1'
    2.21          vdi.attributes["type"] = "system"
    2.22 -        vdi.attributes["shareable"] = "false"
    2.23 +        vdi.attributes["sharable"] = "False"
    2.24          vdi.attributes["name"] = name
    2.25  
    2.26          vdi.appendChild(self.make_name_tag(name, document))