本文整理汇总了Python中pulp.agent.lib.dispatcher.Dispatcher.bind方法的典型用法代码示例。如果您正苦于以下问题:Python Dispatcher.bind方法的具体用法?Python Dispatcher.bind怎么用?Python Dispatcher.bind使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pulp.agent.lib.dispatcher.Dispatcher
的用法示例。
在下文中一共展示了Dispatcher.bind方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: bind
# 需要导入模块: from pulp.agent.lib.dispatcher import Dispatcher [as 别名]
# 或者: from pulp.agent.lib.dispatcher.Dispatcher import bind [as 别名]
def bind(self, bindings, options):
"""
Bind to the specified repository ID.
Delegated to content handlers.
: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: A dispatch report.
:rtype: DispatchReport
"""
conduit = Conduit()
dispatcher = Dispatcher()
report = dispatcher.bind(conduit, bindings, options)
return report.dict()