Revision 835528af lib/hypervisor/hv_xen.py

b/lib/hypervisor/hv_xen.py
535 535
    # device type checks
536 536
    nic_type = hvparams[constants.HV_NIC_TYPE]
537 537
    if nic_type not in constants.HT_HVM_VALID_NIC_TYPES:
538
      raise errors.HypervisorError("Invalid NIC type %s specified for the Xen"
539
                                   " HVM hypervisor. Please choose one of: %s"
540
                                   % (nic_type,
541
                                      constants.HT_HVM_VALID_NIC_TYPES))
538
      raise errors.HypervisorError(\
539
        "Invalid NIC type %s specified for the Xen"
540
        " HVM hypervisor. Please choose one of: %s"
541
        % (nic_type, utils.CommaJoin(constants.HT_HVM_VALID_NIC_TYPES)))
542 542
    disk_type = hvparams[constants.HV_DISK_TYPE]
543 543
    if disk_type not in constants.HT_HVM_VALID_DISK_TYPES:
544
      raise errors.HypervisorError("Invalid disk type %s specified for the Xen"
545
                                   " HVM hypervisor. Please choose one of: %s"
546
                                   % (disk_type,
547
                                      constants.HT_HVM_VALID_DISK_TYPES))
544
      raise errors.HypervisorError(\
545
        "Invalid disk type %s specified for the Xen"
546
        " HVM hypervisor. Please choose one of: %s"
547
        % (disk_type, utils.CommaJoin(constants.HT_HVM_VALID_DISK_TYPES)))
548 548
    # vnc_bind_address verification
549 549
    vnc_bind_address = hvparams[constants.HV_VNC_BIND_ADDRESS]
550 550
    if vnc_bind_address:

Also available in: Unified diff