Rename OpReinstallInstance and LUReinstallInstance
authorIustin Pop <iustin@google.com>
Sat, 15 Jan 2011 11:57:46 +0000 (12:57 +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 e99c9d2..7fe1d28 100644 (file)
@@ -504,7 +504,7 @@ def ReinstallInstance(opts, args):
 
   jex = JobExecutor(verbose=multi_on, opts=opts)
   for instance_name in inames:
-    op = opcodes.OpReinstallInstance(instance_name=instance_name,
+    op = opcodes.OpInstanceReinstall(instance_name=instance_name,
                                      os_type=os_name,
                                      force_variant=opts.force_variant,
                                      osparams=opts.osparams)
index a387350..e1b0fe4 100644 (file)
@@ -5186,7 +5186,7 @@ class LUShutdownInstance(LogicalUnit):
       _ShutdownInstanceDisks(self, instance)
 
 
-class LUReinstallInstance(LogicalUnit):
+class LUInstanceReinstall(LogicalUnit):
   """Reinstall an instance.
 
   """
index 0f8827d..f7fad1a 100644 (file)
@@ -791,7 +791,7 @@ class OpInstanceCreate(OpCode):
     ]
 
 
-class OpReinstallInstance(OpCode):
+class OpInstanceReinstall(OpCode):
   """Reinstall an instance's OS."""
   OP_ID = "OP_INSTANCE_REINSTALL"
   OP_DSC_FIELD = "instance_name"
index f06cbc8..3c2338b 100644 (file)
@@ -1033,7 +1033,7 @@ def _ParseInstanceReinstallRequest(name, data):
 
   ops = [
     opcodes.OpShutdownInstance(instance_name=name),
-    opcodes.OpReinstallInstance(instance_name=name, os_type=ostype,
+    opcodes.OpInstanceReinstall(instance_name=name, os_type=ostype,
                                 osparams=osparams),
     ]
 
index 2c3d9e4..ece7b03 100755 (executable)
@@ -367,7 +367,7 @@ class TestParseInstanceReinstallRequest(testutils.GanetiTestCase):
   def _Check(self, ops, name):
     expcls = [
       opcodes.OpShutdownInstance,
-      opcodes.OpReinstallInstance,
+      opcodes.OpInstanceReinstall,
       opcodes.OpStartupInstance,
       ]
 
index 611a7b9..f839e39 100755 (executable)
@@ -815,9 +815,9 @@ class Burner(object):
     for instance in self.instances:
       Log("instance %s", instance, indent=1)
       op1 = self.StopInstanceOp(instance)
-      op2 = opcodes.OpReinstallInstance(instance_name=instance)
+      op2 = opcodes.OpInstanceReinstall(instance_name=instance)
       Log("reinstall without passing the OS", indent=2)
-      op3 = opcodes.OpReinstallInstance(instance_name=instance,
+      op3 = opcodes.OpInstanceReinstall(instance_name=instance,
                                         os_type=self.opts.os)
       Log("reinstall specifying the OS", indent=2)
       op4 = self.StartInstanceOp(instance)