From b6711c12e3dd8b7f8dbf8c654379e0d8fa8912d2 Mon Sep 17 00:00:00 2001 From: Zane Bitter Date: Tue, 27 Nov 2012 15:13:55 +0100 Subject: [PATCH] Lookup the class for an Instance in Autoscaling Instead of hardcoding the class for handling instances in autoscaling, look up the class for the AWS::EC2::Instance resource type using the same mechanism used for creating resources normally. Change-Id: I37b9aff9a83b89cdc782467720970a04549d7b1e Signed-off-by: Zane Bitter --- heat/engine/resources/autoscaling.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/heat/engine/resources/autoscaling.py b/heat/engine/resources/autoscaling.py index 36148bdc..3ca2844f 100644 --- a/heat/engine/resources/autoscaling.py +++ b/heat/engine/resources/autoscaling.py @@ -65,9 +65,10 @@ class AutoScalingGroup(resource.Resource): return self.UPDATE_REPLACE def _make_instance(self, name): + Instance = resource.get_class('AWS::EC2::Instance') conf = self.properties['LaunchConfigurationName'] instance_definition = self.stack.t['Resources'][conf] - return instance.Instance(name, instance_definition, self.stack) + return Instance(name, instance_definition, self.stack) def handle_delete(self): if self.resource_id is not None: -- 2.45.2