本文整理汇总了Python中disco_aws_automation.DiscoAWS.autoscale方法的典型用法代码示例。如果您正苦于以下问题:Python DiscoAWS.autoscale方法的具体用法?Python DiscoAWS.autoscale怎么用?Python DiscoAWS.autoscale使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类disco_aws_automation.DiscoAWS
的用法示例。
在下文中一共展示了DiscoAWS.autoscale方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_create_scaling_schedule_only_desired
# 需要导入模块: from disco_aws_automation import DiscoAWS [as 别名]
# 或者: from disco_aws_automation.DiscoAWS import autoscale [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)
aws.autoscale = MagicMock()
aws.create_scaling_schedule("mhcboo", "1", "[email protected] 0 * * *:[email protected] 0 * * *", "5")
aws.autoscale.assert_has_calls([
call.delete_all_recurring_group_actions('mhcboo'),
call.create_recurring_group_action('mhcboo', '1 0 * * *',
min_size=None, desired_capacity=2, max_size=None),
call.create_recurring_group_action('mhcboo', '6 0 * * *',
min_size=None, desired_capacity=3, max_size=None)
], any_order=True)
示例2: test_create_scaling_schedule_no_sched
# 需要导入模块: from disco_aws_automation import DiscoAWS [as 别名]
# 或者: from disco_aws_automation.DiscoAWS import autoscale [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')])