summaryrefslogtreecommitdiff
path: root/openstackclient
diff options
context:
space:
mode:
authorCedric Brandily <zzelle@gmail.com>2016-10-11 22:01:16 +0200
committerCedric Brandily <zzelle@gmail.com>2016-10-11 22:01:16 +0200
commit694a24c3093f5b2595b63ccf988da7972e532084 (patch)
tree7fab551e74a15760fea8795a62e0664edb12969e /openstackclient
parentbfeecd50fdb8f1475d51ac662eb09514a1754345 (diff)
downloadpython-openstackclient-694a24c3093f5b2595b63ccf988da7972e532084.tar.gz
Fix --shared/block-migration options in server migrate command
Currently, --shared-migration and --block-migration options effects are reversed: --block-migration requests a migration with share, --shared-migration a block-migration. This change corrects OSC implementation and clarifies arguments passed to novaclient (the root cause of the bug). Change-Id: Ib682cff0c44d3b1304670f8606907b1762d8b1e7 Closes-Bug: #1518059
Diffstat (limited to 'openstackclient')
-rw-r--r--openstackclient/compute/v2/server.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/openstackclient/compute/v2/server.py b/openstackclient/compute/v2/server.py
index 1ca31497..df46c7df 100644
--- a/openstackclient/compute/v2/server.py
+++ b/openstackclient/compute/v2/server.py
@@ -973,15 +973,15 @@ class MigrateServer(command.Command):
migration_group = parser.add_mutually_exclusive_group()
migration_group.add_argument(
'--shared-migration',
- dest='shared_migration',
- action='store_true',
- default=True,
+ dest='block_migration',
+ action='store_false',
+ default=False,
help=_('Perform a shared live migration (default)'),
)
migration_group.add_argument(
'--block-migration',
- dest='shared_migration',
- action='store_false',
+ dest='block_migration',
+ action='store_true',
help=_('Perform a block live migration'),
)
disk_group = parser.add_mutually_exclusive_group()
@@ -1016,9 +1016,9 @@ class MigrateServer(command.Command):
)
if parsed_args.live:
server.live_migrate(
- parsed_args.live,
- parsed_args.shared_migration,
- parsed_args.disk_overcommit,
+ host=parsed_args.live,
+ block_migration=parsed_args.block_migration,
+ disk_over_commit=parsed_args.disk_overcommit,
)
else:
server.migrate()