Revision 8e1c6109

b/lib/constants.py
694 694
  ]))
695 695
# TODO: DDM_SWAP, DDM_MOVE?
696 696

  
697
# device types to hotplug
698
HOTPLUG_TARGET_DISK = "hotdisk"
699
HOTPLUG_TARGET_NIC = "hotnic"
700
HOTPLUG_ALL_TARGETS = frozenset([
701
  HOTPLUG_TARGET_DISK,
702
  HOTPLUG_TARGET_NIC
703
  ])
704

  
705
# hotplug actions
706
HOTPLUG_ACTION_ADD = "hotadd"
707
HOTPLUG_ACTION_REMOVE = "hotremove"
708
HOTPLUG_ACTION_MODIFY = "hotmod"
709
HOTPLUG_ALL_ACTIONS = frozenset([
710
  HOTPLUG_ACTION_ADD,
711
  HOTPLUG_ACTION_REMOVE,
712
  HOTPLUG_ACTION_MODIFY
713
  ])
714

  
697 715
# common exit codes
698 716
EXIT_SUCCESS = 0
699 717
EXIT_FAILURE = 1
b/lib/objects.py
489 489

  
490 490
class NIC(ConfigObject):
491 491
  """Config object representing a network card."""
492
  __slots__ = ["name", "mac", "ip", "network", "nicparams", "netinfo"] + _UUID
492
  __slots__ = ["name", "mac", "ip", "network",
493
               "nicparams", "netinfo", "pci"] + _UUID
493 494

  
494 495
  @classmethod
495 496
  def CheckParameterSyntax(cls, nicparams):
......
513 514
class Disk(ConfigObject):
514 515
  """Config object representing a block device."""
515 516
  __slots__ = ["name", "dev_type", "logical_id", "physical_id",
516
               "children", "iv_name", "size", "mode", "params"] + _UUID
517
               "children", "iv_name", "size", "mode", "params", "pci"] + _UUID
517 518

  
518 519
  def CreateOnSecondary(self):
519 520
    """Test if this device needs to be created on a secondary node."""
b/lib/opcodes.py
1720 1720
     "Whether to wait for the disk to synchronize, when changing template"),
1721 1721
    ("offline", None, ht.TMaybeBool, "Whether to mark instance as offline"),
1722 1722
    ("conflicts_check", True, ht.TBool, "Check for conflicting IPs"),
1723
    ("hotplug", False, ht.TBool, "Whether to hotplug device"),
1724
    ("hotplug_if_possible", False, ht.TBool, "If possible then hotplug device"),
1723 1725
    ]
1724 1726
  OP_RESULT = _TSetParamsResult
1725 1727

  

Also available in: Unified diff