@require_context
def snapshot_get_all_by_project(context, project_id, filters=None, marker=None, limit=None, sort_keys=None, sort_dirs=None, offset=None):
 if (filters and (not is_valid_model_filters(models.Snapshot, filters))):
  return []
 authorize_project_context(context, project_id)
 filters = (filters.copy() if filters else {})
 filters['project_id'] = project_id
 session = get_session()
 with session.begin():
  query = _generate_paginate_query(context, session, marker, limit, sort_keys, sort_dirs, filters, offset, models.Snapshot)
 if (not query):
  return []
 query = query.options(joinedload('snapshot_metadata'))
 return query.all()

@ require_context def snapshot_get_all_by_project ( context , project_id , filters = None , marker = None , limit = None , sort_keys = None , sort_dirs = None , offset = None ) : if ( filters and ( not is_valid_model_filters ( models . Snapshot , filters ) ) ) : return [ ] authorize_project_context ( context , project_id ) filters = ( filters . copy ( ) if filters else { } ) filters [ 'project_id' ] = project_id session = get_session ( ) with session . begin ( ) : query = _generate_paginate_query ( context , session , marker , limit , sort_keys , sort_dirs , filters , offset , models . Snapshot ) if ( not query ) : return [ ] query = query . options ( joinedload ( 'snapshot_metadata' ) ) return query . all ( )
get all snapshots belonging to a project .