diff --git a/cloudify_aws/ec2/resources/image.py b/cloudify_aws/ec2/resources/image.py index dfc0c8ec..830a46a4 100644 --- a/cloudify_aws/ec2/resources/image.py +++ b/cloudify_aws/ec2/resources/image.py @@ -80,7 +80,7 @@ def status(self): raise e if not props: return None - return props['State'] + return props.get('State') def create(self, params): """ diff --git a/cloudify_aws/elb/resources/classic/listener.py b/cloudify_aws/elb/resources/classic/listener.py index 25b39e31..d2c949fd 100644 --- a/cloudify_aws/elb/resources/classic/listener.py +++ b/cloudify_aws/elb/resources/classic/listener.py @@ -123,5 +123,5 @@ def delete(ctx, iface, resource_config, **_): lb = ctx.instance.runtime_properties[LB_NAME] for listener in params.get(LISTENERS, []): - ports = listener.get(LB_PORT) + ports = [listener.get(LB_PORT)] iface.delete({LB_NAME: lb, LB_PORTS: ports}) diff --git a/cloudify_aws/elb/resources/classic/load_balancer.py b/cloudify_aws/elb/resources/classic/load_balancer.py index e5d76797..5eefaa90 100644 --- a/cloudify_aws/elb/resources/classic/load_balancer.py +++ b/cloudify_aws/elb/resources/classic/load_balancer.py @@ -68,7 +68,7 @@ def status(self): props = self.properties if not props: return None - return props['State']['Code'] + return props.get('State', {}).get('Code') def create(self, params): """ diff --git a/examples/elb-feature-demo/blueprint.yaml b/examples/elb-feature-demo/blueprint.yaml index c6686e03..c445380a 100644 --- a/examples/elb-feature-demo/blueprint.yaml +++ b/examples/elb-feature-demo/blueprint.yaml @@ -13,12 +13,12 @@ inputs: availability_zone1: type: string description: The availability zone in the AWS Region. - default: { concat: [ { get_input: aws_region_name }, 'a' ] } + default: { concat: [ { get_input: aws_region_name }, 'c' ] } availability_zone2: type: string description: The availability zone in the AWS Region. - default: { concat: [ { get_input: aws_region_name }, 'b' ] } + default: { concat: [ { get_input: aws_region_name }, 'd' ] } dsl_definitions: @@ -66,7 +66,7 @@ node_templates: target: classic_elb interfaces: cloudify.interfaces.lifecycle: - configure: + create: implementation: aws.cloudify_aws.ec2.resources.instances.create inputs: resource_config: @@ -98,7 +98,7 @@ node_templates: target: classic_elb interfaces: cloudify.interfaces.lifecycle: - configure: + create: implementation: aws.cloudify_aws.ec2.resources.instances.create inputs: resource_config: