Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Add neutron port tag hint for role name
Browse files Browse the repository at this point in the history
Adds a tag tripleo_role=$ROLE to neutron ports
created by heat.

Related: blueprint network-data-v2-ports
Change-Id: I238572444e2931546d44864b2de497dd2825c2dc
  • Loading branch information
hjensas committed May 14, 2021
1 parent fe23732 commit 659cc55
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 0 deletions.
5 changes: 5 additions & 0 deletions deployed-server/deployed-neutron-port.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ parameters:
IsVirtualIP: # Here for compatibility
default: false
type: boolean
Role: # Here for compatibility
description: >
The TripleO Role Name
type: string
default: ''


outputs:
Expand Down
5 changes: 5 additions & 0 deletions network/ports/deployed_port.j2
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ parameters:
Whether this interface is used for the default route
type: boolean
default: false
Role: # Here for compatibility
description: >
The TripleO Role Name
type: string
default: ''

resources:

Expand Down
5 changes: 5 additions & 0 deletions network/ports/noop.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ parameters:
Whether this interface is used for the default route
type: boolean
default: false
Role: # Here for compatibility
description: >
The TripleO Role Name
type: string
default: ''

outputs:
ip_address:
Expand Down
9 changes: 9 additions & 0 deletions network/ports/port.j2
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ parameters:
IsVirtualIP:
type: boolean
default: false
Role:
description: >
The TripleO Role Name
type: string
default: ''

conditions:
network_is_ctlplane:
Expand Down Expand Up @@ -120,6 +125,10 @@ resources:
template: tripleo_default_route=$BOOL
params:
$BOOL: {get_param: DefaultRoute}
- str_replace:
template: tripleo_role=$ROLE
params:
$ROLE: {get_param: Role}

outputs:
ip_address:
Expand Down
5 changes: 5 additions & 0 deletions network/ports/port_from_pool.j2
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ parameters:
IsVirtualIP: # Here for compatibility
default: false
type: boolean
Role: # Here for compatibility
description: >
The TripleO Role Name
type: string
default: ''

outputs:
ip_address:
Expand Down
1 change: 1 addition & 0 deletions puppet/role.role.j2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ resources:
{%- if role.default_route_networks is defined and network.name in role.default_route_networks %}
DefaultRoute: true
{%- endif %}
Role: {{role.name}}
{%- endif %}
{%- endfor %}

Expand Down

0 comments on commit 659cc55

Please sign in to comment.