Merge "Add hostname and stack_name tags to ports"

This commit is contained in:
Zuul 2020-11-16 17:56:12 +00:00 committed by Gerrit Code Review
commit cc797b648b
7 changed files with 35 additions and 0 deletions

View File

@ -4,6 +4,10 @@ description: >
Returns an IP from a service mapped list of IPs
parameters:
StackName: # Here for compatibility
description: Name of the overcloud heat stack
default: overcloud
type: string
ServiceName:
description: Name of the service to lookup
default: ''

View File

@ -4,6 +4,10 @@ description: >
Returns an IP from a service mapped list of IPv6 IPs
parameters:
StackName: # Here for compatibility
description: Name of the overcloud heat stack
default: overcloud
type: string
ServiceName:
description: Name of the service to lookup
default: ''

View File

@ -4,6 +4,10 @@ description: >
Returns the control plane port (provisioning network) as the ip_address.
parameters:
StackName: # Here for compatibility
description: Name of the overcloud heat stack
default: overcloud
type: string
ServiceName: # Here for compatibility with from_service.yaml
description: Name of the service to lookup
default: ''

View File

@ -5,6 +5,10 @@ description: >
automatically if FixedIPs is empty.
parameters:
StackName:
description: Name of the overcloud heat stack
default: overcloud
type: string
{{network.name}}NetName:
description: The name of the {{network.name_lower}} network.
default: {{network.name_lower|default(network.name|lower)}}
@ -81,6 +85,15 @@ resources:
- [{subnet: {get_param: ControlPlaneSubnet}}]
- get_param: FixedIPs
replacement_policy: AUTO
tags:
- str_replace:
template: hostname=$HOSTNAME
params:
$HOSTNAME: {get_param: DnsName}
- str_replace:
template: stack_name=$STACK_NAME
params:
$STACK_NAME: {get_param: StackName}
outputs:
ip_address:

View File

@ -10,6 +10,10 @@ description: >
- 1.2.3.5 # Second controller
parameters:
StackName: # Here for compatibility
description: Name of the overcloud heat stack
default: overcloud
type: string
{{network.name}}NetName:
description: The name of the {{network.name_lower}} network.
default: {{network.name_lower}}

View File

@ -823,6 +823,7 @@ resources:
resource_def:
type: OS::TripleO::{{role.name}}
properties:
StackName: {get_param: 'OS::stack_name'}
CloudDomain: {get_param: CloudDomain}
ServiceNetMap: {get_attr: [ServiceNetMap, service_net_map]}
EndpointMap: {get_attr: [EndpointMapData, value]}

View File

@ -5,6 +5,10 @@
heat_template_version: rocky
description: 'OpenStack {{role.name}} node configured by Puppet'
parameters:
StackName:
description: Name of the overcloud heat stack
default: overcloud
type: string
{%- set default_flavor_name = role.FlavorDefault|default('baremetal') %}
{%- if role.deprecated_param_flavor is defined %}
{{role.deprecated_param_flavor}}:
@ -300,6 +304,7 @@ resources:
{{network.name}}Port:
type: OS::TripleO::{{role.name}}::Ports::{{network.name}}Port
properties:
StackName: {get_param: StackName}
PortName:
list_join:
- '_'