Rename OpShutdownInstance and LUShutdownInstance
authorIustin Pop <iustin@google.com>
Sat, 15 Jan 2011 12:05:50 +0000 (13:05 +0100)
committerIustin Pop <iustin@google.com>
Tue, 18 Jan 2011 11:47:13 +0000 (12:47 +0100)
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: RenĂ© Nussbaumer <rn@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

lib/client/gnt_instance.py
lib/cmdlib.py
lib/opcodes.py
lib/rapi/rlib2.py
test/ganeti.rapi.rlib2_unittest.py
tools/burnin

index 187ce7f..2b8964b 100644 (file)
@@ -718,7 +718,7 @@ def _ShutdownInstance(name, opts):
   @return: the opcode needed for the operation
 
   """
-  return opcodes.OpShutdownInstance(instance_name=name,
+  return opcodes.OpInstanceShutdown(instance_name=name,
                                     timeout=opts.timeout,
                                     ignore_offline_nodes=opts.ignore_offline)
 
index 1a53038..6770eda 100644 (file)
@@ -5124,7 +5124,7 @@ class LUInstanceReboot(LogicalUnit):
     self.cfg.MarkInstanceUp(instance.name)
 
 
-class LUShutdownInstance(LogicalUnit):
+class LUInstanceShutdown(LogicalUnit):
   """Shutdown an instance.
 
   """
index 6fb2859..198f361 100644 (file)
@@ -838,7 +838,7 @@ class OpStartupInstance(OpCode):
     ]
 
 
-class OpShutdownInstance(OpCode):
+class OpInstanceShutdown(OpCode):
   """Shutdown an instance."""
   OP_ID = "OP_INSTANCE_SHUTDOWN"
   OP_DSC_FIELD = "instance_name"
index 96594b4..098da38 100644 (file)
@@ -1013,7 +1013,7 @@ class R_2_instances_name_shutdown(baserlib.R_Generic):
 
     """
     instance_name = self.items[0]
-    op = opcodes.OpShutdownInstance(instance_name=instance_name,
+    op = opcodes.OpInstanceShutdown(instance_name=instance_name,
                                     dry_run=bool(self.dryRun()))
 
     return baserlib.SubmitJob([op])
@@ -1032,7 +1032,7 @@ def _ParseInstanceReinstallRequest(name, data):
   osparams = baserlib.CheckParameter(data, "osparams", default=None)
 
   ops = [
-    opcodes.OpShutdownInstance(instance_name=name),
+    opcodes.OpInstanceShutdown(instance_name=name),
     opcodes.OpInstanceReinstall(instance_name=name, os_type=ostype,
                                 osparams=osparams),
     ]
index d010018..fc0158c 100755 (executable)
@@ -366,7 +366,7 @@ class TestParseInstanceReinstallRequest(testutils.GanetiTestCase):
 
   def _Check(self, ops, name):
     expcls = [
-      opcodes.OpShutdownInstance,
+      opcodes.OpInstanceShutdown,
       opcodes.OpInstanceReinstall,
       opcodes.OpStartupInstance,
       ]
index 3a68610..1c493ed 100755 (executable)
@@ -752,7 +752,7 @@ class Burner(object):
   @staticmethod
   def StopInstanceOp(instance):
     """Stop given instance."""
-    return opcodes.OpShutdownInstance(instance_name=instance)
+    return opcodes.OpInstanceShutdown(instance_name=instance)
 
   @staticmethod
   def StartInstanceOp(instance):