@require_context
def snapshot_get_all_active_by_window(context, begin, end=None, project_id=None):
 query = model_query(context, models.Snapshot, read_deleted='yes')
 query = query.filter(or_((models.Snapshot.deleted_at == None), (models.Snapshot.deleted_at > begin)))
 query = query.options(joinedload(models.Snapshot.volume))
 query = query.options(joinedload('snapshot_metadata'))
 if end:
  query = query.filter((models.Snapshot.created_at < end))
 if project_id:
  query = query.filter_by(project_id=project_id)
 return query.all()

@ require_context def snapshot_get_all_active_by_window ( context , begin , end = None , project_id = None ) : query = model_query ( context , models . Snapshot , read_deleted = 'yes' ) query = query . filter ( or_ ( ( models . Snapshot . deleted_at == None ) , ( models . Snapshot . deleted_at > begin ) ) ) query = query . options ( joinedload ( models . Snapshot . volume ) ) query = query . options ( joinedload ( 'snapshot_metadata' ) ) if end : query = query . filter ( ( models . Snapshot . created_at < end ) ) if project_id : query = query . filter_by ( project_id = project_id ) return query . all ( )
get all the snapshots inside the window .