@require_context
def volume_type_get_by_name(context, name, session=None):
 result = model_query(context, models.VolumeTypes, session=session).options(joinedload('extra_specs')).filter_by(name=name).first()
 if (not result):
  raise exception.VolumeTypeNotFoundByName(volume_type_name=name)
 else:
  return _dict_with_extra_specs(result)

@ require_context def volume_type_get_by_name ( context , name , session = None ) : result = model_query ( context , models . VolumeTypes , session = session ) . options ( joinedload ( 'extra_specs' ) ) . filter_by ( name = name ) . first ( ) if ( not result ) : raise exception . VolumeTypeNotFoundByName ( volume_type_name = name ) else : return _dict_with_extra_specs ( result )
get volume type by name .