direct-io.hg

changeset 14999:2a530128f1dc

[XM] Fix some small bugs in XenAPI create code.

signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
author Tom Wilkie <tom.wilkie@gmail.com>
date Tue May 01 11:40:40 2007 +0100 (2007-05-01)
parents 0e57b064f17a
children da02af7b55b9
files tools/python/xen/xm/xenapi_create.py
line diff
     1.1 --- a/tools/python/xen/xm/xenapi_create.py	Tue May 01 11:36:44 2007 +0100
     1.2 +++ b/tools/python/xen/xm/xenapi_create.py	Tue May 01 11:40:40 2007 +0100
     1.3 @@ -374,7 +374,7 @@ class xenapi_create:
     1.4              "device":
     1.5                  vbd.attributes["device"].value,
     1.6              "bootable":
     1.7 -                vbd.attributes["bootable"].value,
     1.8 +                vbd.attributes["bootable"].value == "True",
     1.9              "mode":
    1.10                  vbd.attributes["mode"].value,
    1.11              "type":
    1.12 @@ -401,9 +401,9 @@ class xenapi_create:
    1.13              if network_name in networks.keys():
    1.14                  network_uuid = networks[network_name]
    1.15              else:
    1.16 -                networks = dict([(record['name_label'], record['uuid'])
    1.17 -                                 for record in
    1.18 -                                 server.xenapi.network.get_all_records()])
    1.19 +                networks = dict([(record['name_label'], ref)
    1.20 +                                 for ref, record in
    1.21 +                                 server.xenapi.network.get_all_records().items()])
    1.22                  if network_name in networks.keys():
    1.23                      network_uuid = networks[network_name]
    1.24                  else: