Skip to content

Commit

Permalink
Remove testing of bdm v1 in boot from volume tests
Browse files Browse the repository at this point in the history
The BDM v1 payload in Nova is really really old, and we don't even
document it anywhere anymore (it's actually unclear if this was ever
documented).

Just use the BDM v2 payload, don't run all these tests twice.

Change-Id: I1be3c16e499ac0131b24b889f17361d4a1835f02
  • Loading branch information
sdague committed Feb 27, 2017
1 parent 18026ce commit d571e03
Showing 1 changed file with 7 additions and 21 deletions.
28 changes: 7 additions & 21 deletions tempest/scenario/test_volume_boot_pattern.py
Expand Up @@ -43,16 +43,13 @@ def _create_volume_from_image(self):
return self.create_volume(name=vol_name, imageRef=img_uuid)

def _get_bdm(self, source_id, source_type, delete_on_termination=False):
# NOTE(gfidente): the syntax for block_device_mapping is
# dev_name=id:type:size:delete_on_terminate
# where type needs to be "snap" if the server is booted
# from a snapshot, size instead can be safely left empty

bd_map = [{
'device_name': 'vda',
'{}_id'.format(source_type): source_id,
'delete_on_termination': str(int(delete_on_termination))}]
return {'block_device_mapping': bd_map}
bd_map_v2 = [{
'uuid': source_id,
'source_type': source_type,
'destination_type': 'volume',
'boot_index': 0,
'delete_on_termination': delete_on_termination}]
return {'block_device_mapping_v2': bd_map_v2}

def _boot_instance_from_resource(self, source_id,
source_type,
Expand Down Expand Up @@ -236,14 +233,3 @@ def test_create_ebs_image_and_check_boot(self):

# delete instance
self._delete_server(instance)


class TestVolumeBootPatternV2(TestVolumeBootPattern):
def _get_bdm(self, source_id, source_type, delete_on_termination=False):
bd_map_v2 = [{
'uuid': source_id,
'source_type': source_type,
'destination_type': 'volume',
'boot_index': 0,
'delete_on_termination': delete_on_termination}]
return {'block_device_mapping_v2': bd_map_v2}

0 comments on commit d571e03

Please sign in to comment.