當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。