#NEWLINE# def _assert_create_volume_with_mandatory_profile( self , profile , created_profile = None , size_GiB = 4 ) : #NEWLINE# #INDENT# '\n        Volume created with given profile has the attributes\n        expected from the profile.\n\n        :param ValueConstant profile: Name of profile to use for creation.\n        :param ValueConstant created_profile: Name of the profile volume is\n            expected to be created with.\n        :param int size_GiB: Size of volume to be created.\n        ' #NEWLINE# if ( created_profile is None ) : #NEWLINE# #INDENT# created_profile = profile #NEWLINE# #UNINDENT# volume1 = self . api . create_volume_with_profile ( dataset_id = uuid4 ( ) , size = ( self . minimum_allocatable_size * size_GiB ) , profile_name = profile . value ) #NEWLINE# cannonical_profile = MandatoryProfiles . lookupByValue ( created_profile . value ) #NEWLINE# A = EBSMandatoryProfileAttributes . lookupByName ( cannonical_profile . name ) . value #NEWLINE# ebs_volume = self . api . _get_ebs_volume ( volume1 . blockdevice_id ) #NEWLINE# self . assertEqual ( ebs_volume . volume_type , A . volume_type . value ) #NEWLINE# requested_iops = A . requested_iops ( ebs_volume . size ) #NEWLINE# self . assertEqual ( ( ebs_volume . iops if ( requested_iops is not None ) else None ) , requested_iops )