def delete_flavor_info(metadata, *prefixes):
 for key in system_metadata_flavor_props.keys():
  for prefix in prefixes:
   to_key = ('%sinstance_type_%s' % (prefix, key))
   del metadata[to_key]
 for key in list(metadata.keys()):
  for prefix in prefixes:
   if key.startswith(('%sinstance_type_extra_' % prefix)):
    del metadata[key]
 return metadata

def delete_flavor_info ( metadata , * prefixes ) : for key in system_metadata_flavor_props . keys ( ) : for prefix in prefixes : to_key = ( '%sinstance_type_%s' % ( prefix , key ) ) del metadata [ to_key ] for key in list ( metadata . keys ( ) ) : for prefix in prefixes : if key . startswith ( ( '%sinstance_type_extra_' % prefix ) ) : del metadata [ key ] return metadata
delete flavor instance_type information from instances system_metadata by prefix .