Revision 30948aa6 lib/hypervisor/hv_xen.py

b/lib/hypervisor/hv_xen.py
493 493
    super(XenHvmHypervisor, cls).CheckParameterSyntax(hvparams)
494 494
    # boot order verification
495 495
    boot_order = hvparams[constants.HV_BOOT_ORDER]
496
    if len(boot_order.strip("acdn")) != 0:
496
    if not boot_order or len(boot_order.strip("acdn")) != 0:
497 497
      raise errors.HypervisorError("Invalid boot order '%s' specified,"
498 498
                                   " must be one or more of [acdn]" %
499 499
                                   boot_order)
......
567 567
      config.write("device_model = '/usr/lib64/xen/bin/qemu-dm'\n")
568 568
    else:
569 569
      config.write("device_model = '/usr/lib/xen/bin/qemu-dm'\n")
570
    if instance.hvparams[constants.HV_BOOT_ORDER] is None:
571
      config.write("boot = '%s'\n" % constants.HT_HVM_DEFAULT_BOOT_ORDER)
572
    else:
573
      config.write("boot = '%s'\n" % instance.hvparams["boot_order"])
570
    config.write("boot = '%s'\n" % instance.hvparams[constants.HV_BOOT_ORDER])
574 571
    config.write("sdl = 0\n")
575 572
    config.write("usb = 1\n")
576 573
    config.write("usbdevice = 'tablet'\n")

Also available in: Unified diff