def unregistered(self): """ Notification that the consumer has been unregistered. Registration artifacts are cleaned up. @return: The RMI request serial number. @rtype: str """ agent = Agent(self.context.uuid, url=self.context.url, secret=self.context.secret, async=True) consumer = agent.Consumer() return consumer.unregistered()
def unregistered(context): """ Notification that the consumer has been unregistered. Registration artifacts are cleaned up. :param context: The call context. :type context: pulp.server.agent.context.Context """ agent = Agent(context.url, context.route, secret=context.secret, authenticator=context.authenticator, wait=0) consumer = agent.Consumer() consumer.unregistered()
def unbind(context, bindings, options): """ Unbind a consumer from the specified repository. :param context: The call context. :type context: pulp.server.agent.context.Context :param bindings: A list of bindings to be removed. Each binding is: {type_id:<str>, repo_id:<str>} :type bindings: list :param options: Unbind options. :type options: dict """ agent = Agent(context.url, context.route, secret=context.secret, authenticator=context.authenticator, reply=context.reply_queue, data=context.details) consumer = agent.Consumer() consumer.unbind(bindings, options)
def unregister(context): """ Notification that the consumer has been unregistered. Registration artifacts are cleaned up. :param context: The call context. :type context: pulp.server.agent.context.Context """ with context: agent = Agent(context.url, context.address, secret=context.secret, authenticator=context.authenticator, wait=0) consumer = agent.Consumer() try: consumer.unregister() except NotFound: # cover the case where cleanup may find that the queue # has already been deleted pass
def unbind(self, bindings, options): """ Unbind a consumer from the specified repository. @param bindings: A list of bindings to be removed. Each binding is: {type_id:<str>, repo_id:<str>} @type bindings: list @param options: Unbind options. @type options: dict @return: The RMI request serial number. @rtype: str """ agent = Agent(self.context.uuid, url=self.context.url, timeout=self.context.get_timeout('unbind_timeout'), secret=self.context.secret, ctag=self.context.ctag, watchdog=self.context.watchdog, any=self.context.call_request_id) consumer = agent.Consumer() return consumer.unbind(bindings, options)
def bind(context, bindings, options): """ Bind a consumer to the specified repository. :param context: The call context. :type context: pulp.server.agent.context.Context :param bindings: A list of bindings to add/update. Each binding is: {type_id:<str>, repo_id:<str>, details:<dict>} The 'details' are at the discretion of the distributor. :type bindings: list :param options: Bind options. :type options: dict """ agent = Agent(context.url, context.route, secret=context.secret, authenticator=context.authenticator, reply=context.reply_queue, data=context.details) consumer = agent.Consumer() consumer.bind(bindings, options)
def bind(self, bindings, options): """ Bind a consumer to the specified repository. @param bindings: A list of bindings to add/update. Each binding is: {type_id:<str>, repo_id:<str>, details:<dict>} The 'details' are at the discretion of the distributor. @type bindings: list @param options: Bind options. @type options: dict @return: The RMI request serial number. @rtype: str """ agent = Agent(self.context.uuid, url=self.context.url, timeout=self.context.get_timeout('bind_timeout'), secret=self.context.secret, ctag=self.context.ctag, watchdog=self.context.watchdog, any=self.context.call_request_id) consumer = agent.Consumer() return consumer.bind(bindings, options)