def get_volume_type_by_name(context, name):
 if (name is None):
  msg = _('name cannot be None')
  raise exception.InvalidVolumeType(reason=msg)
 return db.volume_type_get_by_name(context, name)

def get_volume_type_by_name ( context , name ) : if ( name is None ) : msg = _ ( 'name cannot be None' ) raise exception . InvalidVolumeType ( reason = msg ) return db . volume_type_get_by_name ( context , name )
retrieves single volume type by name .