Merge "Add validation for SoftwareConfig outputs"
This commit is contained in:
commit
1bec57e977
@ -0,0 +1,6 @@
|
||||
---
|
||||
deprecations:
|
||||
- The use of outputs with Heat SoftwareConfig or StructuredConfig resources
|
||||
is now deprecated as they are no longer supported with config-download.
|
||||
Resources that depend on outputs and their values should be changed to use
|
||||
composable services with external_deploy_tasks or deploy_steps_tasks.
|
@ -187,6 +187,10 @@ DEPLOYMENT_RESOURCE_TYPES = [
|
||||
'OS::Heat::StructuredDeployment',
|
||||
'OS::TripleO::SoftwareDeployment'
|
||||
]
|
||||
CONFIG_RESOURCE_TYPES = [
|
||||
'OS::Heat::SoftwareConfig',
|
||||
'OS::Heat::StructuredConfig'
|
||||
]
|
||||
|
||||
VALID_ANSIBLE_UPGRADE_TAGS = [ 'common', 'validation', 'pre-upgrade' ]
|
||||
WORKFLOW_TASKS_EXCLUSIONS = [
|
||||
@ -988,12 +992,17 @@ def validate(filename, param_map):
|
||||
resources = tpl.get('resources')
|
||||
if resources:
|
||||
for resource, data in resources.items():
|
||||
if data['type'] not in DEPLOYMENT_RESOURCE_TYPES:
|
||||
continue
|
||||
if 'name' not in data['properties']:
|
||||
print('ERROR: resource %s from %s missing name property.'
|
||||
% (resource, filename))
|
||||
return 1
|
||||
if data['type'] in DEPLOYMENT_RESOURCE_TYPES:
|
||||
if 'name' not in data['properties']:
|
||||
print('ERROR: resource %s from %s missing name property.'
|
||||
% (resource, filename))
|
||||
return 1
|
||||
|
||||
elif data['type'] in CONFIG_RESOURCE_TYPES:
|
||||
if 'outputs' in data['properties'] and args.quiet < 2:
|
||||
print('Warning: resource %s from %s uses Heat outputs '
|
||||
'which are not supported with config-download.'
|
||||
% (resource, filename))
|
||||
|
||||
return retval
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user