Skip to content

Commit 442838e

Browse files
committed
compute: Use correct command class for 'show migration'
We should be inheriting from 'ShowOne'. Failure to do so results in a tuple being dumped to the screen. Not what we intended. While we're here, we update the docstring of this command to clarify the command's intent. Nova does not provide an API to retrieve an individual migration record for a cold migration or completed live migration. As such, the 'server migration show' command only works for in-progress live-migrations. Change-Id: I2e2fe3da7d642b9e8e3d930603dcde178cd68cde Signed-off-by: Stephen Finucane <sfinucan@redhat.com> Story: 2009658 Task: 43837
1 parent 8cb0a28 commit 442838e

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

openstackclient/compute/v2/server.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2967,8 +2967,13 @@ def take_action(self, parsed_args):
29672967
return self.print_migrations(parsed_args, compute_client, migrations)
29682968

29692969

2970-
class ShowMigration(command.Command):
2971-
"""Show a migration for a given server."""
2970+
class ShowMigration(command.ShowOne):
2971+
"""Show an in-progress live migration for a given server.
2972+
2973+
Note that it is not possible to show cold migrations or completed
2974+
live-migrations. Use 'openstack server migration list' to get details for
2975+
these.
2976+
"""
29722977

29732978
def get_parser(self, prog_name):
29742979
parser = super().get_parser(prog_name)

0 commit comments

Comments
 (0)