On Sat, Jan 15, 2011 at 4:59 PM, Iustin Pop <[email protected]> wrote:
> From: Iustin Pop <[email protected]>
>
> ---
>  doc/design-2.0.rst                 |    2 +-
>  doc/design-2.2.rst                 |    4 ++--
>  lib/cli.py                         |    2 +-
>  lib/client/gnt_instance.py         |    2 +-
>  lib/cmdlib.py                      |    2 +-
>  lib/opcodes.py                     |    2 +-
>  lib/rapi/rlib2.py                  |    8 ++++----
>  test/ganeti.rapi.rlib2_unittest.py |    2 +-
>  tools/burnin                       |    4 ++--
>  9 files changed, 14 insertions(+), 14 deletions(-)
>
> diff --git a/doc/design-2.0.rst b/doc/design-2.0.rst
> index c2c4591..9723c26 100644
> --- a/doc/design-2.0.rst
> +++ b/doc/design-2.0.rst
> @@ -961,7 +961,7 @@ Opcode changes
>  The parameter changes will have impact on the OpCodes, especially on
>  the following ones:
>
> -- ``OpCreateInstance``, where the new hv and be parameters will be sent
> +- ``OpInstanceCreate``, where the new hv and be parameters will be sent
>   as dictionaries; note that all hv and be parameters are now optional,
>   as the values can be instead taken from the cluster
>  - ``OpQueryInstances``, where we have to be able to query these new
> diff --git a/doc/design-2.2.rst b/doc/design-2.2.rst
> index 7916372..453b17d 100644
> --- a/doc/design-2.2.rst
> +++ b/doc/design-2.2.rst
> @@ -317,7 +317,7 @@ Workflow
>    instance move with the key received from the source cluster and
>    receives the public part of the destination's encryption key
>
> -   - The current API to create instances (``OpCreateInstance``) will be
> +   - The current API to create instances (``OpInstanceCreate``) will be
>      extended to support an import from a remote cluster.
>    - A valid, unexpired X509 certificate signed with the destination
>      cluster's secret will be required. By verifying the signature, we
> @@ -725,7 +725,7 @@ unless the hidden state is requested.
>
>  For the blacklisted OSes, they are also not shown (unless the
>  blacklisted state is requested), and they are also prevented from
> -installation via ``OpCreateInstance`` (in create mode).
> +installation via ``OpInstanceCreate`` (in create mode).
>
>  Both these attributes are per-OS, not per-variant. Thus they apply to
>  all of an OS' variants, and it's impossible to blacklist or hide just
> diff --git a/lib/cli.py b/lib/cli.py
> index 0eb51d0..6edd7b6 100644
> --- a/lib/cli.py
> +++ b/lib/cli.py
> @@ -2054,7 +2054,7 @@ def GenericInstanceCreate(mode, opts, args):
>   else:
>     raise errors.ProgrammerError("Invalid creation mode %s" % mode)
>
> -  op = opcodes.OpCreateInstance(instance_name=instance,
> +  op = opcodes.OpInstanceCreate(instance_name=instance,
>                                 disks=disks,
>                                 disk_template=opts.disk_template,
>                                 nics=nics,
> diff --git a/lib/client/gnt_instance.py b/lib/client/gnt_instance.py
> index 8799a54..12fa709 100644
> --- a/lib/client/gnt_instance.py
> +++ b/lib/client/gnt_instance.py
> @@ -409,7 +409,7 @@ def BatchCreate(opts, args):
>     elif not tmp_nics:
>       tmp_nics = [{}]
>
> -    op = opcodes.OpCreateInstance(instance_name=name,
> +    op = opcodes.OpInstanceCreate(instance_name=name,
>                                   disks=disks,
>                                   disk_template=specs['template'],
>                                   mode=constants.INSTANCE_CREATE,
> diff --git a/lib/cmdlib.py b/lib/cmdlib.py
> index 1d3d9a7..d60b490 100644
> --- a/lib/cmdlib.py
> +++ b/lib/cmdlib.py
> @@ -6775,7 +6775,7 @@ def _CheckOSParams(lu, required, nodenames, osname, 
> osparams):
>                  osname, node)
>
>
> -class LUCreateInstance(LogicalUnit):
> +class LUInstanceCreate(LogicalUnit):
>   """Create an instance.
>
>   """
> diff --git a/lib/opcodes.py b/lib/opcodes.py
> index 694a88f..181d2a7 100644
> --- a/lib/opcodes.py
> +++ b/lib/opcodes.py
> @@ -744,7 +744,7 @@ class OpNodeEvacuationStrategy(OpCode):
>
>  # instance opcodes
>
> -class OpCreateInstance(OpCode):
> +class OpInstanceCreate(OpCode):
>   """Create an instance.
>
>   @ivar instance_name: Instance name
> diff --git a/lib/rapi/rlib2.py b/lib/rapi/rlib2.py
> index 58da35b..275ab1e 100644
> --- a/lib/rapi/rlib2.py
> +++ b/lib/rapi/rlib2.py
> @@ -707,7 +707,7 @@ class R_2_groups_name_assign_nodes(baserlib.R_Generic):
>  def _ParseInstanceCreateRequestVersion1(data, dry_run):
>   """Parses an instance creation request version 1.
>
> -  @rtype: L{opcodes.OpCreateInstance}
> +  @rtype: L{opcodes.OpInstanceCreate}
>   @return: Instance creation opcode
>
>   """
> @@ -769,7 +769,7 @@ def _ParseInstanceCreateRequestVersion1(data, dry_run):
>   beparams = baserlib.CheckParameter(data, "beparams", default={})
>   utils.ForceDictType(beparams, constants.BES_PARAMETER_TYPES)
>
> -  return opcodes.OpCreateInstance(
> +  return opcodes.OpInstanceCreate(
>     mode=baserlib.CheckParameter(data, "mode"),
>     instance_name=baserlib.CheckParameter(data, "name"),
>     os_type=baserlib.CheckParameter(data, "os"),
> @@ -831,7 +831,7 @@ class R_2_instances(baserlib.R_Generic):
>
>     Request data version 0 is deprecated and should not be used anymore.
>
> -    @rtype: L{opcodes.OpCreateInstance}
> +    @rtype: L{opcodes.OpInstanceCreate}
>     @return: Instance creation opcode
>
>     """
> @@ -865,7 +865,7 @@ class R_2_instances(baserlib.R_Generic):
>       nics[0]["bridge"] = fn("bridge")
>
>     # Do not modify anymore, request data version 0 is deprecated
> -    return opcodes.OpCreateInstance(
> +    return opcodes.OpInstanceCreate(
>       mode=constants.INSTANCE_CREATE,
>       instance_name=fn('name'),
>       disks=disks,
> diff --git a/test/ganeti.rapi.rlib2_unittest.py 
> b/test/ganeti.rapi.rlib2_unittest.py
> index 606baf2..f7d51d8 100755
> --- a/test/ganeti.rapi.rlib2_unittest.py
> +++ b/test/ganeti.rapi.rlib2_unittest.py
> @@ -118,7 +118,7 @@ class 
> TestParseInstanceCreateRequestVersion1(testutils.GanetiTestCase):
>
>                 for dry_run in [False, True]:
>                   op = self.Parse(data, dry_run)
> -                  self.assert_(isinstance(op, opcodes.OpCreateInstance))
> +                  self.assert_(isinstance(op, opcodes.OpInstanceCreate))
>                   self.assertEqual(op.mode, mode)
>                   self.assertEqual(op.disk_template, disk_template)
>                   self.assertEqual(op.dry_run, dry_run)
> diff --git a/tools/burnin b/tools/burnin
> index 3adbe83..d6ab042 100755
> --- a/tools/burnin
> +++ b/tools/burnin
> @@ -564,7 +564,7 @@ class Burner(object):
>
>       Log(msg, indent=2)
>
> -      op = opcodes.OpCreateInstance(instance_name=instance,
> +      op = opcodes.OpInstanceCreate(instance_name=instance,
>                                     disks = [ {"size": size}
>                                               for size in self.disk_size],
>                                     disk_template=self.opts.disk_template,
> @@ -718,7 +718,7 @@ class Burner(object):
>       rem_op = opcodes.OpRemoveInstance(instance_name=instance,
>                                         ignore_failures=True)
>       imp_dir = utils.PathJoin(constants.EXPORT_DIR, full_name)
> -      imp_op = opcodes.OpCreateInstance(instance_name=instance,
> +      imp_op = opcodes.OpInstanceCreate(instance_name=instance,
>                                         disks = [ {"size": size}
>                                                   for size in self.disk_size],
>                                         disk_template=self.opts.disk_template,
> --
> 1.7.2.3

LGTM

>
>

Reply via email to