Commit 83f5d475 authored by Iustin Pop's avatar Iustin Pop

Rename OpActivateInstanceDisks and LUActivateInstanceDisks

Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
parent 7cbf74f0
...@@ -292,7 +292,7 @@ instances they lock. If an LU uses the BGL, then it will invalidate the ...@@ -292,7 +292,7 @@ instances they lock. If an LU uses the BGL, then it will invalidate the
entire cache. In time, it is expected that LUs will be modified to not entire cache. In time, it is expected that LUs will be modified to not
invalidate, if they are not expected to change the node's and/or invalidate, if they are not expected to change the node's and/or
instance's state (e.g. ``LUConnectConsole``, or instance's state (e.g. ``LUConnectConsole``, or
``LUActivateInstanceDisks``). ``LUInstanceActivateDisks``).
Invalidation of a node's properties will also invalidate the capacity Invalidation of a node's properties will also invalidate the capacity
data associated with that node. data associated with that node.
......
...@@ -477,7 +477,7 @@ def VerifyDisks(opts, args): ...@@ -477,7 +477,7 @@ def VerifyDisks(opts, args):
for iname in instances: for iname in instances:
if iname in missing: if iname in missing:
continue continue
op = opcodes.OpActivateInstanceDisks(instance_name=iname) op = opcodes.OpInstanceActivateDisks(instance_name=iname)
try: try:
ToStdout("Activating disks for instance '%s'", iname) ToStdout("Activating disks for instance '%s'", iname)
SubmitOpCode(op, opts=opts, cl=cl) SubmitOpCode(op, opts=opts, cl=cl)
......
...@@ -589,7 +589,7 @@ def ActivateDisks(opts, args): ...@@ -589,7 +589,7 @@ def ActivateDisks(opts, args):
""" """
instance_name = args[0] instance_name = args[0]
op = opcodes.OpActivateInstanceDisks(instance_name=instance_name, op = opcodes.OpInstanceActivateDisks(instance_name=instance_name,
ignore_size=opts.ignore_size) ignore_size=opts.ignore_size)
disks_info = SubmitOrSend(op, opts) disks_info = SubmitOrSend(op, opts)
for host, iname, nname in disks_info: for host, iname, nname in disks_info:
......
...@@ -4621,7 +4621,7 @@ class LUClusterConfigQuery(NoHooksLU): ...@@ -4621,7 +4621,7 @@ class LUClusterConfigQuery(NoHooksLU):
return values return values
class LUActivateInstanceDisks(NoHooksLU): class LUInstanceActivateDisks(NoHooksLU):
"""Bring up an instance's disks. """Bring up an instance's disks.
""" """
......
...@@ -934,7 +934,7 @@ class OpConnectConsole(OpCode): ...@@ -934,7 +934,7 @@ class OpConnectConsole(OpCode):
] ]
class OpActivateInstanceDisks(OpCode): class OpInstanceActivateDisks(OpCode):
"""Activate an instance's disks.""" """Activate an instance's disks."""
OP_ID = "OP_INSTANCE_ACTIVATE_DISKS" OP_ID = "OP_INSTANCE_ACTIVATE_DISKS"
OP_DSC_FIELD = "instance_name" OP_DSC_FIELD = "instance_name"
......
...@@ -1120,7 +1120,7 @@ class R_2_instances_name_activate_disks(baserlib.R_Generic): ...@@ -1120,7 +1120,7 @@ class R_2_instances_name_activate_disks(baserlib.R_Generic):
instance_name = self.items[0] instance_name = self.items[0]
ignore_size = bool(self._checkIntVariable('ignore_size')) ignore_size = bool(self._checkIntVariable('ignore_size'))
op = opcodes.OpActivateInstanceDisks(instance_name=instance_name, op = opcodes.OpInstanceActivateDisks(instance_name=instance_name,
ignore_size=ignore_size) ignore_size=ignore_size)
return baserlib.SubmitJob([op]) return baserlib.SubmitJob([op])
......
...@@ -406,7 +406,7 @@ class Instance(object): ...@@ -406,7 +406,7 @@ class Instance(object):
"""Encapsulates the activation of all disks of an instance. """Encapsulates the activation of all disks of an instance.
""" """
op = opcodes.OpActivateInstanceDisks(instance_name=self.name) op = opcodes.OpInstanceActivateDisks(instance_name=self.name)
cli.SubmitOpCode(op, cl=client) cli.SubmitOpCode(op, cl=client)
...@@ -595,7 +595,7 @@ class Watcher(object): ...@@ -595,7 +595,7 @@ class Watcher(object):
utils.CommaJoin(offline_disk_instances)) utils.CommaJoin(offline_disk_instances))
# we submit only one job, and wait for it. not optimal, but spams # we submit only one job, and wait for it. not optimal, but spams
# less the job queue # less the job queue
job = [opcodes.OpActivateInstanceDisks(instance_name=name) job = [opcodes.OpInstanceActivateDisks(instance_name=name)
for name in offline_disk_instances] for name in offline_disk_instances]
job_id = cli.SendJob(job, cl=client) job_id = cli.SendJob(job, cl=client)
......
...@@ -847,7 +847,7 @@ class Burner(object): ...@@ -847,7 +847,7 @@ class Burner(object):
for instance in self.instances: for instance in self.instances:
Log("instance %s", instance, indent=1) Log("instance %s", instance, indent=1)
op_start = self.StartInstanceOp(instance) op_start = self.StartInstanceOp(instance)
op_act = opcodes.OpActivateInstanceDisks(instance_name=instance) op_act = opcodes.OpInstanceActivateDisks(instance_name=instance)
op_deact = opcodes.OpDeactivateInstanceDisks(instance_name=instance) op_deact = opcodes.OpDeactivateInstanceDisks(instance_name=instance)
op_stop = self.StopInstanceOp(instance) op_stop = self.StopInstanceOp(instance)
Log("activate disks when online", indent=2) Log("activate disks when online", indent=2)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment