summaryrefslogtreecommitdiff
path: root/novaclient/base.py
diff options
context:
space:
mode:
Diffstat (limited to 'novaclient/base.py')
-rw-r--r--novaclient/base.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/novaclient/base.py b/novaclient/base.py
index 74c7e2fe..a07bd249 100644
--- a/novaclient/base.py
+++ b/novaclient/base.py
@@ -274,6 +274,9 @@ class BootingManagerWithFind(ManagerWithFind):
"""Like a `ManagerWithFind`, but has the ability to boot servers."""
def _parse_block_device_mapping(self, block_device_mapping):
+ """Parses legacy block device mapping."""
+ # FIXME(andreykurilin): make it work with block device mapping v2
+
bdm = []
for device_name, mapping in six.iteritems(block_device_mapping):
@@ -285,15 +288,9 @@ class BootingManagerWithFind(ManagerWithFind):
mapping_parts = mapping.split(':')
source_id = mapping_parts[0]
- bdm_dict['uuid'] = source_id
- bdm_dict['boot_index'] = 0
- if len(mapping_parts) == 1:
- bdm_dict['volume_id'] = source_id
- bdm_dict['source_type'] = 'volume'
- elif len(mapping_parts) > 1:
+ if len(mapping_parts) > 1:
source_type = mapping_parts[1]
- bdm_dict['source_type'] = source_type
if source_type.startswith('snap'):
bdm_dict['snapshot_id'] = source_id
else: