Skip to content

Commit

Permalink
Merge pull request #438 from cloudify-cosmo/RD-3455-aws-elb-feature-d…
Browse files Browse the repository at this point in the history
…emo-fails-to-delete-classic-elb-listener

Rd 3455 aws elb feature demo fails to delete classic elb listener
  • Loading branch information
EarthmanT authored Mar 8, 2022
2 parents c6be0e9 + c08b45a commit acb8ba3
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cloudify_aws/ec2/resources/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
"""
Expand Down
2 changes: 1 addition & 1 deletion cloudify_aws/elb/resources/classic/listener.py
Original file line number Diff line number Diff line change
Expand Up @@ -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})
2 changes: 1 addition & 1 deletion cloudify_aws/elb/resources/classic/load_balancer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
"""
Expand Down
8 changes: 4 additions & 4 deletions examples/elb-feature-demo/blueprint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit acb8ba3

Please sign in to comment.