Merge "Add 'openstack server migrate (confirm|revert)' commands"
This commit is contained in:
commit
371f5f5522
@ -1555,7 +1555,15 @@ class LockServer(command.Command):
|
|||||||
# then adding the groups doesn't seem to work
|
# then adding the groups doesn't seem to work
|
||||||
|
|
||||||
class MigrateServer(command.Command):
|
class MigrateServer(command.Command):
|
||||||
_description = _("Migrate server to different host")
|
_description = _("""Migrate server to different host.
|
||||||
|
|
||||||
|
A migrate operation is implemented as a resize operation using the same flavor
|
||||||
|
as the old server. This means that, like resize, migrate works by creating a
|
||||||
|
new server using the same flavor and copying the contents of the original disk
|
||||||
|
into a new one. As with resize, the migrate operation is a two-step process for
|
||||||
|
the user: the first step is to perform the migrate, and the second step is to
|
||||||
|
either confirm (verify) success and release the old server, or to declare a
|
||||||
|
revert to release the new server and restart the old one.""")
|
||||||
|
|
||||||
def get_parser(self, prog_name):
|
def get_parser(self, prog_name):
|
||||||
parser = super(MigrateServer, self).get_parser(prog_name)
|
parser = super(MigrateServer, self).get_parser(prog_name)
|
||||||
@ -2159,10 +2167,10 @@ class ResizeServer(command.Command):
|
|||||||
_description = _("""Scale server to a new flavor.
|
_description = _("""Scale server to a new flavor.
|
||||||
|
|
||||||
A resize operation is implemented by creating a new server and copying the
|
A resize operation is implemented by creating a new server and copying the
|
||||||
contents of the original disk into a new one. It is also a two-step process for
|
contents of the original disk into a new one. It is a two-step process for the
|
||||||
the user: the first is to perform the resize, the second is to either confirm
|
user: the first step is to perform the resize, and the second step is to either
|
||||||
(verify) success and release the old server, or to declare a revert to release
|
confirm (verify) success and release the old server or to declare a revert to
|
||||||
the new server and restart the old one.""")
|
release the new server and restart the old one.""")
|
||||||
|
|
||||||
def get_parser(self, prog_name):
|
def get_parser(self, prog_name):
|
||||||
parser = super(ResizeServer, self).get_parser(prog_name)
|
parser = super(ResizeServer, self).get_parser(prog_name)
|
||||||
@ -2261,6 +2269,12 @@ Confirm (verify) success of resize operation and release the old server.""")
|
|||||||
server.confirm_resize()
|
server.confirm_resize()
|
||||||
|
|
||||||
|
|
||||||
|
class MigrateConfirm(ResizeConfirm):
|
||||||
|
_description = _("""Confirm server migrate.
|
||||||
|
|
||||||
|
Confirm (verify) success of migrate operation and release the old server.""")
|
||||||
|
|
||||||
|
|
||||||
class ResizeRevert(command.Command):
|
class ResizeRevert(command.Command):
|
||||||
_description = _("""Revert server resize.
|
_description = _("""Revert server resize.
|
||||||
|
|
||||||
@ -2286,6 +2300,13 @@ one.""")
|
|||||||
server.revert_resize()
|
server.revert_resize()
|
||||||
|
|
||||||
|
|
||||||
|
class MigrateRevert(ResizeRevert):
|
||||||
|
_description = _("""Revert server migrate.
|
||||||
|
|
||||||
|
Revert the migrate operation. Release the new server and restart the old
|
||||||
|
one.""")
|
||||||
|
|
||||||
|
|
||||||
class RestoreServer(command.Command):
|
class RestoreServer(command.Command):
|
||||||
_description = _("Restore server(s)")
|
_description = _("Restore server(s)")
|
||||||
|
|
||||||
|
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
Add ``server migrate confirm`` and ``server migrate revert`` commands.
|
||||||
|
These are aliases of the ``server resize confirm`` and ``server resize revert``
|
||||||
|
commands, respectively.
|
@ -105,6 +105,8 @@ openstack.compute.v2 =
|
|||||||
server_list = openstackclient.compute.v2.server:ListServer
|
server_list = openstackclient.compute.v2.server:ListServer
|
||||||
server_lock = openstackclient.compute.v2.server:LockServer
|
server_lock = openstackclient.compute.v2.server:LockServer
|
||||||
server_migrate = openstackclient.compute.v2.server:MigrateServer
|
server_migrate = openstackclient.compute.v2.server:MigrateServer
|
||||||
|
server_migrate_confirm = openstackclient.compute.v2.server:MigrateConfirm
|
||||||
|
server_migrate_revert = openstackclient.compute.v2.server:MigrateRevert
|
||||||
server_pause = openstackclient.compute.v2.server:PauseServer
|
server_pause = openstackclient.compute.v2.server:PauseServer
|
||||||
server_reboot = openstackclient.compute.v2.server:RebootServer
|
server_reboot = openstackclient.compute.v2.server:RebootServer
|
||||||
server_rebuild = openstackclient.compute.v2.server:RebuildServer
|
server_rebuild = openstackclient.compute.v2.server:RebuildServer
|
||||||
|
Loading…
Reference in New Issue
Block a user