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


Python DiscoAWS.create_scaling_schedule方法代码示例

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


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

示例1: test_create_scaling_schedule_no_sched

# 需要导入模块: from disco_aws_automation import DiscoAWS [as 别名]
# 或者: from disco_aws_automation.DiscoAWS import create_scaling_schedule [as 别名]
 def test_create_scaling_schedule_no_sched(self, mock_config, **kwargs):
     """test create_scaling_schedule with only desired schedule"""
     aws = DiscoAWS(config=mock_config, environment_name=TEST_ENV_NAME, discogroup=MagicMock())
     aws.create_scaling_schedule("1", "2", "5", hostclass="mhcboo")
     aws.discogroup.assert_has_calls([
         call.delete_all_recurring_group_actions(hostclass='mhcboo', group_name=None)
     ])
开发者ID:amplifylitco,项目名称:asiaq,代码行数:9,代码来源:test_disco_aws.py

示例2: test_create_scaling_schedule_only_desired

# 需要导入模块: from disco_aws_automation import DiscoAWS [as 别名]
# 或者: from disco_aws_automation.DiscoAWS import create_scaling_schedule [as 别名]
 def test_create_scaling_schedule_only_desired(self, mock_config, **kwargs):
     """test create_scaling_schedule with only desired schedule"""
     aws = DiscoAWS(config=mock_config, environment_name=TEST_ENV_NAME, discogroup=MagicMock())
     aws.create_scaling_schedule("1", "[email protected] 0 * * *:[email protected] 0 * * *", "5", hostclass="mhcboo")
     aws.discogroup.assert_has_calls([
         call.delete_all_recurring_group_actions(hostclass='mhcboo', group_name=None),
         call.create_recurring_group_action('1 0 * * *', hostclass='mhcboo', group_name=None,
                                            min_size=None, desired_capacity=2, max_size=None),
         call.create_recurring_group_action('6 0 * * *', hostclass='mhcboo', group_name=None,
                                            min_size=None, desired_capacity=3, max_size=None)
     ], any_order=True)
开发者ID:amplifylitco,项目名称:asiaq,代码行数:13,代码来源:test_disco_aws.py

示例3: test_create_scaling_schedule_overlapping

# 需要导入模块: from disco_aws_automation import DiscoAWS [as 别名]
# 或者: from disco_aws_automation.DiscoAWS import create_scaling_schedule [as 别名]
 def test_create_scaling_schedule_overlapping(self, mock_config, **kwargs):
     """test create_scaling_schedule with only desired schedule"""
     aws = DiscoAWS(config=mock_config, environment_name=TEST_ENV_NAME)
     aws.autoscale = MagicMock()
     aws.create_scaling_schedule("mhcboo",
                                 "[email protected] 0 * * *:[email protected] 0 * * *",
                                 "[email protected] 0 * * *:[email protected] 0 * * *",
                                 "[email protected] 0 * * *:[email protected] 0 * * *")
     aws.autoscale.assert_has_calls([
         call.delete_all_recurring_group_actions('mhcboo'),
         call.create_recurring_group_action('mhcboo', '1 0 * * *',
                                            min_size=1, desired_capacity=2, max_size=6),
         call.create_recurring_group_action('mhcboo', '6 0 * * *',
                                            min_size=2, desired_capacity=3, max_size=9)
     ], any_order=True)
开发者ID:Angakkuit,项目名称:asiaq-aws,代码行数:17,代码来源:test_disco_aws.py

示例4: test_create_scaling_schedule_no_sched

# 需要导入模块: from disco_aws_automation import DiscoAWS [as 别名]
# 或者: from disco_aws_automation.DiscoAWS import create_scaling_schedule [as 别名]
 def test_create_scaling_schedule_no_sched(self, mock_config, **kwargs):
     """test create_scaling_schedule with only desired schedule"""
     aws = DiscoAWS(config=mock_config, environment_name=TEST_ENV_NAME)
     aws.autoscale = MagicMock()
     aws.create_scaling_schedule("mhcboo", "1", "2", "5")
     aws.autoscale.assert_has_calls([call.delete_all_recurring_group_actions('mhcboo')])
开发者ID:Angakkuit,项目名称:asiaq-aws,代码行数:8,代码来源:test_disco_aws.py


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