Merge "Add name property where missing"
This commit is contained in:
commit
410027d64f
@ -42,6 +42,7 @@ resources:
|
||||
{{role.name}}DeliverUpgradeScriptConfig:
|
||||
type: OS::Heat::SoftwareConfig
|
||||
properties:
|
||||
name: {{role.name}}DeliverUpgradeScriptConfig
|
||||
group: script
|
||||
config:
|
||||
list_join:
|
||||
@ -59,6 +60,7 @@ resources:
|
||||
{{role.name}}DeliverUpgradeScriptDeployment:
|
||||
type: OS::Heat::SoftwareDeploymentGroup
|
||||
properties:
|
||||
name: {{role.name}}DeliverUpgradeScriptDeployment
|
||||
servers: {get_param: [servers, {{role.name}}]}
|
||||
config: {get_resource: {{role.name}}DeliverUpgradeScriptConfig}
|
||||
{% endfor %}
|
||||
@ -120,6 +122,7 @@ resources:
|
||||
rolling_update:
|
||||
max_batch_size: {{role.upgrade_batch_size|default(1)}}
|
||||
properties:
|
||||
name: {{role.name}}UpgradeBatch_Step{{step}}
|
||||
servers: {get_param: [servers, {{role.name}}]}
|
||||
config: {get_resource: {{role.name}}UpgradeBatchConfig_Step{{step}}}
|
||||
input_values:
|
||||
@ -164,6 +167,7 @@ resources:
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
properties:
|
||||
name: {{role.name}}Upgrade_Step{{step}}
|
||||
servers: {get_param: [servers, {{role.name}}]}
|
||||
config: {get_resource: {{role.name}}UpgradeConfig_Step{{step}}}
|
||||
input_values:
|
||||
@ -216,6 +220,7 @@ resources:
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
properties:
|
||||
name: {{role.name}}PostUpgradeConfig_Deployment{{step}}
|
||||
servers: {get_param: [servers, {{role.name}}]}
|
||||
config: {get_resource: {{role.name}}PostUpgradeConfig_Config{{step}}}
|
||||
input_values:
|
||||
|
@ -35,6 +35,7 @@ resources:
|
||||
{{role.name}}SwapDeployment:
|
||||
type: OS::Heat::SoftwareDeploymentGroup
|
||||
properties:
|
||||
name: {{role.name}}SwapDeployment
|
||||
config: {get_resource: SwapConfig}
|
||||
servers: {get_param: [servers, {{role.name}}]}
|
||||
input_values:
|
||||
|
@ -43,6 +43,7 @@ resources:
|
||||
{{role.name}}SwapDeployment:
|
||||
type: OS::Heat::SoftwareDeploymentGroup
|
||||
properties:
|
||||
name: {{role.name}}SwapDeployment
|
||||
config: {get_resource: SwapConfig}
|
||||
servers: {get_param: [servers, {{role.name}}]}
|
||||
input_values:
|
||||
|
@ -92,11 +92,13 @@ resources:
|
||||
NetworkMidonetDeploymentControllers:
|
||||
type: OS::Heat::StructuredDeploymentGroup
|
||||
properties:
|
||||
name: NetworkMidonetDeploymentControllers
|
||||
config: {get_resource: NetworkMidoNetConfig}
|
||||
servers: {get_param: [servers, Controller]}
|
||||
|
||||
NetworkMidonetDeploymentComputes:
|
||||
type: OS::Heat::StructuredDeploymentGroup
|
||||
properties:
|
||||
name: NetworkMidonetDeploymentComputes
|
||||
config: {get_resource: NetworkMidoNetConfig}
|
||||
servers: {get_param: [servers, Compute]}
|
||||
|
@ -151,6 +151,15 @@ VALIDATE_DOCKER_OVERRIDE = {
|
||||
# docker/service/sshd.yaml is a variation of the puppet sshd service
|
||||
'./docker/services/sshd.yaml': False,
|
||||
}
|
||||
DEPLOYMENT_RESOURCE_TYPES = [
|
||||
'OS::Heat::SoftwareDeploymentGroup',
|
||||
'OS::Heat::StructuredDeploymentGroup',
|
||||
'OS::Heat::StructuredDeployments',
|
||||
'OS::Heat::SoftwareDeployments',
|
||||
'OS::Heat::SoftwareDeployment',
|
||||
'OS::Heat::StructuredDeployment',
|
||||
'OS::TripleO::SoftwareDeployment'
|
||||
]
|
||||
|
||||
def exit_usage():
|
||||
print('Usage %s <yaml file or directory>' % sys.argv[0])
|
||||
@ -577,6 +586,16 @@ def validate(filename, param_map):
|
||||
print('Warning: parameter %s in template %s '
|
||||
'appears to be unused' % (p, filename))
|
||||
|
||||
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
|
||||
|
||||
return retval
|
||||
|
||||
def validate_upgrade_tasks(upgrade_steps):
|
||||
@ -605,6 +624,7 @@ def parse_args():
|
||||
|
||||
p.add_argument('--quiet', '-q',
|
||||
action='count',
|
||||
default=0,
|
||||
help='output warnings and errors (-q) or only errors (-qq)')
|
||||
p.add_argument('path_args',
|
||||
nargs='*',
|
||||
|
Loading…
Reference in New Issue
Block a user