当前位置: 首页>>代码示例>>Python>>正文


Python Dispatcher.update方法代码示例

本文整理汇总了Python中pulp.agent.lib.dispatcher.Dispatcher.update方法的典型用法代码示例。如果您正苦于以下问题:Python Dispatcher.update方法的具体用法?Python Dispatcher.update怎么用?Python Dispatcher.update使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pulp.agent.lib.dispatcher.Dispatcher的用法示例。


在下文中一共展示了Dispatcher.update方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_handler

# 需要导入模块: from pulp.agent.lib.dispatcher import Dispatcher [as 别名]
# 或者: from pulp.agent.lib.dispatcher.Dispatcher import update [as 别名]
 def test_handler(*unused):
     # publish
     self.populate(constants.ADDITIVE_STRATEGY)
     pulp_conf.set('server', 'storage_dir', self.parentfs)
     dist = NodesHttpDistributor()
     repo = Repository(self.REPO_ID)
     conduit = RepoPublishConduit(self.REPO_ID, constants.HTTP_DISTRIBUTOR)
     dist.publish_repo(repo, conduit, self.dist_conf())
     units = [{'type_id':'node', 'unit_key':None}]
     pulp_conf.set('server', 'storage_dir', self.childfs)
     container = Container(self.parentfs)
     dispatcher = Dispatcher(container)
     container.handlers[CONTENT]['node'] = NodeHandler(self)
     container.handlers[CONTENT]['repository'] = RepositoryHandler(self)
     report = dispatcher.update(Conduit(), units, {})
     _report.append(report)
开发者ID:bartwo,项目名称:pulp,代码行数:18,代码来源:test_plugins.py

示例2: update

# 需要导入模块: from pulp.agent.lib.dispatcher import Dispatcher [as 别名]
# 或者: from pulp.agent.lib.dispatcher.Dispatcher import update [as 别名]
 def update(self, units, options):
     """
     Update the specified content units using the specified options.
     Delegated to content handlers.
     :param units: A list of content units to be updated.
     :type units: list of:
         { type_id:<str>, unit_key:<dict> }
     :param options: Update options; based on unit type.
     :type options: dict
     :return: A dispatch report.
     :rtype: DispatchReport
     """
     conduit = Conduit()
     dispatcher = Dispatcher()
     report = dispatcher.update(conduit, units, options)
     return report.dict()
开发者ID:Katello,项目名称:katello-agent,代码行数:18,代码来源:legacy_plugin.py

示例3: test_handler

# 需要导入模块: from pulp.agent.lib.dispatcher import Dispatcher [as 别名]
# 或者: from pulp.agent.lib.dispatcher.Dispatcher import update [as 别名]
 def test_handler(*unused):
     # publish
     self.populate()
     pulp_conf.set('server', 'storage_dir', self.upfs)
     dist = CitrusHttpDistributor()
     repo = Repository(self.REPO_ID)
     conduit = RepoPublishConduit(self.REPO_ID, CITRUS_DISTRUBUTOR)
     dist.publish_repo(repo, conduit, self.dist_conf())
     options = dict(strategy='additive')
     units = [{'type_id':'node', 'unit_key':None}]
     pulp_conf.set('server', 'storage_dir', self.downfs)
     container = Container(self.upfs)
     dispatcher = Dispatcher(container)
     container.handlers[CONTENT]['node'] = NodeHandler(self)
     container.handlers[CONTENT]['repository'] = RepositoryHandler(self)
     report = dispatcher.update(Conduit(), units, options)
     _report.append(report)
开发者ID:pieska,项目名称:pulp,代码行数:19,代码来源:test_plugins.py


注:本文中的pulp.agent.lib.dispatcher.Dispatcher.update方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。