Revision e1530b10
b/doc/design-2.0.rst | ||
---|---|---|
961 | 961 |
The parameter changes will have impact on the OpCodes, especially on |
962 | 962 |
the following ones: |
963 | 963 |
|
964 |
- ``OpCreateInstance``, where the new hv and be parameters will be sent
|
|
964 |
- ``OpInstanceCreate``, where the new hv and be parameters will be sent
|
|
965 | 965 |
as dictionaries; note that all hv and be parameters are now optional, |
966 | 966 |
as the values can be instead taken from the cluster |
967 | 967 |
- ``OpQueryInstances``, where we have to be able to query these new |
b/doc/design-2.2.rst | ||
---|---|---|
317 | 317 |
instance move with the key received from the source cluster and |
318 | 318 |
receives the public part of the destination's encryption key |
319 | 319 |
|
320 |
- The current API to create instances (``OpCreateInstance``) will be
|
|
320 |
- The current API to create instances (``OpInstanceCreate``) will be
|
|
321 | 321 |
extended to support an import from a remote cluster. |
322 | 322 |
- A valid, unexpired X509 certificate signed with the destination |
323 | 323 |
cluster's secret will be required. By verifying the signature, we |
... | ... | |
725 | 725 |
|
726 | 726 |
For the blacklisted OSes, they are also not shown (unless the |
727 | 727 |
blacklisted state is requested), and they are also prevented from |
728 |
installation via ``OpCreateInstance`` (in create mode).
|
|
728 |
installation via ``OpInstanceCreate`` (in create mode).
|
|
729 | 729 |
|
730 | 730 |
Both these attributes are per-OS, not per-variant. Thus they apply to |
731 | 731 |
all of an OS' variants, and it's impossible to blacklist or hide just |
b/lib/cli.py | ||
---|---|---|
2054 | 2054 |
else: |
2055 | 2055 |
raise errors.ProgrammerError("Invalid creation mode %s" % mode) |
2056 | 2056 |
|
2057 |
op = opcodes.OpCreateInstance(instance_name=instance,
|
|
2057 |
op = opcodes.OpInstanceCreate(instance_name=instance,
|
|
2058 | 2058 |
disks=disks, |
2059 | 2059 |
disk_template=opts.disk_template, |
2060 | 2060 |
nics=nics, |
b/lib/client/gnt_instance.py | ||
---|---|---|
409 | 409 |
elif not tmp_nics: |
410 | 410 |
tmp_nics = [{}] |
411 | 411 |
|
412 |
op = opcodes.OpCreateInstance(instance_name=name,
|
|
412 |
op = opcodes.OpInstanceCreate(instance_name=name,
|
|
413 | 413 |
disks=disks, |
414 | 414 |
disk_template=specs['template'], |
415 | 415 |
mode=constants.INSTANCE_CREATE, |
b/lib/cmdlib.py | ||
---|---|---|
6775 | 6775 |
osname, node) |
6776 | 6776 |
|
6777 | 6777 |
|
6778 |
class LUCreateInstance(LogicalUnit):
|
|
6778 |
class LUInstanceCreate(LogicalUnit):
|
|
6779 | 6779 |
"""Create an instance. |
6780 | 6780 |
|
6781 | 6781 |
""" |
b/lib/opcodes.py | ||
---|---|---|
744 | 744 |
|
745 | 745 |
# instance opcodes |
746 | 746 |
|
747 |
class OpCreateInstance(OpCode):
|
|
747 |
class OpInstanceCreate(OpCode):
|
|
748 | 748 |
"""Create an instance. |
749 | 749 |
|
750 | 750 |
@ivar instance_name: Instance name |
b/lib/rapi/rlib2.py | ||
---|---|---|
707 | 707 |
def _ParseInstanceCreateRequestVersion1(data, dry_run): |
708 | 708 |
"""Parses an instance creation request version 1. |
709 | 709 |
|
710 |
@rtype: L{opcodes.OpCreateInstance}
|
|
710 |
@rtype: L{opcodes.OpInstanceCreate}
|
|
711 | 711 |
@return: Instance creation opcode |
712 | 712 |
|
713 | 713 |
""" |
... | ... | |
769 | 769 |
beparams = baserlib.CheckParameter(data, "beparams", default={}) |
770 | 770 |
utils.ForceDictType(beparams, constants.BES_PARAMETER_TYPES) |
771 | 771 |
|
772 |
return opcodes.OpCreateInstance(
|
|
772 |
return opcodes.OpInstanceCreate(
|
|
773 | 773 |
mode=baserlib.CheckParameter(data, "mode"), |
774 | 774 |
instance_name=baserlib.CheckParameter(data, "name"), |
775 | 775 |
os_type=baserlib.CheckParameter(data, "os"), |
... | ... | |
831 | 831 |
|
832 | 832 |
Request data version 0 is deprecated and should not be used anymore. |
833 | 833 |
|
834 |
@rtype: L{opcodes.OpCreateInstance}
|
|
834 |
@rtype: L{opcodes.OpInstanceCreate}
|
|
835 | 835 |
@return: Instance creation opcode |
836 | 836 |
|
837 | 837 |
""" |
... | ... | |
865 | 865 |
nics[0]["bridge"] = fn("bridge") |
866 | 866 |
|
867 | 867 |
# Do not modify anymore, request data version 0 is deprecated |
868 |
return opcodes.OpCreateInstance(
|
|
868 |
return opcodes.OpInstanceCreate(
|
|
869 | 869 |
mode=constants.INSTANCE_CREATE, |
870 | 870 |
instance_name=fn('name'), |
871 | 871 |
disks=disks, |
b/test/ganeti.rapi.rlib2_unittest.py | ||
---|---|---|
118 | 118 |
|
119 | 119 |
for dry_run in [False, True]: |
120 | 120 |
op = self.Parse(data, dry_run) |
121 |
self.assert_(isinstance(op, opcodes.OpCreateInstance))
|
|
121 |
self.assert_(isinstance(op, opcodes.OpInstanceCreate))
|
|
122 | 122 |
self.assertEqual(op.mode, mode) |
123 | 123 |
self.assertEqual(op.disk_template, disk_template) |
124 | 124 |
self.assertEqual(op.dry_run, dry_run) |
b/tools/burnin | ||
---|---|---|
564 | 564 |
|
565 | 565 |
Log(msg, indent=2) |
566 | 566 |
|
567 |
op = opcodes.OpCreateInstance(instance_name=instance,
|
|
567 |
op = opcodes.OpInstanceCreate(instance_name=instance,
|
|
568 | 568 |
disks = [ {"size": size} |
569 | 569 |
for size in self.disk_size], |
570 | 570 |
disk_template=self.opts.disk_template, |
... | ... | |
718 | 718 |
rem_op = opcodes.OpRemoveInstance(instance_name=instance, |
719 | 719 |
ignore_failures=True) |
720 | 720 |
imp_dir = utils.PathJoin(constants.EXPORT_DIR, full_name) |
721 |
imp_op = opcodes.OpCreateInstance(instance_name=instance,
|
|
721 |
imp_op = opcodes.OpInstanceCreate(instance_name=instance,
|
|
722 | 722 |
disks = [ {"size": size} |
723 | 723 |
for size in self.disk_size], |
724 | 724 |
disk_template=self.opts.disk_template, |
Also available in: Unified diff