Пример #1
0
    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)
Пример #2
0
    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)
Пример #3
0
    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)
Пример #4
0
    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)
Пример #5
0
 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]