From 39c5eb9e3fe89bf177e513e447f22b62f5e4785c Mon Sep 17 00:00:00 2001 From: Huanxuan Ao Date: Tue, 9 Aug 2016 10:12:04 +0800 Subject: Rename backup commands in volume v1 and v2 Backup commands are used only in volume service now, but "backup" is too generic, users may not know the commands are used for volume from the commands name. By seeing the command name, users can only see the "backup" but do not know which object the backup commands work for. It may confuse users. I think rename "backup" to "volume backup" can depict resource relation and will be helpful for users to know the commands clearly. So add new commands ``volume backup create/delete/ list/show/restore`` to replace the old commands ``backup create/delete/list/show/restore``. And also deprecate old commands. Change-Id: I4f844d9bc48573eb4d17288ce6b8a90cea00d16a Implements: bp backup-snapshot-renamed-for-volume-resource Co-Authored-By: Sheel Rana --- openstackclient/tests/volume/v2/test_backup.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'openstackclient/tests') diff --git a/openstackclient/tests/volume/v2/test_backup.py b/openstackclient/tests/volume/v2/test_backup.py index 3c2b3948..67064352 100644 --- a/openstackclient/tests/volume/v2/test_backup.py +++ b/openstackclient/tests/volume/v2/test_backup.py @@ -77,7 +77,7 @@ class TestBackupCreate(TestBackup): self.backups_mock.create.return_value = self.new_backup # Get the command object to test - self.cmd = backup.CreateBackup(self.app, None) + self.cmd = backup.CreateVolumeBackup(self.app, None) def test_backup_create(self): arglist = [ @@ -154,7 +154,7 @@ class TestBackupDelete(TestBackup): self.backups_mock.delete.return_value = None # Get the command object to mock - self.cmd = backup.DeleteBackup(self.app, None) + self.cmd = backup.DeleteVolumeBackup(self.app, None) def test_backup_delete(self): arglist = [ @@ -281,7 +281,7 @@ class TestBackupList(TestBackup): self.volumes_mock.list.return_value = [self.volume] self.backups_mock.list.return_value = self.backups # Get the command to test - self.cmd = backup.ListBackup(self.app, None) + self.cmd = backup.ListVolumeBackup(self.app, None) def test_backup_list_without_options(self): arglist = [] @@ -317,7 +317,7 @@ class TestBackupRestore(TestBackup): self.volumes_mock.get.return_value = self.volume self.restores_mock.restore.return_value = None # Get the command object to mock - self.cmd = backup.RestoreBackup(self.app, None) + self.cmd = backup.RestoreVolumeBackup(self.app, None) def test_backup_restore(self): arglist = [ @@ -370,7 +370,7 @@ class TestBackupShow(TestBackup): self.backups_mock.get.return_value = self.backup # Get the command object to test - self.cmd = backup.ShowBackup(self.app, None) + self.cmd = backup.ShowVolumeBackup(self.app, None) def test_backup_show(self): arglist = [ -- cgit v1.2.1