Use make_url to wrap IPv6 addresses in brackets.
Replace the dependency of network data values for wrapping 'ip_address_uri' in brackets. Instead of using jinja2 variables network.ipv6 or ipv6_override to decide if the IP need to be wrapped in brackets or not the make_url function in heat in combination with a str_replace is used. Related-Bug: #1830406 Change-Id: I2d8c405c1df30ac11cc2286398fe4749694da10e
This commit is contained in:
parent
c06232fba2
commit
824dd9003a
|
@ -69,7 +69,13 @@ outputs:
|
||||||
value: {get_attr: [VipPort, fixed_ips, 0, ip_address]}
|
value: {get_attr: [VipPort, fixed_ips, 0, ip_address]}
|
||||||
ip_address_uri:
|
ip_address_uri:
|
||||||
description: Virtual IP network IP (for compatibility with vip_v6.yaml)
|
description: Virtual IP network IP (for compatibility with vip_v6.yaml)
|
||||||
value: {get_attr: [VipPort, fixed_ips, 0, ip_address]}
|
value:
|
||||||
|
str_replace:
|
||||||
|
template:
|
||||||
|
make_url:
|
||||||
|
host: {get_attr: [VipPort, fixed_ips, 0, ip_address]}
|
||||||
|
params:
|
||||||
|
//: ''
|
||||||
ip_subnet:
|
ip_subnet:
|
||||||
description: IP/Subnet CIDR for the ctlplane network.
|
description: IP/Subnet CIDR for the ctlplane network.
|
||||||
value:
|
value:
|
||||||
|
|
|
@ -43,7 +43,13 @@ resources:
|
||||||
- - {get_param: ControlPlaneIp}
|
- - {get_param: ControlPlaneIp}
|
||||||
- '/'
|
- '/'
|
||||||
- {get_param: ControlPlaneSubnetCidr}
|
- {get_param: ControlPlaneSubnetCidr}
|
||||||
ctlplane_uri: {get_param: ControlPlaneIp}
|
ctlplane_uri:
|
||||||
|
str_replace:
|
||||||
|
template:
|
||||||
|
make_url:
|
||||||
|
host: {get_param: ControlPlaneIp}
|
||||||
|
params:
|
||||||
|
//: ''
|
||||||
{%- for network in networks if network.enabled|default(true) %}
|
{%- for network in networks if network.enabled|default(true) %}
|
||||||
{{network.name_lower}}: {get_param: {{network.name}}Ip}
|
{{network.name_lower}}: {get_param: {{network.name}}Ip}
|
||||||
{{network.name_lower}}_subnet: {get_param: {{network.name}}IpSubnet}
|
{{network.name_lower}}_subnet: {get_param: {{network.name}}IpSubnet}
|
||||||
|
|
|
@ -31,8 +31,20 @@ outputs:
|
||||||
for a specific machine.
|
for a specific machine.
|
||||||
value:
|
value:
|
||||||
ctlplane: {get_param: ControlPlaneIP}
|
ctlplane: {get_param: ControlPlaneIP}
|
||||||
ctlplane_uri: {get_param: ControlPlaneIP}
|
ctlplane_uri:
|
||||||
|
str_replace:
|
||||||
|
template:
|
||||||
|
make_url:
|
||||||
|
host: {get_param: ControlPlaneIP}
|
||||||
|
params:
|
||||||
|
//: ''
|
||||||
{%- for network in networks if network.vip|default(false) and network.enabled|default(true) %}
|
{%- for network in networks if network.vip|default(false) and network.enabled|default(true) %}
|
||||||
{{network.name_lower}}: {get_param: {{network.name}}NetworkVip}
|
{{network.name_lower}}: {get_param: {{network.name}}NetworkVip}
|
||||||
{{network.name_lower}}_uri: {get_param: {{network.name}}NetworkVip}
|
{{network.name_lower}}_uri:
|
||||||
|
str_replace:
|
||||||
|
template:
|
||||||
|
make_url:
|
||||||
|
host: {get_param: {{network.name}}NetworkVip}
|
||||||
|
params:
|
||||||
|
//: ''
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
|
|
|
@ -31,13 +31,20 @@ outputs:
|
||||||
for a specific machine.
|
for a specific machine.
|
||||||
value:
|
value:
|
||||||
ctlplane: {get_param: ControlPlaneIP}
|
ctlplane: {get_param: ControlPlaneIP}
|
||||||
ctlplane_uri: {get_param: ControlPlaneIP}
|
ctlplane_uri:
|
||||||
|
str_replace:
|
||||||
|
template:
|
||||||
|
make_url:
|
||||||
|
host: {get_param: ControlPlaneIP}
|
||||||
|
params:
|
||||||
|
//: ''
|
||||||
{%- for network in networks if network.vip|default(false) and network.enabled|default(true) %}
|
{%- for network in networks if network.vip|default(false) and network.enabled|default(true) %}
|
||||||
{{network.name_lower}}: {get_param: {{network.name}}NetworkVip}
|
{{network.name_lower}}: {get_param: {{network.name}}NetworkVip}
|
||||||
{{network.name_lower}}_uri:
|
{{network.name_lower}}_uri:
|
||||||
list_join:
|
str_replace:
|
||||||
- ''
|
template:
|
||||||
- - '['
|
make_url:
|
||||||
- {get_param: {{network.name}}NetworkVip}
|
host: {get_param: {{network.name}}NetworkVip}
|
||||||
- ']'
|
params:
|
||||||
|
//: ''
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
|
|
|
@ -60,7 +60,13 @@ outputs:
|
||||||
value: {get_param: ControlPlaneIP}
|
value: {get_param: ControlPlaneIP}
|
||||||
ip_address_uri:
|
ip_address_uri:
|
||||||
description: pass thru network IP (for compatibility with vip_v6.yaml)
|
description: pass thru network IP (for compatibility with vip_v6.yaml)
|
||||||
value: {get_param: ControlPlaneIP}
|
value:
|
||||||
|
str_replace:
|
||||||
|
template:
|
||||||
|
make_url:
|
||||||
|
host: {get_param: ControlPlaneIP}
|
||||||
|
params:
|
||||||
|
//: ''
|
||||||
ip_subnet:
|
ip_subnet:
|
||||||
description: IP/Subnet CIDR for the pass thru network IP
|
description: IP/Subnet CIDR for the pass thru network IP
|
||||||
value:
|
value:
|
||||||
|
|
|
@ -82,18 +82,14 @@ outputs:
|
||||||
description: {{network.name}} network IP
|
description: {{network.name}} network IP
|
||||||
value: {get_attr: [{{network.name}}Port, fixed_ips, 0, ip_address]}
|
value: {get_attr: [{{network.name}}Port, fixed_ips, 0, ip_address]}
|
||||||
ip_address_uri:
|
ip_address_uri:
|
||||||
{%- if network.ipv6 or ipv6_override|default(false) %}
|
|
||||||
description: {{network.name}} network IP (with brackets for IPv6 URLs)
|
description: {{network.name}} network IP (with brackets for IPv6 URLs)
|
||||||
value:
|
value:
|
||||||
list_join:
|
str_replace:
|
||||||
- ''
|
template:
|
||||||
- - '['
|
make_url:
|
||||||
- {get_attr: [{{network.name}}Port, fixed_ips, 0, ip_address]}
|
host: {get_attr: [{{network.name}}Port, fixed_ips, 0, ip_address]}
|
||||||
- ']'
|
params:
|
||||||
{%- else %}
|
//: ''
|
||||||
description: {{network.name}} network IP (for compatibility with IPv6 URLs)
|
|
||||||
value: {get_attr: [{{network.name}}Port, fixed_ips, 0, ip_address]}
|
|
||||||
{%- endif %}
|
|
||||||
ip_subnet:
|
ip_subnet:
|
||||||
description: IP/Subnet CIDR for the {{network.name}} network IP
|
description: IP/Subnet CIDR for the {{network.name}} network IP
|
||||||
value:
|
value:
|
||||||
|
|
|
@ -58,18 +58,14 @@ outputs:
|
||||||
description: {{network.name}} network IP
|
description: {{network.name}} network IP
|
||||||
value: {get_param: [IPPool, {get_param: {{network.name}}NetName}, {get_param: NodeIndex}]}
|
value: {get_param: [IPPool, {get_param: {{network.name}}NetName}, {get_param: NodeIndex}]}
|
||||||
ip_address_uri:
|
ip_address_uri:
|
||||||
{%- if network.ipv6 or ipv6_override|default(false) %}
|
|
||||||
description: {{network.name}} network IP (with brackets for IPv6 URLs)
|
description: {{network.name}} network IP (with brackets for IPv6 URLs)
|
||||||
value:
|
value:
|
||||||
list_join:
|
str_replace:
|
||||||
- ''
|
template:
|
||||||
- - '['
|
make_url:
|
||||||
- {get_param: [IPPool, {get_param: {{network.name}}NetName}, {get_param: NodeIndex}]}
|
host: {get_param: [IPPool, {get_param: {{network.name}}NetName}, {get_param: NodeIndex}]}
|
||||||
- ']'
|
params:
|
||||||
{%- else %}
|
//: ''
|
||||||
description: {{network.name}} network IP (for compatibility with {{network.name_lower}}_v6.yaml)
|
|
||||||
value: {get_param: [IPPool, {get_param: {{network.name}}NetName}, {get_param: NodeIndex}]}
|
|
||||||
{%- endif %}
|
|
||||||
ip_subnet:
|
ip_subnet:
|
||||||
description: IP/Subnet CIDR for the {{network.name}} network IP
|
description: IP/Subnet CIDR for the {{network.name}} network IP
|
||||||
value:
|
value:
|
||||||
|
|
|
@ -77,7 +77,13 @@ outputs:
|
||||||
value: {get_attr: [VipPort, fixed_ips, 0, ip_address]}
|
value: {get_attr: [VipPort, fixed_ips, 0, ip_address]}
|
||||||
ip_address_uri:
|
ip_address_uri:
|
||||||
description: Virtual IP network IP (for compatibility with vip.yaml)
|
description: Virtual IP network IP (for compatibility with vip.yaml)
|
||||||
value: {get_attr: [VipPort, fixed_ips, 0, ip_address]}
|
value:
|
||||||
|
str_replace:
|
||||||
|
template:
|
||||||
|
make_url:
|
||||||
|
host: {get_attr: [VipPort, fixed_ips, 0, ip_address]}
|
||||||
|
params:
|
||||||
|
//: ''
|
||||||
ip_subnet:
|
ip_subnet:
|
||||||
description: IP/Subnet CIDR for the network associated with this IP
|
description: IP/Subnet CIDR for the network associated with this IP
|
||||||
value:
|
value:
|
||||||
|
|
|
@ -76,13 +76,14 @@ outputs:
|
||||||
description: Virtual IP network IP
|
description: Virtual IP network IP
|
||||||
value: {get_attr: [VipPort, fixed_ips, 0, ip_address]}
|
value: {get_attr: [VipPort, fixed_ips, 0, ip_address]}
|
||||||
ip_address_uri:
|
ip_address_uri:
|
||||||
description: Virtual IP with brackets suitable for a URL
|
description: Virtual IP network IP (for compatibility with vip.yaml)
|
||||||
value:
|
value:
|
||||||
list_join:
|
str_replace:
|
||||||
- ''
|
template:
|
||||||
- - '['
|
make_url:
|
||||||
- {get_attr: [VipPort, fixed_ips, 0, ip_address]}
|
host: {get_attr: [VipPort, fixed_ips, 0, ip_address]}
|
||||||
- ']'
|
params:
|
||||||
|
//: ''
|
||||||
ip_subnet:
|
ip_subnet:
|
||||||
description: IP/Subnet CIDR for the network associated with this IP
|
description: IP/Subnet CIDR for the network associated with this IP
|
||||||
value:
|
value:
|
||||||
|
|
Loading…
Reference in New Issue