Revision 9569d877
b/lib/constants.py | ||
---|---|---|
393 | 393 |
DDMS_VALUES = _constants.DDMS_VALUES |
394 | 394 |
DDMS_VALUES_WITH_MODIFY = _constants.DDMS_VALUES_WITH_MODIFY |
395 | 395 |
|
396 |
# common exit codes |
|
396 | 397 |
EXIT_SUCCESS = _constants.EXIT_SUCCESS |
397 | 398 |
EXIT_FAILURE = _constants.EXIT_FAILURE |
398 | 399 |
EXIT_NOTCLUSTER = _constants.EXIT_NOTCLUSTER |
... | ... | |
1576 | 1577 |
UPGRADE_QUEUE_DRAIN_TIMEOUT = _constants.UPGRADE_QUEUE_DRAIN_TIMEOUT |
1577 | 1578 |
UPGRADE_QUEUE_POLL_INTERVAL = _constants.UPGRADE_QUEUE_POLL_INTERVAL |
1578 | 1579 |
|
1580 |
# device types to hotplug |
|
1581 |
HOTPLUG_TARGET_DISK = _constants.HOTPLUG_TARGET_DISK |
|
1582 |
HOTPLUG_TARGET_NIC = _constants.HOTPLUG_TARGET_NIC |
|
1583 |
HOTPLUG_ALL_TARGETS = _constants.HOTPLUG_ALL_TARGETS |
|
1584 |
|
|
1585 |
# hotplug actions |
|
1586 |
HOTPLUG_ACTION_ADD = _constants.HOTPLUG_ACTION_ADD |
|
1587 |
HOTPLUG_ACTION_REMOVE = _constants.HOTPLUG_ACTION_REMOVE |
|
1588 |
HOTPLUG_ACTION_MODIFY = _constants.HOTPLUG_ACTION_MODIFY |
|
1589 |
HOTPLUG_ALL_ACTIONS = _constants.HOTPLUG_ALL_ACTIONS |
|
1590 |
|
|
1579 | 1591 |
# other constants |
1580 | 1592 |
|
1581 | 1593 |
HAS_GNU_LN = _constants.HAS_GNU_LN |
b/lib/objects.py | ||
---|---|---|
485 | 485 |
|
486 | 486 |
class NIC(ConfigObject): |
487 | 487 |
"""Config object representing a network card.""" |
488 |
__slots__ = ["name", "mac", "ip", "network", "nicparams", "netinfo"] + _UUID |
|
488 |
__slots__ = ["name", "mac", "ip", "network", |
|
489 |
"nicparams", "netinfo", "pci"] + _UUID |
|
489 | 490 |
|
490 | 491 |
@classmethod |
491 | 492 |
def CheckParameterSyntax(cls, nicparams): |
... | ... | |
509 | 510 |
class Disk(ConfigObject): |
510 | 511 |
"""Config object representing a block device.""" |
511 | 512 |
__slots__ = (["name", "dev_type", "logical_id", "children", "iv_name", |
512 |
"size", "mode", "params", "spindles"] + _UUID + |
|
513 |
"size", "mode", "params", "spindles", "pci"] + _UUID +
|
|
513 | 514 |
# dynamic_params is special. It depends on the node this instance |
514 | 515 |
# is sent to, and should not be persisted. |
515 | 516 |
["dynamic_params"]) |
b/src/Ganeti/HsConstants.hs | ||
---|---|---|
3877 | 3877 |
-- | Intervall at which the queue is polled during upgrades |
3878 | 3878 |
upgradeQueuePollInterval :: Int |
3879 | 3879 |
upgradeQueuePollInterval = 10 |
3880 |
|
|
3881 |
-- * Hotplug Actions |
|
3882 |
|
|
3883 |
hotplugActionAdd :: String |
|
3884 |
hotplugActionAdd = Types.hotplugActionToRaw HAAdd |
|
3885 |
|
|
3886 |
hotplugActionRemove :: String |
|
3887 |
hotplugActionRemove = Types.hotplugActionToRaw HARemove |
|
3888 |
|
|
3889 |
hotplugActionModify :: String |
|
3890 |
hotplugActionModify = Types.hotplugActionToRaw HAMod |
|
3891 |
|
|
3892 |
hotplugAllActions :: FrozenSet String |
|
3893 |
hotplugAllActions = |
|
3894 |
ConstantUtils.mkSet $ map Types.hotplugActionToRaw [minBound..] |
|
3895 |
|
|
3896 |
-- * Hotplug Device Targets |
|
3897 |
|
|
3898 |
hotplugTargetNic :: String |
|
3899 |
hotplugTargetNic = Types.hotplugTargetToRaw HTNic |
|
3900 |
|
|
3901 |
hotplugTargetDisk :: String |
|
3902 |
hotplugTargetDisk = Types.hotplugTargetToRaw HTDisk |
|
3903 |
|
|
3904 |
hotplugAllTargets :: FrozenSet String |
|
3905 |
hotplugAllTargets = |
|
3906 |
ConstantUtils.mkSet $ map Types.hotplugTargetToRaw [minBound..] |
b/src/Ganeti/Types.hs | ||
---|---|---|
152 | 152 |
, RpcTimeout(..) |
153 | 153 |
, rpcTimeoutFromRaw -- FIXME: no used anywhere |
154 | 154 |
, rpcTimeoutToRaw |
155 |
, HotplugTarget(..) |
|
156 |
, hotplugTargetToRaw |
|
157 |
, HotplugAction(..) |
|
158 |
, hotplugActionToRaw |
|
155 | 159 |
) where |
156 | 160 |
|
157 | 161 |
import Control.Monad (liftM) |
... | ... | |
830 | 834 |
, ("FourHours", 4 * 3600) -- 4 hours |
831 | 835 |
, ("OneDay", 86400) -- 1 day |
832 | 836 |
]) |
837 |
|
|
838 |
-- | Hotplug action. |
|
839 |
|
|
840 |
$(THH.declareLADT ''String "HotplugAction" |
|
841 |
[ ("HAAdd", "hotadd") |
|
842 |
, ("HARemove", "hotremove") |
|
843 |
, ("HAMod", "hotmod") |
|
844 |
]) |
|
845 |
$(THH.makeJSONInstance ''HotplugAction) |
|
846 |
|
|
847 |
-- | Hotplug Device Target. |
|
848 |
|
|
849 |
$(THH.declareLADT ''String "HotplugTarget" |
|
850 |
[ ("HTDisk", "hotdisk") |
|
851 |
, ("HTNic", "hotnic") |
|
852 |
]) |
|
853 |
$(THH.makeJSONInstance ''HotplugTarget) |
Also available in: Unified diff