Beispiel #1
0
 def DELETE(self, group_id, repo_id, distributor_id):
     """
     Delete a bind association between the specified
     consumer and repo-distributor.  Designed to be idempotent.
     @param group_id: A consumer group ID.
     @type group_id: str
     @param repo_id: A repo ID.
     @type repo_id: str
     @param distributor_id: A distributor ID.
     @type distributor_id: str
     @return: The deleted bind model object:
         {consumer_group_id:<str>, repo_id:<str>, distributor_id:<str>}
         Or, None if bind does not exist.
     @rtype: dict
     """
     unbind_args_tuple = (group_id, repo_id, distributor_id, {})
     async_task = unbind.apply_async(unbind_args_tuple)
     raise pulp_exceptions.OperationPostponed(async_task)
Beispiel #2
0
    def DELETE(self, group_id, repo_id, distributor_id):
        """
        Delete a bind association between the consumers belonging to the specified
        consumer group and repo-distributor. Designed to be idempotent.

        :param group_id: A consumer group ID.
        :type group_id: str
        :param repo_id: A repo ID.
        :type repo_id: str
        :param distributor_id: A distributor ID.
        :type distributor_id: str
        :return: list of call requests
        :rtype: list
        """
        missing_resources = verify_group_resources(group_id, repo_id, distributor_id)
        if missing_resources:
            raise MissingResource(**missing_resources)

        unbind_args_tuple = (group_id, repo_id, distributor_id, {})
        async_task = unbind.apply_async(unbind_args_tuple)
        raise pulp_exceptions.OperationPostponed(async_task)
Beispiel #3
0
    def delete(self, request, consumer_group_id, repo_id, distributor_id):
        """
        Delete a bind association between the consumers belonging to the specified
        consumer group and repo-distributor. Designed to be idempotent.

        :param request: WSGI request object
        :type request: django.core.handlers.wsgi.WSGIRequest
        :param consumer_group_id: A consumer group ID.
        :type consumer_group_id: str
        :param repo_id: A repo ID.
        :type repo_id: str
        :param distributor_id: A distributor ID.
        :type distributor_id: str
        :raises: MissingResource if repo, distributor, group id is missing
        :raises: OperationPostponed when an async operation is performed
        """
        missing_resources = verify_group_resources(consumer_group_id, repo_id, distributor_id)
        if missing_resources:
            raise pulp_exceptions.MissingResource(**missing_resources)
        unbind_args_tuple = (consumer_group_id, repo_id, distributor_id, {})
        async_task = unbind.apply_async(unbind_args_tuple)
        raise pulp_exceptions.OperationPostponed(async_task)
Beispiel #4
0
    def DELETE(self, group_id, repo_id, distributor_id):
        """
        Delete a bind association between the consumers belonging to the specified
        consumer group and repo-distributor. Designed to be idempotent.

        :param group_id: A consumer group ID.
        :type group_id: str
        :param repo_id: A repo ID.
        :type repo_id: str
        :param distributor_id: A distributor ID.
        :type distributor_id: str
        :return: list of call requests
        :rtype: list
        """
        missing_resources = verify_group_resources(group_id, repo_id,
                                                   distributor_id)
        if missing_resources:
            raise MissingResource(**missing_resources)

        unbind_args_tuple = (group_id, repo_id, distributor_id, {})
        async_task = unbind.apply_async(unbind_args_tuple)
        raise pulp_exceptions.OperationPostponed(async_task)
Beispiel #5
0
    def delete(self, request, consumer_group_id, repo_id, distributor_id):
        """
        Delete a bind association between the consumers belonging to the specified
        consumer group and repo-distributor. Designed to be idempotent.

        :param request: WSGI request object
        :type request: django.core.handlers.wsgi.WSGIRequest
        :param consumer_group_id: A consumer group ID.
        :type consumer_group_id: str
        :param repo_id: A repo ID.
        :type repo_id: str
        :param distributor_id: A distributor ID.
        :type distributor_id: str
        :raises: MissingResource if repo, distributor, group id is missing
        :raises: OperationPostponed when an async operation is performed
        """
        missing_resources = verify_group_resources(consumer_group_id, repo_id, distributor_id)
        if missing_resources:
            raise pulp_exceptions.MissingResource(**missing_resources)
        unbind_args_tuple = (consumer_group_id, repo_id, distributor_id, {})
        async_task = unbind.apply_async(unbind_args_tuple)
        raise pulp_exceptions.OperationPostponed(async_task)