def uninstall(context, units, options): """ Uninstall content on a consumer. :param context: The call context. :type context: pulp.server.agent.context.Context :param units: A list of content units to be uninstalled. :type units: list of: { type_id:<str>, unit_key:<dict> } :param options: Uninstall options; based on unit type. :type options: dict """ agent = Agent(context.url, context.route, secret=context.secret, authenticator=context.authenticator, reply=context.reply_queue, data=context.details) content = agent.Content() content.uninstall(units, options)
def uninstall(self, units, options): """ Uninstall content on a consumer. @param units: A list of content units to be uninstalled. @type units: list of: { type_id:<str>, unit_key:<dict> } @param options: Uninstall options; based on unit type. @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('uninstall_timeout'), secret=self.context.secret, ctag=self.context.ctag, watchdog=self.context.watchdog, any=self.context.call_request_id) content = agent.Content() return content.uninstall(units, options)