Merge "Use make_url to wrap IPv6 addresses in brackets."

This commit is contained in:
Zuul 2019-05-29 12:33:20 +00:00 committed by Gerrit Code Review
commit ef88503c03
9 changed files with 74 additions and 38 deletions

View File

@ -69,7 +69,13 @@ outputs:
value: {get_attr: [VipPort, fixed_ips, 0, ip_address]}
ip_address_uri:
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:
description: IP/Subnet CIDR for the ctlplane network.
value:

View File

@ -43,7 +43,13 @@ resources:
- - {get_param: ControlPlaneIp}
- '/'
- {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) %}
{{network.name_lower}}: {get_param: {{network.name}}Ip}
{{network.name_lower}}_subnet: {get_param: {{network.name}}IpSubnet}

View File

@ -31,8 +31,20 @@ outputs:
for a specific machine.
value:
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) %}
{{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 %}

View File

@ -31,13 +31,20 @@ outputs:
for a specific machine.
value:
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) %}
{{network.name_lower}}: {get_param: {{network.name}}NetworkVip}
{{network.name_lower}}_uri:
list_join:
- ''
- - '['
- {get_param: {{network.name}}NetworkVip}
- ']'
str_replace:
template:
make_url:
host: {get_param: {{network.name}}NetworkVip}
params:
//: ''
{%- endfor %}

View File

@ -60,7 +60,13 @@ outputs:
value: {get_param: ControlPlaneIP}
ip_address_uri:
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:
description: IP/Subnet CIDR for the pass thru network IP
value:

View File

@ -82,18 +82,14 @@ outputs:
description: {{network.name}} network IP
value: {get_attr: [{{network.name}}Port, fixed_ips, 0, ip_address]}
ip_address_uri:
{%- if network.ipv6 or ipv6_override|default(false) %}
description: {{network.name}} network IP (with brackets for IPv6 URLs)
value:
list_join:
- ''
- - '['
- {get_attr: [{{network.name}}Port, fixed_ips, 0, ip_address]}
- ']'
{%- else %}
description: {{network.name}} network IP (for compatibility with IPv6 URLs)
value: {get_attr: [{{network.name}}Port, fixed_ips, 0, ip_address]}
{%- endif %}
str_replace:
template:
make_url:
host: {get_attr: [{{network.name}}Port, fixed_ips, 0, ip_address]}
params:
//: ''
ip_subnet:
description: IP/Subnet CIDR for the {{network.name}} network IP
value:

View File

@ -58,18 +58,14 @@ outputs:
description: {{network.name}} network IP
value: {get_param: [IPPool, {get_param: {{network.name}}NetName}, {get_param: NodeIndex}]}
ip_address_uri:
{%- if network.ipv6 or ipv6_override|default(false) %}
description: {{network.name}} network IP (with brackets for IPv6 URLs)
value:
list_join:
- ''
- - '['
- {get_param: [IPPool, {get_param: {{network.name}}NetName}, {get_param: NodeIndex}]}
- ']'
{%- 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 %}
str_replace:
template:
make_url:
host: {get_param: [IPPool, {get_param: {{network.name}}NetName}, {get_param: NodeIndex}]}
params:
//: ''
ip_subnet:
description: IP/Subnet CIDR for the {{network.name}} network IP
value:

View File

@ -77,7 +77,13 @@ outputs:
value: {get_attr: [VipPort, fixed_ips, 0, ip_address]}
ip_address_uri:
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:
description: IP/Subnet CIDR for the network associated with this IP
value:

View File

@ -76,13 +76,14 @@ outputs:
description: Virtual IP network IP
value: {get_attr: [VipPort, fixed_ips, 0, ip_address]}
ip_address_uri:
description: Virtual IP with brackets suitable for a URL
description: Virtual IP network IP (for compatibility with vip.yaml)
value:
list_join:
- ''
- - '['
- {get_attr: [VipPort, fixed_ips, 0, ip_address]}
- ']'
str_replace:
template:
make_url:
host: {get_attr: [VipPort, fixed_ips, 0, ip_address]}
params:
//: ''
ip_subnet:
description: IP/Subnet CIDR for the network associated with this IP
value: