Browse Source

Merge "Add hostname and stack_name tags to ports"

changes/86/750986/4
Zuul 10 months ago
committed by Gerrit Code Review
parent
commit
cc797b648b
  1. 4
      network/ports/from_service.yaml
  2. 4
      network/ports/from_service_v6.yaml
  3. 4
      network/ports/noop.yaml
  4. 13
      network/ports/port.j2
  5. 4
      network/ports/port_from_pool.j2
  6. 1
      overcloud.j2.yaml
  7. 5
      puppet/role.role.j2.yaml

4
network/ports/from_service.yaml

@ -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: ''

4
network/ports/from_service_v6.yaml

@ -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: ''

4
network/ports/noop.yaml

@ -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: ''

13
network/ports/port.j2

@ -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:

4
network/ports/port_from_pool.j2

@ -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}}

1
overcloud.j2.yaml

@ -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]}

5
puppet/role.role.j2.yaml

@ -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:
- '_'

Loading…
Cancel
Save