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


Python Schedule.reload方法代码示例

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


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

示例1: test_reload_schedule_in_saved_but_not_opts

# 需要导入模块: from salt.utils.schedule import Schedule [as 别名]
# 或者: from salt.utils.schedule.Schedule import reload [as 别名]
 def test_reload_schedule_in_saved_but_not_opts(self):
     '''
     Tests reloading the schedule from saved schedule that contains
     a schedule key, but self.schedule.opts does not
     '''
     saved = {'schedule': {'foo': 'bar'}}
     ret = {'schedule': {'schedule': {'foo': 'bar'}}}
     Schedule.reload(self.schedule, saved)
     self.assertEqual(self.schedule.opts, ret)
开发者ID:HowardMei,项目名称:saltstack,代码行数:11,代码来源:schedule_test.py

示例2: test_reload_no_schedule_in_opts

# 需要导入模块: from salt.utils.schedule import Schedule [as 别名]
# 或者: from salt.utils.schedule.Schedule import reload [as 别名]
 def test_reload_no_schedule_in_opts(self):
     '''
     Tests reloading the schedule from saved schedule that does not
     contain a schedule key and neither does self.schedule.opts
     '''
     saved = {'foo': 'bar'}
     ret = {'schedule': {'foo': 'bar'}}
     Schedule.reload(self.schedule, saved)
     self.assertEqual(self.schedule.opts, ret)
开发者ID:HowardMei,项目名称:saltstack,代码行数:11,代码来源:schedule_test.py

示例3: test_reload_update_schedule_no_key

# 需要导入模块: from salt.utils.schedule import Schedule [as 别名]
# 或者: from salt.utils.schedule.Schedule import reload [as 别名]
 def test_reload_update_schedule_no_key(self):
     '''
     Tests reloading the schedule from saved schedule that does not
     contain a schedule key but self.schedule.opts does not
     '''
     saved = {'foo': 'bar'}
     ret = {'schedule': {'foo': 'bar', 'hello': 'world'}}
     self.schedule.opts = {'schedule': {'hello': 'world'}}
     Schedule.reload(self.schedule, saved)
     self.assertEqual(self.schedule.opts, ret)
开发者ID:HowardMei,项目名称:saltstack,代码行数:12,代码来源:schedule_test.py

示例4: test_reload_update_schedule_key

# 需要导入模块: from salt.utils.schedule import Schedule [as 别名]
# 或者: from salt.utils.schedule.Schedule import reload [as 别名]
 def test_reload_update_schedule_key(self):
     '''
     Tests reloading the schedule from saved schedule where both the
     saved schedule and self.schedule.opts contain a schedule key
     '''
     saved = {'schedule': {'foo': 'bar'}}
     ret = {'schedule': {'foo': 'bar', 'hello': 'world'}}
     self.schedule.opts = {'schedule': {'hello': 'world'}}
     Schedule.reload(self.schedule, saved)
     self.assertEqual(self.schedule.opts, ret)
开发者ID:HowardMei,项目名称:saltstack,代码行数:12,代码来源:schedule_test.py

示例5: test_reload_schedule_in_saved_but_not_opts

# 需要导入模块: from salt.utils.schedule import Schedule [as 别名]
# 或者: from salt.utils.schedule.Schedule import reload [as 别名]
 def test_reload_schedule_in_saved_but_not_opts(self):
     '''
     Tests reloading the schedule from saved schedule that contains
     a schedule key, but self.schedule.opts does not
     '''
     saved = {'schedule': {'foo': 'bar'}}
     ret = copy.deepcopy(self.schedule.opts)
     ret['schedule'] = {'foo': 'bar'}
     self.schedule.opts.pop('schedule', None)
     Schedule.reload(self.schedule, saved)
     self.assertEqual(self.schedule.opts, ret)
开发者ID:bryson,项目名称:salt,代码行数:13,代码来源:schedule_test.py

示例6: test_reload_no_schedule_in_opts

# 需要导入模块: from salt.utils.schedule import Schedule [as 别名]
# 或者: from salt.utils.schedule.Schedule import reload [as 别名]
 def test_reload_no_schedule_in_opts(self):
     '''
     Tests reloading the schedule from saved schedule that does not
     contain a schedule key and neither does self.schedule.opts
     '''
     saved = {'foo': 'bar'}
     ret = copy.deepcopy(self.schedule.opts)
     ret['schedule'] = {'foo': 'bar'}
     self.schedule.opts.pop('schedule', None)
     Schedule.reload(self.schedule, saved)
     self.assertEqual(self.schedule.opts, ret)
开发者ID:bryson,项目名称:salt,代码行数:13,代码来源:schedule_test.py


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