Take InstanceType for launchconfig res creation

Take the init value of InstanceType for launchconfig
resource creation, since heat will apply nova flavor
custom constraint for launchconfig resource,
see: https://review.openstack.org/#/c/134879/

Change-Id: I23c6032f49104880dc6b424d115ff437f698f5c6
This commit is contained in:
huangtianhua 2014-11-19 12:13:20 +08:00
parent 9981e16846
commit 74697dd44d
2 changed files with 6 additions and 2 deletions

View File

@ -7,6 +7,8 @@ Parameters:
Default: not_yet
image:
Type: String
flavor:
Type: String
Resources:
fluffy:
Type: AWS::AutoScaling::LaunchConfiguration
@ -16,7 +18,7 @@ Resources:
- Stinky
Properties:
ImageId: {Ref: image}
InstanceType: not_used
InstanceType: {Ref: flavor}
UserData:
Fn::Replace:
- variable_a: {Ref: trigger}

View File

@ -31,13 +31,15 @@ class StacksTestJSON(base.BaseOrchestrationTest):
template = cls.read_template('non_empty_stack')
image_id = (CONF.orchestration.image_ref or
cls._create_image()['id'])
flavor = CONF.orchestration.instance_type
# create the stack
cls.stack_identifier = cls.create_stack(
cls.stack_name,
template,
parameters={
'trigger': 'start',
'image': image_id
'image': image_id,
'flavor': flavor
})
cls.stack_id = cls.stack_identifier.split('/')[1]
cls.resource_name = 'fluffy'