Merge "Allow defaults for Image/Flavor/RoleParameters in roles_data.yaml"
This commit is contained in:
commit
4be52761af
|
@ -386,7 +386,10 @@ resources:
|
||||||
EndpointMap: {get_attr: [EndpointMapData, value]}
|
EndpointMap: {get_attr: [EndpointMapData, value]}
|
||||||
DefaultPasswords: {get_attr: [DefaultPasswords, passwords]}
|
DefaultPasswords: {get_attr: [DefaultPasswords, passwords]}
|
||||||
RoleName: {{role.name}}
|
RoleName: {{role.name}}
|
||||||
RoleParameters: {get_param: {{role.name}}Parameters}
|
RoleParameters:
|
||||||
|
map_merge:
|
||||||
|
- {{role.RoleParametersDefault|default({})}}
|
||||||
|
- get_param: {{role.name}}Parameters
|
||||||
|
|
||||||
# Lookup of role_data via heat outputs is slow, so workaround this by caching
|
# Lookup of role_data via heat outputs is slow, so workaround this by caching
|
||||||
# the value in an OS::Heat::Value resource
|
# the value in an OS::Heat::Value resource
|
||||||
|
@ -564,7 +567,10 @@ resources:
|
||||||
LoggingGroups: {get_attr: [{{role.name}}ServiceChainRoleData, value, logging_groups]}
|
LoggingGroups: {get_attr: [{{role.name}}ServiceChainRoleData, value, logging_groups]}
|
||||||
ServiceMetadataSettings: {get_attr: [{{role.name}}ServiceChainRoleData, value, service_metadata_settings]}
|
ServiceMetadataSettings: {get_attr: [{{role.name}}ServiceChainRoleData, value, service_metadata_settings]}
|
||||||
DeploymentServerBlacklistDict: {get_attr: [DeploymentServerBlacklistDict, value]}
|
DeploymentServerBlacklistDict: {get_attr: [DeploymentServerBlacklistDict, value]}
|
||||||
RoleParameters: {get_param: {{role.name}}Parameters}
|
RoleParameters:
|
||||||
|
map_merge:
|
||||||
|
- {{role.RoleParametersDefault|default({})}}
|
||||||
|
- get_param: {{role.name}}Parameters
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
{% for role in roles %}
|
{% for role in roles %}
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
heat_template_version: queens
|
heat_template_version: queens
|
||||||
description: 'OpenStack {{role.name}} node configured by Puppet'
|
description: 'OpenStack {{role.name}} node configured by Puppet'
|
||||||
parameters:
|
parameters:
|
||||||
{%- set default_flavor_name = 'baremetal' %}
|
{%- set default_flavor_name = role.FlavorDefault|default('baremetal') %}
|
||||||
{%- if role.deprecated_param_flavor is defined %}
|
{%- if role.deprecated_param_flavor is defined %}
|
||||||
{{role.deprecated_param_flavor}}:
|
{{role.deprecated_param_flavor}}:
|
||||||
description: DEPRECATED Use Overcloud{{role.name}}Flavor instead.
|
description: DEPRECATED Use Overcloud{{role.name}}Flavor instead.
|
||||||
|
@ -20,7 +20,7 @@ parameters:
|
||||||
constraints:
|
constraints:
|
||||||
- custom_constraint: nova.flavor
|
- custom_constraint: nova.flavor
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- set default_image_name = 'overcloud-full' %}
|
{%- set default_image_name = role.ImageDefault|default('overcloud-full') %}
|
||||||
{%- if role.deprecated_param_image is defined %}
|
{%- if role.deprecated_param_image is defined %}
|
||||||
{{role.deprecated_param_image}}:
|
{{role.deprecated_param_image}}:
|
||||||
type: string
|
type: string
|
||||||
|
@ -298,7 +298,7 @@ resources:
|
||||||
get_param: {{role.name}}Image
|
get_param: {{role.name}}Image
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
image_update_policy: {get_param: ImageUpdatePolicy}
|
image_update_policy: {get_param: ImageUpdatePolicy}
|
||||||
flavor:
|
flavor:
|
||||||
{%- if role.deprecated_param_flavor is defined %}
|
{%- if role.deprecated_param_flavor is defined %}
|
||||||
if:
|
if:
|
||||||
- deprecated_param_flavor_set
|
- deprecated_param_flavor_set
|
||||||
|
|
|
@ -34,6 +34,16 @@ Role Options
|
||||||
defaults to '%stackname%-{{role.name.lower()}}-%index%'
|
defaults to '%stackname%-{{role.name.lower()}}-%index%'
|
||||||
sets the default for {{role.name}}HostnameFormat parameter in overcloud.yaml
|
sets the default for {{role.name}}HostnameFormat parameter in overcloud.yaml
|
||||||
|
|
||||||
|
* ImageDefault: (string) optional default image name or ID, defaults to
|
||||||
|
overcloud-full
|
||||||
|
|
||||||
|
* FlavorDefault: (string) optional default flavor name or ID, defaults to
|
||||||
|
baremetal
|
||||||
|
|
||||||
|
* RoleParametersDefault: (map) optional default to the per-role RoleParameters
|
||||||
|
value, this enables roles to specify specific values appropriate to their
|
||||||
|
configuration, defaults to an empty map.
|
||||||
|
|
||||||
* disable_constraints: (boolean) optional, whether to disable Nova and Glance
|
* disable_constraints: (boolean) optional, whether to disable Nova and Glance
|
||||||
constraints for each role specified in the templates.
|
constraints for each role specified in the templates.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue