@require_context
def _volume_get_query(context, session=None, project_only=False, joined_load=True):
 if (not joined_load):
  return model_query(context, models.Volume, session=session, project_only=project_only)
 if is_admin_context(context):
  return model_query(context, models.Volume, session=session, project_only=project_only).options(joinedload('volume_metadata')).options(joinedload('volume_admin_metadata')).options(joinedload('volume_type')).options(joinedload('volume_attachment')).options(joinedload('consistencygroup')).options(joinedload('group'))
 else:
  return model_query(context, models.Volume, session=session, project_only=project_only).options(joinedload('volume_metadata')).options(joinedload('volume_type')).options(joinedload('volume_attachment')).options(joinedload('consistencygroup')).options(joinedload('group'))

@ require_context def _volume_get_query ( context , session = None , project_only = False , joined_load = True ) : if ( not joined_load ) : return model_query ( context , models . Volume , session = session , project_only = project_only ) if is_admin_context ( context ) : return model_query ( context , models . Volume , session = session , project_only = project_only ) . options ( joinedload ( 'volume_metadata' ) ) . options ( joinedload ( 'volume_admin_metadata' ) ) . options ( joinedload ( 'volume_type' ) ) . options ( joinedload ( 'volume_attachment' ) ) . options ( joinedload ( 'consistencygroup' ) ) . options ( joinedload ( 'group' ) ) else : return model_query ( context , models . Volume , session = session , project_only = project_only ) . options ( joinedload ( 'volume_metadata' ) ) . options ( joinedload ( 'volume_type' ) ) . options ( joinedload ( 'volume_attachment' ) ) . options ( joinedload ( 'consistencygroup' ) ) . options ( joinedload ( 'group' ) )
get the query to retrieve the volume .