Ejemplo n.º 1
0
    def load_all(cls,
                 context,
                 limit=None,
                 marker=None,
                 sort_keys=None,
                 sort_dir=None,
                 filters=None,
                 project_safe=True,
                 show_deleted=False,
                 show_nested=False):
        '''Retrieve all clusters from database.'''

        records = db_api.cluster_get_all(context,
                                         limit=limit,
                                         marker=marker,
                                         sort_keys=sort_keys,
                                         sort_dir=sort_dir,
                                         filters=filters,
                                         project_safe=project_safe,
                                         show_deleted=show_deleted,
                                         show_nested=show_nested)

        for record in records:
            cluster = cls._from_db_record(context, record)
            yield cluster
Ejemplo n.º 2
0
    def load_all(cls, context, limit=None, marker=None, sort=None,
                 filters=None, project_safe=True):
        '''Retrieve all clusters from database.'''

        records = db_api.cluster_get_all(context, limit=limit, marker=marker,
                                         sort=sort, filters=filters,
                                         project_safe=project_safe)

        for record in records:
            cluster = cls._from_db_record(context, record)
            yield cluster
Ejemplo n.º 3
0
    def load_all(cls, context, limit=None, marker=None, sort_keys=None,
                 sort_dir=None, filters=None, tenant_safe=True,
                 show_deleted=False, show_nested=False):
        '''Retrieve all clusters from database.'''

        records = db_api.cluster_get_all(context, limit, marker, sort_keys,
                                         sort_dir, filters, tenant_safe,
                                         show_deleted, show_nested)

        for record in records:
            cluster = cls._from_db_record(context, record)
            yield cluster
Ejemplo n.º 4
0
    def load_all(cls,
                 context,
                 limit=None,
                 marker=None,
                 sort=None,
                 filters=None,
                 project_safe=True):
        '''Retrieve all clusters from database.'''

        records = db_api.cluster_get_all(context,
                                         limit=limit,
                                         marker=marker,
                                         sort=sort,
                                         filters=filters,
                                         project_safe=project_safe)

        for record in records:
            cluster = cls._from_db_record(context, record)
            yield cluster
Ejemplo n.º 5
0
 def get_all(cls, context, **kwargs):
     objs = db_api.cluster_get_all(context, **kwargs)
     return [cls._from_db_object(context, cls(), obj) for obj in objs]
Ejemplo n.º 6
0
 def get_all(cls, context, **kwargs):
     objs = db_api.cluster_get_all(context, **kwargs)
     return [cls._from_db_object(context, cls(), obj) for obj in objs]