<s> """<STR_LIT>""" <EOL> import unittest <EOL> from cafe . drivers . unittest . decorators import tags <EOL> from cloudcafe . common . tools . datagen import rand_name <EOL> from cloudcafe . compute . common . exceptions import BadRequest <EOL> from cloudroast . compute . fixtures import ServerFromVolumeV2Fixture <EOL> class CreateVolumeServerNegativeTest ( ServerFromVolumeV2Fixture ) : <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> @ tags ( type = '<STR_LIT>' , net = '<STR_LIT>' ) <EOL> def test_delete_on_terminate_invalid ( self ) : <EOL> """<STR_LIT>""" <EOL> self . block_data = self . server_behaviors . create_block_device_mapping_v2 ( <EOL> boot_index = <NUM_LIT:0> , uuid = self . image_ref , <EOL> volume_size = self . volume_size , <EOL> source_type = '<STR_LIT:image>' , destination_type = '<STR_LIT>' , <EOL> delete_on_termination = '<STR_LIT>' ) <EOL> with self . assertRaises ( BadRequest ) : <EOL> self . boot_from_volume_client . create_server ( <EOL> block_device_mapping_v2 = self . block_data , <EOL> flavor_ref = self . flavors_config . primary_flavor , <EOL> name = rand_name ( "<STR_LIT>" ) ) <EOL> @ tags ( type = '<STR_LIT>' , net = '<STR_LIT>' ) <EOL> def test_source_type_invalid ( self ) : <EOL> """<STR_LIT>""" <EOL> self . block_data = self . server_behaviors . create_block_device_mapping_v2 ( <EOL> boot_index = <NUM_LIT:0> , uuid = self . image_ref , <EOL> volume_size = self . volume_size , <EOL> source_type = '<STR_LIT>' , destination_type = '<STR_LIT>' , <EOL> delete_on_termination = True ) <EOL> with self . assertRaises ( BadRequest ) : <EOL> self . boot_from_volume_client . create_server ( <EOL> block_device_mapping_v2 = self . block_data , <EOL> flavor_ref = self . flavors_config . primary_flavor , <EOL> name = rand_name ( "<STR_LIT>" ) ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> @ tags ( type = '<STR_LIT>' , net = '<STR_LIT>' ) <EOL> def test_boot_from_concurent_sources_with_image_ref_invalid ( self ) : <EOL> """<STR_LIT>""" <EOL> self . block_data = self . server_behaviors . create_block_device_mapping_v2 ( <EOL> boot_index = <NUM_LIT:0> , uuid = self . image_ref , <EOL> volume_size = self . volume_size , <EOL> source_type = '<STR_LIT:image>' , destination_type = '<STR_LIT>' , <EOL> delete_on_termination = True ) <EOL> with self . assertRaises ( BadRequest ) : <EOL> self . boot_from_volume_client . create_server ( <EOL> block_device_mapping_v2 = self . block_data , <EOL> flavor_ref = self . flavors_config . primary_flavor , <EOL> name = rand_name ( "<STR_LIT>" ) , <EOL> image_ref = self . image_ref ) <EOL> @ tags ( type = '<STR_LIT>' , net = '<STR_LIT>' ) <EOL> def test_flavor_invalid ( self ) : <EOL> """<STR_LIT>""" <EOL> self . block_data = self . server_behaviors . create_block_device_mapping_v2 ( <EOL> boot_index = <NUM_LIT:0> , uuid = self . image_ref , <EOL> volume_size = self . volume_size , <EOL> source_type = '<STR_LIT:image>' , destination_type = '<STR_LIT>' , <EOL> delete_on_termination = True ) <EOL> with self . assertRaises ( BadRequest ) : <EOL> self . boot_from_volume_client . create_server ( <EOL> block_device_mapping_v2 = self . block_data , <EOL> flavor_ref = '<STR_LIT>' , <EOL> name = rand_name ( "<STR_LIT>" ) ) </s>
