Beispiel #1
0
    def get_by_filters(cls,
                       context,
                       filters,
                       limit=None,
                       marker=None,
                       sort_keys=None,
                       sort_dirs=None,
                       columns_to_join=[]):

        option_column = ScheduledOperationState.INSTANCE_OPTIONAL_JOINED_FIELDS
        valid_columns = [
            column for column in columns_to_join if column in option_column
        ]

        db_state_list = db.scheduled_operation_state_get_all_by_filters_sort(
            context,
            filters,
            limit=limit,
            marker=marker,
            sort_keys=sort_keys,
            sort_dirs=sort_dirs,
            columns_to_join=valid_columns)

        return base.obj_make_list(context,
                                  cls(context),
                                  ScheduledOperationState,
                                  db_state_list,
                                  expected_attrs=valid_columns)
Beispiel #2
0
 def get_all(cls, context, marker, limit, sort_keys=None, sort_dirs=None,
             filters=None, offset=None):
     restores = db.restore_get_all(context, marker, limit,
                                   sort_keys=sort_keys, sort_dirs=sort_dirs,
                                   filters=filters, offset=offset)
     return base.obj_make_list(context, cls(context), objects.Restore,
                               restores)
Beispiel #3
0
 def get_all(cls, context, marker, limit, sort_keys=None, sort_dirs=None,
             filters=None, offset=None):
     plans = db.plan_get_all(context, marker, limit,
                             sort_keys=sort_keys, sort_dirs=sort_dirs,
                             filters=filters, offset=offset)
     expected_attrs = ['resources']
     return base.obj_make_list(context, cls(context), objects.Plan,
                               plans, expected_attrs=expected_attrs)
Beispiel #4
0
 def get_all_by_project(cls, context, project_id, marker, limit,
                        sort_keys=None, sort_dirs=None, filters=None,
                        offset=None):
     operation_logs = db.operation_log_get_all_by_project(
         context, project_id, marker, limit, sort_keys=sort_keys,
         sort_dirs=sort_dirs, filters=filters, offset=offset)
     return base.obj_make_list(context, cls(context), objects.OperationLog,
                               operation_logs)
    def get_by_filters(cls, context, filters, limit=None, marker=None,
                       sort_keys=None, sort_dirs=None):

        db_log_list = db.scheduled_operation_log_get_all_by_filters_sort(
            context, filters, limit=limit, marker=marker, sort_keys=sort_keys,
            sort_dirs=sort_dirs)

        return base.obj_make_list(
            context, cls(context), ScheduledOperationLog, db_log_list)
Beispiel #6
0
    def get_by_filters(cls, context, filters, limit=None,
                       marker=None, sort_keys=None, sort_dirs=None):

        db_trigger_list = db.trigger_get_all_by_filters_sort(
            context, filters, limit=limit, marker=marker,
            sort_keys=sort_keys, sort_dirs=sort_dirs)

        return base.obj_make_list(context, cls(context), Trigger,
                                  db_trigger_list)
    def get_by_filters(cls, context, filters, limit=None, marker=None,
                       sort_keys=None, sort_dirs=None, columns_to_join=[]):

        option_column = ScheduledOperationState.INSTANCE_OPTIONAL_JOINED_FIELDS
        valid_columns = [column for column in columns_to_join
                         if column in option_column]

        db_state_list = db.scheduled_operation_state_get_all_by_filters_sort(
            context, filters, limit=limit, marker=marker, sort_keys=sort_keys,
            sort_dirs=sort_dirs, columns_to_join=valid_columns)

        return base.obj_make_list(
            context, cls(context), ScheduledOperationState, db_state_list,
            expected_attrs=valid_columns)
Beispiel #8
0
 def get_all(cls,
             context,
             marker,
             limit,
             sort_keys=None,
             sort_dirs=None,
             filters=None,
             offset=None):
     operation_logs = db.operation_log_get_all(context,
                                               marker,
                                               limit,
                                               sort_keys=sort_keys,
                                               sort_dirs=sort_dirs,
                                               filters=filters,
                                               offset=offset)
     return base.obj_make_list(context, cls(context), objects.OperationLog,
                               operation_logs)
Beispiel #9
0
 def get_all(cls,
             context,
             marker,
             limit,
             sort_keys=None,
             sort_dirs=None,
             filters=None,
             offset=None):
     restores = db.restore_get_all(context,
                                   marker,
                                   limit,
                                   sort_keys=sort_keys,
                                   sort_dirs=sort_dirs,
                                   filters=filters,
                                   offset=offset)
     return base.obj_make_list(context, cls(context), objects.Restore,
                               restores)
Beispiel #10
0
    def get_by_filters(cls,
                       context,
                       filters,
                       limit=None,
                       marker=None,
                       sort_keys=None,
                       sort_dirs=None):

        db_trigger_list = db.trigger_get_all_by_filters_sort(
            context,
            filters,
            limit=limit,
            marker=marker,
            sort_keys=sort_keys,
            sort_dirs=sort_dirs)

        return base.obj_make_list(context, cls(context), Trigger,
                                  db_trigger_list)
Beispiel #11
0
    def get_by_filters(cls,
                       context,
                       filters,
                       limit=None,
                       marker=None,
                       sort_keys=None,
                       sort_dirs=None):

        db_operation_list = db.scheduled_operation_get_all_by_filters_sort(
            context,
            filters,
            limit=limit,
            marker=marker,
            sort_keys=sort_keys,
            sort_dirs=sort_dirs)

        return base.obj_make_list(context, cls(context), ScheduledOperation,
                                  db_operation_list)
Beispiel #12
0
 def get_all(cls,
             context,
             marker,
             limit,
             sort_keys=None,
             sort_dirs=None,
             filters=None,
             offset=None):
     plans = db.plan_get_all(context,
                             marker,
                             limit,
                             sort_keys=sort_keys,
                             sort_dirs=sort_dirs,
                             filters=filters,
                             offset=offset)
     expected_attrs = ['resources']
     return base.obj_make_list(context,
                               cls(context),
                               objects.Plan,
                               plans,
                               expected_attrs=expected_attrs)
Beispiel #13
0
 def get_all_by_topic(cls, context, topic, disabled=None):
     services = db.service_get_all_by_topic(context, topic,
                                            disabled=disabled)
     return base.obj_make_list(context, cls(context), objects.Service,
                               services)
Beispiel #14
0
 def get_all(cls, context, filters=None):
     services = db.service_get_all(context, filters)
     return base.obj_make_list(context, cls(context), objects.Service,
                               services)