Use block_device_mapping_v2 when exporting servers
This replaces the block_device_mapping of OS::Nova:Server attribute with a block_device_mapping_v2 attribute. Change-Id: Ibc552069b5e8eab367fb36fdb98a0a8cdfaa9fa0
This commit is contained in:
parent
7d2f8a5703
commit
7d28f871ba
|
@ -453,7 +453,9 @@ class TemplateGenerator(object):
|
|||
resource.add_parameter(volume_parameter_name, description,
|
||||
default=server_volume['id'])
|
||||
if server_volumes:
|
||||
properties['block_device_mapping'] = server_volumes
|
||||
# block_device_mapping_v2 is the new way of associating
|
||||
# block devices to an instance
|
||||
properties['block_device_mapping_v2'] = server_volumes
|
||||
|
||||
resources.append(resource)
|
||||
return resources
|
||||
|
|
|
@ -1612,7 +1612,7 @@ class ServerTests(BaseTestCase):
|
|||
'diskConfig': 'MANUAL',
|
||||
'flavor': {'get_param': 'server_0_flavor'},
|
||||
'key_name': {'get_resource': 'key_0'},
|
||||
'block_device_mapping': [{'volume_id': {
|
||||
'block_device_mapping_v2': [{'volume_id': {
|
||||
'get_resource': 'volume_0'}, 'device_name': 'vda'}]
|
||||
}
|
||||
}
|
||||
|
@ -1656,7 +1656,7 @@ class ServerTests(BaseTestCase):
|
|||
'flavor': {'get_param': 'server_0_flavor'},
|
||||
'image': {'get_param': 'server_0_image'},
|
||||
'key_name': {'get_resource': 'key_0'},
|
||||
'block_device_mapping': [{'volume_id': {
|
||||
'block_device_mapping_v2': [{'volume_id': {
|
||||
'get_resource': 'volume_0'}, 'device_name':
|
||||
'/dev/vdb'}]
|
||||
}
|
||||
|
@ -1862,7 +1862,7 @@ class ServerTests(BaseTestCase):
|
|||
'flavor': {'get_param': 'server_0_flavor'},
|
||||
'image': {'get_param': 'server_0_image'},
|
||||
'key_name': {'get_resource': 'key_0'},
|
||||
'block_device_mapping': [{'volume_id': {
|
||||
'block_device_mapping_v2': [{'volume_id': {
|
||||
'get_param': 'volume_server1_0'}, 'device_name':
|
||||
'/dev/vdb'}]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue