From 779fc78b03d272d2d86cd11bf4f012e11f60c30d Mon Sep 17 00:00:00 2001 From: Rajat Venkatesh Date: Thu, 21 May 2015 19:46:28 +0530 Subject: [PATCH] chg: dev: Change snapshot to snapshots --- qds_sdk/cluster.py | 2 +- tests/test_cluster.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/qds_sdk/cluster.py b/qds_sdk/cluster.py index dfe6e5c7..b0e6b4a3 100644 --- a/qds_sdk/cluster.py +++ b/qds_sdk/cluster.py @@ -534,7 +534,7 @@ def snapshot(cls, cluster_id_label, s3_location, backup_type): parameters['s3_location'] = s3_location if backup_type: parameters['backup_type'] = backup_type - return conn.post(cls.element_path(cluster_id_label) + "/snapshot", data=parameters) + return conn.post(cls.element_path(cluster_id_label) + "/snapshots", data=parameters) @classmethod def restore_point(cls, cluster_id_label, s3_location, backup_id, table_names, overwrite=True, automatic=True): diff --git a/tests/test_cluster.py b/tests/test_cluster.py index 80089a36..7013754b 100644 --- a/tests/test_cluster.py +++ b/tests/test_cluster.py @@ -1574,7 +1574,7 @@ def test_snapshot(self): print_command() Connection._api_call = Mock(return_value={}) qds.main() - Connection._api_call.assert_called_with('POST', 'clusters/1234/snapshot', {'s3_location':'myString', 'backup_type':'full'}) + Connection._api_call.assert_called_with('POST', 'clusters/1234/snapshots', {'s3_location':'myString', 'backup_type':'full'}) def test_snapshot_with_no_label(self): sys.argv = ['qds.py', 'cluster', 'snapshot', '--s3_location', 'myString', '--backup_type', 'full'] @@ -1595,7 +1595,7 @@ def test_snapshot_with_no_backup_type(self): print_command() Connection._api_call = Mock(return_value={}) qds.main() - Connection._api_call.assert_called_with('POST', 'clusters/1234/snapshot', {'s3_location':'myString'}) + Connection._api_call.assert_called_with('POST', 'clusters/1234/snapshots', {'s3_location':'myString'}) def test_restore_point(self): sys.argv = ['qds.py', 'cluster', 'restore_point', '--label', '1234', '--s3_location', 'myString', '--backup_id', 'abcd', '--table_names', 'tablename']