heat_integrationtests.functional.test_autoscaling
Module¶heat_integrationtests.functional.test_autoscaling.
AutoScalingSignalTest
(*args, **kwargs)[source]¶Bases: heat_integrationtests.functional.test_autoscaling.AutoscalingGroupTest
lb_template
= '\nheat_template_version: 2013-05-23\nparameters:\n ImageId: {type: string}\n InstanceType: {type: string}\n SecurityGroups: {type: comma_delimited_list}\n UserData: {type: string}\n Tags: {type: comma_delimited_list, default: "x,y"}\n\nresources:\noutputs:\n PublicIp: {value: "not-used"}\n AvailabilityZone: {value: \'not-used1\'}\n PrivateDnsName: {value: \'not-used2\'}\n PublicDnsName: {value: \'not-used3\'}\n PrivateIp: {value: \'not-used4\'}\n\n'¶template
= '\n{\n "AWSTemplateFormatVersion" : "2010-09-09",\n "Description" : "Template to create multiple instances.",\n "Parameters" : {"size": {"Type": "String", "Default": "1"},\n "AZ": {"Type": "String", "Default": "nova"},\n "image": {"Type": "String"},\n "flavor": {"Type": "String"}},\n "Resources": {\n "custom_lb": {\n "Type": "AWS::EC2::Instance",\n "Properties": {\n "ImageId": {"Ref": "image"},\n "InstanceType": {"Ref": "flavor"},\n "UserData": "foo",\n "SecurityGroups": [ "sg-1" ],\n "Tags": []\n },\n "Metadata": {\n "IPs": {"Fn::GetAtt": ["JobServerGroup", "InstanceList"]}\n }\n },\n "JobServerGroup": {\n "Type" : "AWS::AutoScaling::AutoScalingGroup",\n "Properties" : {\n "AvailabilityZones" : [{"Ref": "AZ"}],\n "LaunchConfigurationName" : { "Ref" : "JobServerConfig" },\n "DesiredCapacity" : {"Ref": "size"},\n "MinSize" : "0",\n "MaxSize" : "20"\n }\n },\n "JobServerConfig" : {\n "Type" : "AWS::AutoScaling::LaunchConfiguration",\n "Metadata": {"foo": "bar"},\n "Properties": {\n "ImageId" : {"Ref": "image"},\n "InstanceType" : {"Ref": "flavor"},\n "SecurityGroups" : [ "sg-1" ],\n "UserData" : "jsconfig data"\n }\n },\n "ScaleUpPolicy" : {\n "Type" : "AWS::AutoScaling::ScalingPolicy",\n "Properties" : {\n "AdjustmentType" : "ChangeInCapacity",\n "AutoScalingGroupName" : { "Ref" : "JobServerGroup" },\n "Cooldown" : "0",\n "ScalingAdjustment": "1"\n }\n },\n "ScaleDownPolicy" : {\n "Type" : "AWS::AutoScaling::ScalingPolicy",\n "Properties" : {\n "AdjustmentType" : "ChangeInCapacity",\n "AutoScalingGroupName" : { "Ref" : "JobServerGroup" },\n "Cooldown" : "0",\n "ScalingAdjustment" : "-2"\n }\n }\n },\n "Outputs": {\n "InstanceList": {"Value": {\n "Fn::GetAtt": ["JobServerGroup", "InstanceList"]}}\n }\n}\n'¶heat_integrationtests.functional.test_autoscaling.
AutoscalingGroupBasicTest
(*args, **kwargs)[source]¶Bases: heat_integrationtests.functional.test_autoscaling.AutoscalingGroupTest
test_basic_create_works
()[source]¶Make sure the working case is good.
Note this combines test_override_aws_ec2_instance into this test as well, which is: If AWS::EC2::Instance is overridden, AutoScalingGroup will automatically use that overridden resource type.
test_create_instance_error_causes_group_error
()[source]¶Test create failing a resource in the instance group.
If a resource in an instance group fails to be created, the instance group itself will fail and the broken inner resource will remain.
heat_integrationtests.functional.test_autoscaling.
AutoscalingGroupTest
(*args, **kwargs)[source]¶Bases: heat_integrationtests.functional.functional_base.FunctionalTestsBase
bad_instance_template
= '\nheat_template_version: 2013-05-23\nparameters:\n ImageId: {type: string}\n InstanceType: {type: string}\n SecurityGroups: {type: comma_delimited_list}\n UserData: {type: string}\n Tags: {type: comma_delimited_list, default: "x,y"}\n\nresources:\n random1:\n type: OS::Heat::RandomString\n depends_on: waiter\n ready_poster:\n type: AWS::CloudFormation::WaitConditionHandle\n waiter:\n type: AWS::CloudFormation::WaitCondition\n properties:\n Handle: {get_resource: ready_poster}\n Timeout: 1\noutputs:\n PublicIp:\n value: {get_attr: [random1, value]}\n'¶instance_template
= '\nheat_template_version: 2013-05-23\nparameters:\n ImageId: {type: string}\n InstanceType: {type: string}\n SecurityGroups: {type: comma_delimited_list}\n UserData: {type: string}\n Tags: {type: comma_delimited_list, default: "x,y"}\n\nresources:\n random1:\n type: OS::Heat::RandomString\n properties:\n salt: {get_param: UserData}\noutputs:\n PublicIp: {value: {get_attr: [random1, value]}}\n AvailabilityZone: {value: \'not-used11\'}\n PrivateDnsName: {value: \'not-used12\'}\n PublicDnsName: {value: \'not-used13\'}\n PrivateIp: {value: \'not-used14\'}\n'¶template
= '\n{\n "AWSTemplateFormatVersion" : "2010-09-09",\n "Description" : "Template to create multiple instances.",\n "Parameters" : {"size": {"Type": "String", "Default": "1"},\n "AZ": {"Type": "String", "Default": "nova"},\n "image": {"Type": "String"},\n "flavor": {"Type": "String"},\n "user_data": {"Type": "String", "Default": "jsconfig data"}},\n "Resources": {\n "JobServerGroup": {\n "Type" : "AWS::AutoScaling::AutoScalingGroup",\n "Properties" : {\n "AvailabilityZones" : [{"Ref": "AZ"}],\n "LaunchConfigurationName" : { "Ref" : "JobServerConfig" },\n "MinSize" : {"Ref": "size"},\n "MaxSize" : "20"\n }\n },\n\n "JobServerConfig" : {\n "Type" : "AWS::AutoScaling::LaunchConfiguration",\n "Metadata": {"foo": "bar"},\n "Properties": {\n "ImageId" : {"Ref": "image"},\n "InstanceType" : {"Ref": "flavor"},\n "SecurityGroups" : [ "sg-1" ],\n "UserData" : {"Ref": "user_data"}\n }\n }\n },\n "Outputs": {\n "InstanceList": {"Value": {\n "Fn::GetAtt": ["JobServerGroup", "InstanceList"]}},\n "JobServerConfigRef": {"Value": {\n "Ref": "JobServerConfig"}}\n }\n}\n'¶heat_integrationtests.functional.test_autoscaling.
AutoscalingGroupUpdatePolicyTest
(*args, **kwargs)[source]¶Bases: heat_integrationtests.functional.test_autoscaling.AutoscalingGroupTest
test_instance_group_update_no_replace
()[source]¶Test simple update only and no replace.
Test simple update only and no replace (i.e. updated instance flavor in Launch Configuration) with no conflict in batch size and minimum instances in service.
test_instance_group_update_no_replace_with_adjusted_capacity
()[source]¶Test update only and no replace with capacity adjustment.
Test update only and no replace (i.e. updated instance flavor in Launch Configuration) with capacity adjustment due to conflict in batch size and minimum instances in service.
test_instance_group_update_replace
()[source]¶Test simple update replace.
Test update replace with no conflict in batch size and minimum instances in service.
test_instance_group_update_replace_huge_batch_size
()[source]¶Test update replace with a huge batch size.
test_instance_group_update_replace_huge_min_in_service
()[source]¶Update replace with huge number of minimum instances in service.
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.