diff --git a/cinderclient/tests/v1/fakes.py b/cinderclient/tests/v1/fakes.py index 648733c..3df0d95 100644 --- a/cinderclient/tests/v1/fakes.py +++ b/cinderclient/tests/v1/fakes.py @@ -467,13 +467,13 @@ class FakeHTTPClient(base_client.HTTPClient): def get_types_1_encryption(self, **kw): return (200, {}, {'id': 1, 'volume_type_id': 1, 'provider': 'test', 'cipher': 'test', 'key_size': 1, - 'control_location': 'front'}) + 'control_location': 'front-end'}) def get_types_2_encryption(self, **kw): return (200, {}, {}) def post_types_2_encryption(self, body, **kw): - return (200, {}, {'encryption': {}}) + return (200, {}, {'encryption': body}) def put_types_1_encryption_1(self, body, **kw): return (200, {}, {}) diff --git a/cinderclient/tests/v1/test_shell.py b/cinderclient/tests/v1/test_shell.py index 8c2e33d..a7e6f1e 100644 --- a/cinderclient/tests/v1/test_shell.py +++ b/cinderclient/tests/v1/test_shell.py @@ -273,7 +273,7 @@ class ShellTest(utils.TestCase): """ expected = {'encryption': {'cipher': None, 'key_size': None, 'provider': 'TestProvider', - 'control_location': None}} + 'control_location': 'front-end'}} self.run_command('encryption-type-create 2 TestProvider') self.assert_called('POST', '/types/2/encryption', body=expected) self.assert_called_anytime('GET', '/types/2') diff --git a/cinderclient/tests/v2/fakes.py b/cinderclient/tests/v2/fakes.py index 890fa53..826babc 100644 --- a/cinderclient/tests/v2/fakes.py +++ b/cinderclient/tests/v2/fakes.py @@ -478,13 +478,13 @@ class FakeHTTPClient(base_client.HTTPClient): def get_types_1_encryption(self, **kw): return (200, {}, {'id': 1, 'volume_type_id': 1, 'provider': 'test', 'cipher': 'test', 'key_size': 1, - 'control_location': 'front'}) + 'control_location': 'front-end'}) def get_types_2_encryption(self, **kw): return (200, {}, {}) def post_types_2_encryption(self, body, **kw): - return (200, {}, {'encryption': {}}) + return (200, {}, {'encryption': body}) def put_types_1_encryption_1(self, body, **kw): return (200, {}, {}) diff --git a/cinderclient/tests/v2/test_shell.py b/cinderclient/tests/v2/test_shell.py index 4946ada..3c1a011 100644 --- a/cinderclient/tests/v2/test_shell.py +++ b/cinderclient/tests/v2/test_shell.py @@ -251,7 +251,7 @@ class ShellTest(utils.TestCase): """ expected = {'encryption': {'cipher': None, 'key_size': None, 'provider': 'TestProvider', - 'control_location': None}} + 'control_location': 'front-end'}} self.run_command('encryption-type-create 2 TestProvider') self.assert_called('POST', '/types/2/encryption', body=expected) self.assert_called_anytime('GET', '/types/2') diff --git a/cinderclient/v1/shell.py b/cinderclient/v1/shell.py index 02ea769..140d59c 100644 --- a/cinderclient/v1/shell.py +++ b/cinderclient/v1/shell.py @@ -1132,10 +1132,10 @@ def do_encryption_type_show(cs, args): choices=['front-end', 'back-end'], type=str, required=False, - default=None, + default='front-end', help="Notional service where encryption is performed (e.g., " - "front-end=Nova). Values: 'front-end', 'back-end' " - "(Optional, Default=None)") + "front-end=Nova) Values: 'front-end', 'back-end' " + "(Default='front-end')") @utils.service_type('volume') def do_encryption_type_create(cs, args): """Create a new encryption type for a volume type (Admin Only).""" diff --git a/cinderclient/v2/shell.py b/cinderclient/v2/shell.py index 636c812..f57c8e0 100644 --- a/cinderclient/v2/shell.py +++ b/cinderclient/v2/shell.py @@ -1240,10 +1240,10 @@ def do_encryption_type_show(cs, args): choices=['front-end', 'back-end'], type=str, required=False, - default=None, + default='front-end', help="Notional service where encryption is performed (e.g., " - "front-end=Nova). Values: 'front-end', 'back-end' " - "(Optional, Default=None)") + "front-end=Nova) Values: 'front-end', 'back-end' " + "(Default='front-end')") @utils.service_type('volumev2') def do_encryption_type_create(cs, args): """Create a new encryption type for a volume type (Admin Only).""" diff --git a/doc/source/index.rst b/doc/source/index.rst index fc94395..04e70fd 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -33,6 +33,7 @@ Release Notes MASTER ------ .. _1255905: http://bugs.launchpad.net/python-cinderclient/+bug/1255905 +.. _1267168: http://bugs.launchpad.net/python-cinderclient/+bug/1267168 1.0.8 -----