From c873d91c32324b26722b8f806ac90682fec78c3d Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Sat, 15 Jan 2011 13:05:50 +0100
Subject: [PATCH] Rename OpStartupInstance and LUStartupInstance
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

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         | 2 +-
 lib/cmdlib.py                      | 2 +-
 lib/opcodes.py                     | 2 +-
 lib/rapi/rlib2.py                  | 4 ++--
 lib/watcher/__init__.py            | 2 +-
 test/ganeti.rapi.rlib2_unittest.py | 2 +-
 tools/burnin                       | 2 +-
 7 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/lib/client/gnt_instance.py b/lib/client/gnt_instance.py
index 2b8964b0b..23a2e64cb 100644
--- a/lib/client/gnt_instance.py
+++ b/lib/client/gnt_instance.py
@@ -679,7 +679,7 @@ def _StartupInstance(name, opts):
   @return: the opcode needed for the operation
 
   """
-  op = opcodes.OpStartupInstance(instance_name=name,
+  op = opcodes.OpInstanceStartup(instance_name=name,
                                  force=opts.force,
                                  ignore_offline_nodes=opts.ignore_offline)
   # do not add these parameters to the opcode unless they're defined
diff --git a/lib/cmdlib.py b/lib/cmdlib.py
index 6770eda1f..8e3b33b85 100644
--- a/lib/cmdlib.py
+++ b/lib/cmdlib.py
@@ -4948,7 +4948,7 @@ def _CheckNodesFreeDiskOnVG(lu, nodenames, vg, requested):
                                  errors.ECODE_NORES)
 
 
-class LUStartupInstance(LogicalUnit):
+class LUInstanceStartup(LogicalUnit):
   """Starts an instance.
 
   """
diff --git a/lib/opcodes.py b/lib/opcodes.py
index 198f3616d..3696845a7 100644
--- a/lib/opcodes.py
+++ b/lib/opcodes.py
@@ -825,7 +825,7 @@ class OpInstanceRename(OpCode):
     ]
 
 
-class OpStartupInstance(OpCode):
+class OpInstanceStartup(OpCode):
   """Startup an instance."""
   OP_ID = "OP_INSTANCE_STARTUP"
   OP_DSC_FIELD = "instance_name"
diff --git a/lib/rapi/rlib2.py b/lib/rapi/rlib2.py
index 098da3831..6b7bb93bf 100644
--- a/lib/rapi/rlib2.py
+++ b/lib/rapi/rlib2.py
@@ -995,7 +995,7 @@ class R_2_instances_name_startup(baserlib.R_Generic):
     """
     instance_name = self.items[0]
     force_startup = bool(self._checkIntVariable('force'))
-    op = opcodes.OpStartupInstance(instance_name=instance_name,
+    op = opcodes.OpInstanceStartup(instance_name=instance_name,
                                    force=force_startup,
                                    dry_run=bool(self.dryRun()))
 
@@ -1038,7 +1038,7 @@ def _ParseInstanceReinstallRequest(name, data):
     ]
 
   if start:
-    ops.append(opcodes.OpStartupInstance(instance_name=name, force=False))
+    ops.append(opcodes.OpInstanceStartup(instance_name=name, force=False))
 
   return ops
 
diff --git a/lib/watcher/__init__.py b/lib/watcher/__init__.py
index 21ccba9a1..ca896ae16 100644
--- a/lib/watcher/__init__.py
+++ b/lib/watcher/__init__.py
@@ -399,7 +399,7 @@ class Instance(object):
     """Encapsulates the start of an instance.
 
     """
-    op = opcodes.OpStartupInstance(instance_name=self.name, force=False)
+    op = opcodes.OpInstanceStartup(instance_name=self.name, force=False)
     cli.SubmitOpCode(op, cl=client)
 
   def ActivateDisks(self):
diff --git a/test/ganeti.rapi.rlib2_unittest.py b/test/ganeti.rapi.rlib2_unittest.py
index fc0158cae..c2f73796f 100755
--- a/test/ganeti.rapi.rlib2_unittest.py
+++ b/test/ganeti.rapi.rlib2_unittest.py
@@ -368,7 +368,7 @@ class TestParseInstanceReinstallRequest(testutils.GanetiTestCase):
     expcls = [
       opcodes.OpInstanceShutdown,
       opcodes.OpInstanceReinstall,
-      opcodes.OpStartupInstance,
+      opcodes.OpInstanceStartup,
       ]
 
     self.assert_(compat.all(isinstance(op, exp)
diff --git a/tools/burnin b/tools/burnin
index 1c493ed1f..7b2c4b7a4 100755
--- a/tools/burnin
+++ b/tools/burnin
@@ -757,7 +757,7 @@ class Burner(object):
   @staticmethod
   def StartInstanceOp(instance):
     """Start given instance."""
-    return opcodes.OpStartupInstance(instance_name=instance, force=False)
+    return opcodes.OpInstanceStartup(instance_name=instance, force=False)
 
   @staticmethod
   def RenameInstanceOp(instance, instance_new):
-- 
GitLab