Commit e1530b10 authored by Iustin Pop's avatar Iustin Pop

Rename OpCreateInstance and LUCreateInstance

Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
parent cc0dec7b
......@@ -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
......
......@@ -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
......
......@@ -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,
......
......@@ -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,
......
......@@ -6775,7 +6775,7 @@ def _CheckOSParams(lu, required, nodenames, osname, osparams):
osname, node)
class LUCreateInstance(LogicalUnit):
class LUInstanceCreate(LogicalUnit):
"""Create an instance.
"""
......
......@@ -744,7 +744,7 @@ class OpNodeEvacuationStrategy(OpCode):
# instance opcodes
class OpCreateInstance(OpCode):
class OpInstanceCreate(OpCode):
"""Create an instance.
@ivar instance_name: Instance name
......
......@@ -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,
......
......@@ -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)
......
......@@ -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,
......
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