Merge "Fix volume backup show by name"
This commit is contained in:
commit
a631014551
@ -544,7 +544,7 @@ class TestBackupShow(volume_fakes.TestVolume):
|
||||
def setUp(self):
|
||||
super().setUp()
|
||||
|
||||
self.volume_sdk_client.get_backup.return_value = self.backup
|
||||
self.volume_sdk_client.find_backup.return_value = self.backup
|
||||
# Get the command object to test
|
||||
self.cmd = volume_backup.ShowVolumeBackup(self.app, None)
|
||||
|
||||
@ -554,7 +554,7 @@ class TestBackupShow(volume_fakes.TestVolume):
|
||||
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
|
||||
|
||||
columns, data = self.cmd.take_action(parsed_args)
|
||||
self.volume_sdk_client.get_backup.assert_called_with(self.backup.id)
|
||||
self.volume_sdk_client.find_backup.assert_called_with(self.backup.id)
|
||||
|
||||
self.assertEqual(self.columns, columns)
|
||||
self.assertEqual(self.data, data)
|
||||
|
@ -879,7 +879,7 @@ class TestBackupShow(volume_fakes.TestVolume):
|
||||
def setUp(self):
|
||||
super().setUp()
|
||||
|
||||
self.volume_sdk_client.get_backup.return_value = self.backup
|
||||
self.volume_sdk_client.find_backup.return_value = self.backup
|
||||
# Get the command object to test
|
||||
self.cmd = volume_backup.ShowVolumeBackup(self.app, None)
|
||||
|
||||
@ -889,7 +889,7 @@ class TestBackupShow(volume_fakes.TestVolume):
|
||||
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
|
||||
|
||||
columns, data = self.cmd.take_action(parsed_args)
|
||||
self.volume_sdk_client.get_backup.assert_called_with(self.backup.id)
|
||||
self.volume_sdk_client.find_backup.assert_called_with(self.backup.id)
|
||||
|
||||
self.assertEqual(self.columns, columns)
|
||||
self.assertEqual(self.data, data)
|
||||
|
@ -439,7 +439,7 @@ class ShowVolumeBackup(command.ShowOne):
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
volume_client = self.app.client_manager.sdk_connection.volume
|
||||
backup = volume_client.get_backup(parsed_args.backup)
|
||||
backup = volume_client.find_backup(parsed_args.backup)
|
||||
columns = (
|
||||
"availability_zone",
|
||||
"container",
|
||||
|
@ -645,7 +645,7 @@ class ShowVolumeBackup(command.ShowOne):
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
volume_client = self.app.client_manager.sdk_connection.volume
|
||||
backup = volume_client.get_backup(parsed_args.backup)
|
||||
backup = volume_client.find_backup(parsed_args.backup)
|
||||
columns = (
|
||||
"availability_zone",
|
||||
"container",
|
||||
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
Fixed the ``openstack volume backup show`` command
|
||||
to show a backup by name.
|
Loading…
Reference in New Issue
Block a user