From 71d6909ce3f78925017a1d288b8746a6bae6821b Mon Sep 17 00:00:00 2001 From: Oleg Gelbukh Date: Wed, 3 Feb 2016 10:20:51 +0000 Subject: [PATCH] Change names of backup and restore commands according to spec Change command for backup Fuel Admin node configuration to 'fuel-backup'. Change command for restore Fuel Admin node configuration to 'fuel-restore'. Change-Id: Ifdfbd1ba0097f92a148a46f35d11a216e2c195a7 Blueprint: create-standalone-script-to-backup-masternode Closes-bug: 1538064 (cherry picked from commit b50a25cab4125bae0a4cb47db2019cdba412f02b) --- octane/tests/test_backup.py | 4 ++-- octane/tests/test_restore.py | 2 +- setup.cfg | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/octane/tests/test_backup.py b/octane/tests/test_backup.py index ddb364fb..8db06590 100644 --- a/octane/tests/test_backup.py +++ b/octane/tests/test_backup.py @@ -18,7 +18,7 @@ from octane.commands import backup def test_parser_empty(mocker, octane_app): m1 = mocker.patch('octane.commands.backup.backup_admin_node') m1.return_value = 2 - octane_app.run(["backup"]) + octane_app.run(["fuel-backup"]) assert not octane_app.stdout.getvalue() assert not octane_app.stderr.getvalue() m1.assert_called_once_with(None) @@ -27,7 +27,7 @@ def test_parser_empty(mocker, octane_app): def test_parser_not_empty(mocker, octane_app): m1 = mocker.patch('octane.commands.backup.backup_admin_node') m1.return_value = 2 - octane_app.run(["backup", "--to", "backup_file"]) + octane_app.run(["fuel-backup", "--to", "backup_file"]) assert not octane_app.stdout.getvalue() assert not octane_app.stderr.getvalue() m1.assert_called_once_with("backup_file") diff --git a/octane/tests/test_restore.py b/octane/tests/test_restore.py index ecff1227..f48af18b 100644 --- a/octane/tests/test_restore.py +++ b/octane/tests/test_restore.py @@ -26,7 +26,7 @@ def test_parser(mocker, octane_app, params, call_params, is_file): restore_mock = mocker.patch('octane.commands.restore.restore_admin_node') mocker.patch("os.path.isfile", return_value=is_file) try: - octane_app.run(["restore"] + params) + octane_app.run(["fuel-restore"] + params) except Exception: assert not restore_mock.called assert call_params is None diff --git a/setup.cfg b/setup.cfg index 33a2b62a..1c74c02e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -48,8 +48,8 @@ octane = sync-images = octane.commands.sync_images:SyncImagesCommand sync-images-prepare = octane.commands.sync_images:SyncImagesPrepareCommand update-plugin-settings = octane.commands.update_plugin_settings:UpdatePluginSettingsCommand [zabbix] - backup = octane.commands.backup:BackupCommand - restore = octane.commands.restore:RestoreCommand + fuel-backup = octane.commands.backup:BackupCommand + fuel-restore = octane.commands.restore:RestoreCommand octane.handlers.upgrade = controller = octane.handlers.upgrade.controller:ControllerUpgrade compute = octane.handlers.upgrade.compute:ComputeUpgrade