@require_admin_context
def volume_type_qos_specs_get(context, type_id):
 session = get_session()
 with session.begin():
  _volume_type_get(context, type_id, session)
  row = session.query(models.VolumeTypes).options(joinedload('qos_specs')).filter_by(id=type_id).first()
  specs = _dict_with_qos_specs(row.qos_specs)
  if (not specs):
   specs = None
  else:
   specs = specs[0]
  return {'qos_specs': specs}

@ require_admin_context def volume_type_qos_specs_get ( context , type_id ) : session = get_session ( ) with session . begin ( ) : _volume_type_get ( context , type_id , session ) row = session . query ( models . VolumeTypes ) . options ( joinedload ( 'qos_specs' ) ) . filter_by ( id = type_id ) . first ( ) specs = _dict_with_qos_specs ( row . qos_specs ) if ( not specs ) : specs = None else : specs = specs [ 0 ] return { 'qos_specs' : specs }
get all qos specs for given volume type .