diff --git a/novaclient/tests/v3/test_shell.py b/novaclient/tests/v3/test_shell.py index 9f34ee6ef..edd09580d 100644 --- a/novaclient/tests/v3/test_shell.py +++ b/novaclient/tests/v3/test_shell.py @@ -337,7 +337,7 @@ class ShellTest(utils.TestCase): {'server': { 'flavor_ref': '1', 'name': 'some-server', - 'os-block-device-mapping:block_device_mapping': [ + 'block_device_mapping': [ { 'volume_id': 'blah', 'delete_on_termination': '0', @@ -366,7 +366,7 @@ class ShellTest(utils.TestCase): {'server': { 'flavor_ref': '1', 'name': 'some-server', - 'os-block-device-mapping:block_device_mapping': [ + 'block_device_mapping': [ {'device_name': 'id', 'volume_id': id, 'source_type': 'volume', 'boot_index': 0, 'uuid': id}], 'image_ref': '1', diff --git a/novaclient/v3/servers.py b/novaclient/v3/servers.py index 0d017f689..70bc5a54b 100644 --- a/novaclient/v3/servers.py +++ b/novaclient/v3/servers.py @@ -437,11 +437,12 @@ class ServerManager(base.BootingManagerWithFind): # Block device mappings are passed as a list of dictionaries if block_device_mapping: - bdm_param = 'os-block-device-mapping:block_device_mapping' + bdm_param = 'block_device_mapping' body['server'][bdm_param] = \ self._parse_block_device_mapping(block_device_mapping) elif block_device_mapping_v2: # Append the image to the list only if we have new style BDMs + bdm_param = 'block_device_mapping_v2' if image: bdm_dict = {'uuid': image.id, 'source_type': 'image', 'destination_type': 'local', 'boot_index': 0,