Skip to content

Commit

Permalink
Merge pull request #404 from cloudify-cosmo/RD-3565-populate-resource
Browse files Browse the repository at this point in the history
Rd 3565 populate resource
  • Loading branch information
EarthmanT authored Nov 14, 2021
2 parents 2adb004 + 9f6d5b4 commit 5a0d800
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -173,3 +173,5 @@
- RD-586 Timeout for CloudFormation stack creation/deletion needs to be increased (add minimum_wait_time)
2.12.12:
- RD-3369-Return Aarch64 Wagons to Bundle
2.12.13:
- RD-3565: Fix Populate Resource issue.
11 changes: 8 additions & 3 deletions cloudify_aws/common/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@ def _aws_resource(function,
resource_config = kwargs['resource_config']
resource_id = utils.get_resource_id(node=ctx.node, instance=ctx.instance)
# Check if using external
iface = kwargs.get('iface')
if ctx.node.properties.get('use_external_resource', False):
ctx.logger.info('{t} ID# {i} is user-provided.'.format(
t=resource_type, i=resource_id))
Expand All @@ -355,13 +356,17 @@ def _aws_resource(function,
raise NonRecoverableError(
'Resource type {0} resource_id {1} not found.'.format(
kwargs['resource_type'], kwargs['iface'].resource_id))
kwargs['iface'].populate_resource(ctx)
if iface:
iface.populate_resource(ctx)
kwargs['iface'] = iface
return
ctx.logger.warn('{t} ID# {i} has force_operation set.'.format(
t=resource_type, i=resource_id))
result = function(**kwargs)
if ctx.operation.name == 'cloudify.interfaces.lifecycle.configure':
kwargs['iface'].populate_resource(ctx)
if ctx.operation.name == 'cloudify.interfaces.lifecycle.configure' \
and iface:
iface.populate_resource(ctx)
kwargs['iface'] = iface
if ctx.operation.name == 'cloudify.interfaces.lifecycle.delete':
# cleanup runtime after delete
keys = list(ctx.instance.runtime_properties.keys())
Expand Down
2 changes: 1 addition & 1 deletion plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ plugins:
aws:
executor: central_deployment_agent
package_name: cloudify-aws-plugin
package_version: '2.12.12'
package_version: '2.12.13'

data_types:

Expand Down

0 comments on commit 5a0d800

Please sign in to comment.