Commit 0bff0b12 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

cmdlib: Remove opcode parameters



Remove the parameter definitions and use those from the opcode classes
instead. Small style changes are also made (empty lines, wrapping).
Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 65e183af
...@@ -57,41 +57,10 @@ from ganeti import netutils ...@@ -57,41 +57,10 @@ from ganeti import netutils
from ganeti import ht from ganeti import ht
from ganeti import query from ganeti import query
from ganeti import qlang from ganeti import qlang
from ganeti import opcodes
import ganeti.masterd.instance # pylint: disable-msg=W0611 import ganeti.masterd.instance # pylint: disable-msg=W0611
# Common opcode attributes
#: output fields for a query operation
_POutputFields = ("output_fields", ht.NoDefault, ht.TListOf(ht.TNonEmptyString))
#: the shutdown timeout
_PShutdownTimeout = ("shutdown_timeout", constants.DEFAULT_SHUTDOWN_TIMEOUT,
ht.TPositiveInt)
#: the force parameter
_PForce = ("force", False, ht.TBool)
#: a required instance name (for single-instance LUs)
_PInstanceName = ("instance_name", ht.NoDefault, ht.TNonEmptyString)
#: Whether to ignore offline nodes
_PIgnoreOfflineNodes = ("ignore_offline_nodes", False, ht.TBool)
#: a required node name (for single-node LUs)
_PNodeName = ("node_name", ht.NoDefault, ht.TNonEmptyString)
#: a required node group name (for single-group LUs)
_PGroupName = ("group_name", ht.NoDefault, ht.TNonEmptyString)
#: the migration type (live/non-live)
_PMigrationMode = ("mode", None,
ht.TOr(ht.TNone, ht.TElemOf(constants.HT_MIGRATION_MODES)))
#: the obsolete 'live' mode (boolean)
_PMigrationLive = ("live", None, ht.TMaybeBool)
def _SupportsOob(cfg, node): def _SupportsOob(cfg, node):
"""Tells if node supports OOB. """Tells if node supports OOB.
...@@ -123,13 +92,10 @@ class LogicalUnit(object): ...@@ -123,13 +92,10 @@ class LogicalUnit(object):
@ivar dry_run_result: the value (if any) that will be returned to the caller @ivar dry_run_result: the value (if any) that will be returned to the caller
in dry-run mode (signalled by opcode dry_run parameter) in dry-run mode (signalled by opcode dry_run parameter)
@cvar _OP_PARAMS: a list of opcode attributes, the default values
they should get if not already defined, and types they must match
""" """
HPATH = None HPATH = None
HTYPE = None HTYPE = None
_OP_PARAMS = []
REQ_BGL = True REQ_BGL = True
def __init__(self, processor, op, context, rpc): def __init__(self, processor, op, context, rpc):
...@@ -170,7 +136,7 @@ class LogicalUnit(object): ...@@ -170,7 +136,7 @@ class LogicalUnit(object):
# The new kind-of-type-system # The new kind-of-type-system
op_id = self.op.OP_ID op_id = self.op.OP_ID
for attr_name, aval, test in self._OP_PARAMS: for attr_name, aval, test in self.op.GetAllParams():
if not hasattr(op, attr_name): if not hasattr(op, attr_name):
if aval == ht.NoDefault: if aval == ht.NoDefault:
raise errors.OpPrereqError("Required parameter '%s.%s' missing" % raise errors.OpPrereqError("Required parameter '%s.%s' missing" %
...@@ -788,42 +754,6 @@ def _CheckNodeHasSecondaryIP(lu, node, secondary_ip, prereq): ...@@ -788,42 +754,6 @@ def _CheckNodeHasSecondaryIP(lu, node, secondary_ip, prereq):
raise errors.OpExecError(msg) raise errors.OpExecError(msg)
def _RequireFileStorage():
"""Checks that file storage is enabled.
@raise errors.OpPrereqError: when file storage is disabled
"""
if not constants.ENABLE_FILE_STORAGE:
raise errors.OpPrereqError("File storage disabled at configure time",
errors.ECODE_INVAL)
def _CheckDiskTemplate(template):
"""Ensure a given disk template is valid.
"""
if template not in constants.DISK_TEMPLATES:
msg = ("Invalid disk template name '%s', valid templates are: %s" %
(template, utils.CommaJoin(constants.DISK_TEMPLATES)))
raise errors.OpPrereqError(msg, errors.ECODE_INVAL)
if template == constants.DT_FILE:
_RequireFileStorage()
return True
def _CheckStorageType(storage_type):
"""Ensure a given storage type is valid.
"""
if storage_type not in constants.VALID_STORAGE_TYPES:
raise errors.OpPrereqError("Unknown storage type: %s" % storage_type,
errors.ECODE_INVAL)
if storage_type == constants.ST_FILE:
_RequireFileStorage()
return True
def _GetClusterDomainSecret(): def _GetClusterDomainSecret():
"""Reads the cluster domain secret. """Reads the cluster domain secret.
...@@ -1300,13 +1230,6 @@ class LUVerifyCluster(LogicalUnit): ...@@ -1300,13 +1230,6 @@ class LUVerifyCluster(LogicalUnit):
""" """
HPATH = "cluster-verify" HPATH = "cluster-verify"
HTYPE = constants.HTYPE_CLUSTER HTYPE = constants.HTYPE_CLUSTER
_OP_PARAMS = [
("skip_checks", ht.EmptyList,
ht.TListOf(ht.TElemOf(constants.VERIFY_OPTIONAL_CHECKS))),
("verbose", False, ht.TBool),
("error_codes", False, ht.TBool),
("debug_simulate_errors", False, ht.TBool),
]
REQ_BGL = False REQ_BGL = False
TCLUSTER = "cluster" TCLUSTER = "cluster"
...@@ -2507,7 +2430,6 @@ class LURepairDiskSizes(NoHooksLU): ...@@ -2507,7 +2430,6 @@ class LURepairDiskSizes(NoHooksLU):
"""Verifies the cluster disks sizes. """Verifies the cluster disks sizes.
""" """
_OP_PARAMS = [("instances", ht.EmptyList, ht.TListOf(ht.TNonEmptyString))]
REQ_BGL = False REQ_BGL = False
def ExpandNames(self): def ExpandNames(self):
...@@ -2625,7 +2547,6 @@ class LURenameCluster(LogicalUnit): ...@@ -2625,7 +2547,6 @@ class LURenameCluster(LogicalUnit):
""" """
HPATH = "cluster-rename" HPATH = "cluster-rename"
HTYPE = constants.HTYPE_CLUSTER HTYPE = constants.HTYPE_CLUSTER
_OP_PARAMS = [("name", ht.NoDefault, ht.TNonEmptyString)]
def BuildHooksEnv(self): def BuildHooksEnv(self):
"""Build hooks env. """Build hooks env.
...@@ -2704,41 +2625,6 @@ class LUSetClusterParams(LogicalUnit): ...@@ -2704,41 +2625,6 @@ class LUSetClusterParams(LogicalUnit):
""" """
HPATH = "cluster-modify" HPATH = "cluster-modify"
HTYPE = constants.HTYPE_CLUSTER HTYPE = constants.HTYPE_CLUSTER
_OP_PARAMS = [
("vg_name", None, ht.TMaybeString),
("enabled_hypervisors", None,
ht.TOr(ht.TAnd(ht.TListOf(ht.TElemOf(constants.HYPER_TYPES)), ht.TTrue),
ht.TNone)),
("hvparams", None, ht.TOr(ht.TDictOf(ht.TNonEmptyString, ht.TDict),
ht.TNone)),
("beparams", None, ht.TOr(ht.TDict, ht.TNone)),
("os_hvp", None, ht.TOr(ht.TDictOf(ht.TNonEmptyString, ht.TDict),
ht.TNone)),
("osparams", None, ht.TOr(ht.TDictOf(ht.TNonEmptyString, ht.TDict),
ht.TNone)),
("candidate_pool_size", None, ht.TOr(ht.TStrictPositiveInt, ht.TNone)),
("uid_pool", None, ht.NoType),
("add_uids", None, ht.NoType),
("remove_uids", None, ht.NoType),
("maintain_node_health", None, ht.TMaybeBool),
("prealloc_wipe_disks", None, ht.TMaybeBool),
("nicparams", None, ht.TOr(ht.TDict, ht.TNone)),
("ndparams", None, ht.TOr(ht.TDict, ht.TNone)),
("drbd_helper", None, ht.TOr(ht.TString, ht.TNone)),
("default_iallocator", None, ht.TOr(ht.TString, ht.TNone)),
("master_netdev", None, ht.TOr(ht.TString, ht.TNone)),
("reserved_lvs", None, ht.TOr(ht.TListOf(ht.TNonEmptyString), ht.TNone)),
("hidden_os", None, ht.TOr(ht.TListOf(\
ht.TAnd(ht.TList,
ht.TIsLength(2),
ht.TMap(lambda v: v[0], ht.TElemOf(constants.DDMS_VALUES)))),
ht.TNone)),
("blacklisted_os", None, ht.TOr(ht.TListOf(\
ht.TAnd(ht.TList,
ht.TIsLength(2),
ht.TMap(lambda v: v[0], ht.TElemOf(constants.DDMS_VALUES)))),
ht.TNone)),
]
REQ_BGL = False REQ_BGL = False
def CheckArguments(self): def CheckArguments(self):
...@@ -3263,11 +3149,6 @@ class LUOobCommand(NoHooksLU): ...@@ -3263,11 +3149,6 @@ class LUOobCommand(NoHooksLU):
"""Logical unit for OOB handling. """Logical unit for OOB handling.
""" """
_OP_PARAMS = [
_PNodeName,
("command", None, ht.TElemOf(constants.OOB_COMMANDS)),
("timeout", constants.OOB_TIMEOUT, ht.TInt),
]
REG_BGL = False REG_BGL = False
def CheckPrereq(self): def CheckPrereq(self):
...@@ -3388,10 +3269,6 @@ class LUDiagnoseOS(NoHooksLU): ...@@ -3388,10 +3269,6 @@ class LUDiagnoseOS(NoHooksLU):
"""Logical unit for OS diagnose/query. """Logical unit for OS diagnose/query.
""" """
_OP_PARAMS = [
_POutputFields,
("names", ht.EmptyList, ht.TListOf(ht.TNonEmptyString)),
]
REQ_BGL = False REQ_BGL = False
_HID = "hidden" _HID = "hidden"
_BLK = "blacklisted" _BLK = "blacklisted"
...@@ -3528,9 +3405,6 @@ class LURemoveNode(LogicalUnit): ...@@ -3528,9 +3405,6 @@ class LURemoveNode(LogicalUnit):
""" """
HPATH = "node-remove" HPATH = "node-remove"
HTYPE = constants.HTYPE_NODE HTYPE = constants.HTYPE_NODE
_OP_PARAMS = [
_PNodeName,
]
def BuildHooksEnv(self): def BuildHooksEnv(self):
"""Build hooks env. """Build hooks env.
...@@ -3692,11 +3566,6 @@ class LUQueryNodes(NoHooksLU): ...@@ -3692,11 +3566,6 @@ class LUQueryNodes(NoHooksLU):
""" """
# pylint: disable-msg=W0142 # pylint: disable-msg=W0142
_OP_PARAMS = [
_POutputFields,
("names", ht.EmptyList, ht.TListOf(ht.TNonEmptyString)),
("use_locking", False, ht.TBool),
]
REQ_BGL = False REQ_BGL = False
def CheckArguments(self): def CheckArguments(self):
...@@ -3714,10 +3583,6 @@ class LUQueryNodeVolumes(NoHooksLU): ...@@ -3714,10 +3583,6 @@ class LUQueryNodeVolumes(NoHooksLU):
"""Logical unit for getting volumes on node(s). """Logical unit for getting volumes on node(s).
""" """
_OP_PARAMS = [
_POutputFields,
("nodes", ht.EmptyList, ht.TListOf(ht.TNonEmptyString)),
]
REQ_BGL = False REQ_BGL = False
_FIELDS_DYNAMIC = utils.FieldSet("phys", "vg", "name", "size", "instance") _FIELDS_DYNAMIC = utils.FieldSet("phys", "vg", "name", "size", "instance")
_FIELDS_STATIC = utils.FieldSet("node") _FIELDS_STATIC = utils.FieldSet("node")
...@@ -3797,12 +3662,6 @@ class LUQueryNodeStorage(NoHooksLU): ...@@ -3797,12 +3662,6 @@ class LUQueryNodeStorage(NoHooksLU):
""" """
_FIELDS_STATIC = utils.FieldSet(constants.SF_NODE) _FIELDS_STATIC = utils.FieldSet(constants.SF_NODE)
_OP_PARAMS = [
_POutputFields,
("nodes", ht.EmptyList, ht.TListOf(ht.TNonEmptyString)),
("storage_type", ht.NoDefault, _CheckStorageType),
("name", None, ht.TMaybeString),
]
REQ_BGL = False REQ_BGL = False
def CheckArguments(self): def CheckArguments(self):
...@@ -3976,12 +3835,6 @@ class LUQuery(NoHooksLU): ...@@ -3976,12 +3835,6 @@ class LUQuery(NoHooksLU):
""" """
# pylint: disable-msg=W0142 # pylint: disable-msg=W0142
_OP_PARAMS = [
("what", ht.NoDefault, ht.TElemOf(constants.QR_OP_QUERY)),
("fields", ht.NoDefault, ht.TListOf(ht.TNonEmptyString)),
("filter", None, ht.TOr(ht.TNone,
ht.TListOf(ht.TOr(ht.TNonEmptyString, ht.TList)))),
]
REQ_BGL = False REQ_BGL = False
def CheckArguments(self): def CheckArguments(self):
...@@ -4005,10 +3858,6 @@ class LUQueryFields(NoHooksLU): ...@@ -4005,10 +3858,6 @@ class LUQueryFields(NoHooksLU):
""" """
# pylint: disable-msg=W0142 # pylint: disable-msg=W0142
_OP_PARAMS = [
("what", ht.NoDefault, ht.TElemOf(constants.QR_OP_QUERY)),
("fields", None, ht.TOr(ht.TNone, ht.TListOf(ht.TNonEmptyString))),
]
REQ_BGL = False REQ_BGL = False
def CheckArguments(self): def CheckArguments(self):
...@@ -4025,12 +3874,6 @@ class LUModifyNodeStorage(NoHooksLU): ...@@ -4025,12 +3874,6 @@ class LUModifyNodeStorage(NoHooksLU):
"""Logical unit for modifying a storage volume on a node. """Logical unit for modifying a storage volume on a node.
""" """
_OP_PARAMS = [
_PNodeName,
("storage_type", ht.NoDefault, _CheckStorageType),
("name", ht.NoDefault, ht.TNonEmptyString),
("changes", ht.NoDefault, ht.TDict),
]
REQ_BGL = False REQ_BGL = False
def CheckArguments(self): def CheckArguments(self):
...@@ -4075,16 +3918,6 @@ class LUAddNode(LogicalUnit): ...@@ -4075,16 +3918,6 @@ class LUAddNode(LogicalUnit):
""" """
HPATH = "node-add" HPATH = "node-add"
HTYPE = constants.HTYPE_NODE HTYPE = constants.HTYPE_NODE
_OP_PARAMS = [
_PNodeName,
("primary_ip", None, ht.NoType),
("secondary_ip", None, ht.TMaybeString),
("readd", False, ht.TBool),
("group", None, ht.TMaybeString),
("master_capable", None, ht.TMaybeBool),
("vm_capable", None, ht.TMaybeBool),
("ndparams", None, ht.TOr(ht.TDict, ht.TNone)),
]
_NFLAGS = ["master_capable", "vm_capable"] _NFLAGS = ["master_capable", "vm_capable"]
def CheckArguments(self): def CheckArguments(self):
...@@ -4352,19 +4185,6 @@ class LUSetNodeParams(LogicalUnit): ...@@ -4352,19 +4185,6 @@ class LUSetNodeParams(LogicalUnit):
""" """
HPATH = "node-modify" HPATH = "node-modify"
HTYPE = constants.HTYPE_NODE HTYPE = constants.HTYPE_NODE
_OP_PARAMS = [
_PNodeName,
("master_candidate", None, ht.TMaybeBool),
("offline", None, ht.TMaybeBool),
("drained", None, ht.TMaybeBool),
("auto_promote", False, ht.TBool),
("master_capable", None, ht.TMaybeBool),
("vm_capable", None, ht.TMaybeBool),
("secondary_ip", None, ht.TMaybeString),
("ndparams", None, ht.TOr(ht.TDict, ht.TNone)),
("powered", None, ht.TMaybeBool),
_PForce,
]
REQ_BGL = False REQ_BGL = False
(_ROLE_CANDIDATE, _ROLE_DRAINED, _ROLE_OFFLINE, _ROLE_REGULAR) = range(4) (_ROLE_CANDIDATE, _ROLE_DRAINED, _ROLE_OFFLINE, _ROLE_REGULAR) = range(4)
_F2R = { _F2R = {
...@@ -4651,10 +4471,6 @@ class LUPowercycleNode(NoHooksLU): ...@@ -4651,10 +4471,6 @@ class LUPowercycleNode(NoHooksLU):
"""Powercycles a node. """Powercycles a node.
""" """
_OP_PARAMS = [
_PNodeName,
_PForce,
]
REQ_BGL = False REQ_BGL = False
def CheckArguments(self): def CheckArguments(self):
...@@ -4752,7 +4568,6 @@ class LUQueryConfigValues(NoHooksLU): ...@@ -4752,7 +4568,6 @@ class LUQueryConfigValues(NoHooksLU):
"""Return configuration values. """Return configuration values.
""" """
_OP_PARAMS = [_POutputFields]
REQ_BGL = False REQ_BGL = False
_FIELDS_DYNAMIC = utils.FieldSet() _FIELDS_DYNAMIC = utils.FieldSet()
_FIELDS_STATIC = utils.FieldSet("cluster_name", "master_node", "drain_flag", _FIELDS_STATIC = utils.FieldSet("cluster_name", "master_node", "drain_flag",
...@@ -4792,10 +4607,6 @@ class LUActivateInstanceDisks(NoHooksLU): ...@@ -4792,10 +4607,6 @@ class LUActivateInstanceDisks(NoHooksLU):
"""Bring up an instance's disks. """Bring up an instance's disks.
""" """
_OP_PARAMS = [
_PInstanceName,
("ignore_size", False, ht.TBool),
]
REQ_BGL = False REQ_BGL = False
def ExpandNames(self): def ExpandNames(self):
...@@ -4938,9 +4749,6 @@ class LUDeactivateInstanceDisks(NoHooksLU): ...@@ -4938,9 +4749,6 @@ class LUDeactivateInstanceDisks(NoHooksLU):
"""Shutdown an instance's disks. """Shutdown an instance's disks.
""" """
_OP_PARAMS = [
_PInstanceName,
]
REQ_BGL = False REQ_BGL = False
def ExpandNames(self): def ExpandNames(self):
...@@ -5129,13 +4937,6 @@ class LUStartupInstance(LogicalUnit): ...@@ -5129,13 +4937,6 @@ class LUStartupInstance(LogicalUnit):
""" """
HPATH = "instance-start" HPATH = "instance-start"
HTYPE = constants.HTYPE_INSTANCE HTYPE = constants.HTYPE_INSTANCE
_OP_PARAMS = [
_PInstanceName,
_PForce,
_PIgnoreOfflineNodes,
("hvparams", ht.EmptyDict, ht.TDict),
("beparams", ht.EmptyDict, ht.TDict),
]
REQ_BGL = False REQ_BGL = False
def CheckArguments(self): def CheckArguments(self):
...@@ -5237,12 +5038,6 @@ class LURebootInstance(LogicalUnit): ...@@ -5237,12 +5038,6 @@ class LURebootInstance(LogicalUnit):
""" """
HPATH = "instance-reboot" HPATH = "instance-reboot"
HTYPE = constants.HTYPE_INSTANCE HTYPE = constants.HTYPE_INSTANCE
_OP_PARAMS = [
_PInstanceName,
("ignore_secondaries", False, ht.TBool),
("reboot_type", ht.NoDefault, ht.TElemOf(constants.REBOOT_TYPES)),
_PShutdownTimeout,
]
REQ_BGL = False REQ_BGL = False
def ExpandNames(self): def ExpandNames(self):
...@@ -5318,11 +5113,6 @@ class LUShutdownInstance(LogicalUnit): ...@@ -5318,11 +5113,6 @@ class LUShutdownInstance(LogicalUnit):
""" """
HPATH = "instance-stop" HPATH = "instance-stop"
HTYPE = constants.HTYPE_INSTANCE HTYPE = constants.HTYPE_INSTANCE
_OP_PARAMS = [
_PInstanceName,
_PIgnoreOfflineNodes,
("timeout", constants.DEFAULT_SHUTDOWN_TIMEOUT, ht.TPositiveInt),
]
REQ_BGL = False REQ_BGL = False
def ExpandNames(self): def ExpandNames(self):
...@@ -5385,12 +5175,6 @@ class LUReinstallInstance(LogicalUnit): ...@@ -5385,12 +5175,6 @@ class LUReinstallInstance(LogicalUnit):
""" """
HPATH = "instance-reinstall" HPATH = "instance-reinstall"
HTYPE = constants.HTYPE_INSTANCE HTYPE = constants.HTYPE_INSTANCE
_OP_PARAMS = [
_PInstanceName,
("os_type", None, ht.TMaybeString),
("force_variant", False, ht.TBool),
("osparams", None, ht.TOr(ht.TDict, ht.TNone)),
]
REQ_BGL = False REQ_BGL = False
def ExpandNames(self): def ExpandNames(self):
...@@ -5477,10 +5261,6 @@ class LURecreateInstanceDisks(LogicalUnit): ...@@ -5477,10 +5261,6 @@ class LURecreateInstanceDisks(LogicalUnit):
""" """
HPATH = "instance-recreate-disks" HPATH = "instance-recreate-disks"
HTYPE = constants.HTYPE_INSTANCE HTYPE = constants.HTYPE_INSTANCE
_OP_PARAMS = [
_PInstanceName,
("disks", ht.EmptyList, ht.TListOf(ht.TPositiveInt)),
]
REQ_BGL = False REQ_BGL = False
def ExpandNames(self): def ExpandNames(self):
...@@ -5541,12 +5321,6 @@ class LURenameInstance(LogicalUnit): ...@@ -5541,12 +5321,6 @@ class LURenameInstance(LogicalUnit):
""" """
HPATH = "instance-rename" HPATH = "instance-rename"
HTYPE = constants.HTYPE_INSTANCE HTYPE = constants.HTYPE_INSTANCE
_OP_PARAMS = [
_PInstanceName,
("new_name", ht.NoDefault, ht.TNonEmptyString),
("ip_check", False, ht.TBool),
("name_check", True, ht.TBool),
]
def CheckArguments(self): def CheckArguments(self):
"""Check arguments. """Check arguments.
...@@ -5652,11 +5426,6 @@ class LURemoveInstance(LogicalUnit): ...@@ -5652,11 +5426,6 @@ class LURemoveInstance(LogicalUnit):
""" """
HPATH = "instance-remove" HPATH = "instance-remove"
HTYPE = constants.HTYPE_INSTANCE HTYPE = constants.HTYPE_INSTANCE
_OP_PARAMS = [
_PInstanceName,
("ignore_failures", False, ht.TBool),
_PShutdownTimeout,
]
REQ_BGL = False REQ_BGL = False
def ExpandNames(self): def ExpandNames(self):
...@@ -5739,11 +5508,6 @@ class LUQueryInstances(NoHooksLU): ...@@ -5739,11 +5508,6 @@ class LUQueryInstances(NoHooksLU):
""" """
# pylint: disable-msg=W0142 # pylint: disable-msg=W0142
_OP_PARAMS = [
_POutputFields,
("names", ht.EmptyList, ht.TListOf(ht.TNonEmptyString)),
("use_locking", False, ht.TBool),
]
REQ_BGL = False REQ_BGL = False
def CheckArguments(self): def CheckArguments(self):
...@@ -5766,11 +5530,6 @@ class LUFailoverInstance(LogicalUnit): ...@@ -5766,11 +5530,6 @@ class LUFailoverInstance(LogicalUnit):
""" """
HPATH = "instance-failover" HPATH = "instance-failover"
HTYPE = constants.HTYPE_INSTANCE HTYPE = constants.HTYPE_INSTANCE
_OP_PARAMS = [
_PInstanceName,
("ignore_consistency", False, ht.TBool),
_PShutdownTimeout,
]
REQ_BGL = False REQ_BGL = False
def ExpandNames(self): def ExpandNames(self):
...@@ -5921,13 +5680,6 @@ class LUMigrateInstance(LogicalUnit): ...@@ -5921,13 +5680,6 @@ class LUMigrateInstance(LogicalUnit):
""" """
HPATH = "instance-migrate" HPATH = "instance-migrate"
HTYPE = constants.HTYPE_INSTANCE HTYPE = constants.HTYPE_INSTANCE
_OP_PARAMS = [
_PInstanceName,
_PMigrationMode,
_PMigrationLive,
("cleanup", False, ht.TBool),
]
REQ_BGL = False REQ_BGL = False
def ExpandNames(self): def ExpandNames(self):
...@@ -5974,11 +5726,6 @@ class LUMoveInstance(LogicalUnit): ...@@ -5974,11 +5726,6 @@ class LUMoveInstance(LogicalUnit):