def load_all(cls, context, limit=None, marker=None, sort=None, filters=None, project_safe=True): """Retrieve all policies from database.""" records = db_api.policy_get_all(context, limit=limit, marker=marker, sort=sort, filters=filters, project_safe=project_safe) for record in records: yield cls._from_db_record(record)
def load_all(cls, context, limit=None, sort_keys=None, marker=None, sort_dir=None, filters=None, show_deleted=False): '''Retrieve all policies from database.''' records = db_api.policy_get_all(context, limit=limit, marker=marker, sort_keys=sort_keys, sort_dir=sort_dir, filters=filters, show_deleted=show_deleted) for record in records: yield cls._from_db_record(context, record)
def load_all(cls, context, limit=None, sort_keys=None, marker=None, sort_dir=None, filters=None, show_deleted=False): '''Retrieve all policies from database.''' records = db_api.policy_get_all(context, limit=limit, marker=marker, sort_keys=sort_keys, sort_dir=sort_dir, filters=filters, show_deleted=show_deleted) for record in records: yield cls._from_db_record(record)
def get_all(cls, context, **kwargs): objs = db_api.policy_get_all(context, **kwargs) return [cls._from_db_object(context, cls(), obj) for obj in objs]