diff --git a/network/ports/ctlplane_vip.yaml b/network/ports/ctlplane_vip.yaml index a4b32be1da..93cb15b355 100644 --- a/network/ports/ctlplane_vip.yaml +++ b/network/ports/ctlplane_vip.yaml @@ -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: diff --git a/network/ports/net_ip_map.j2.yaml b/network/ports/net_ip_map.j2.yaml index 208a565f33..54d00540cf 100644 --- a/network/ports/net_ip_map.j2.yaml +++ b/network/ports/net_ip_map.j2.yaml @@ -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} diff --git a/network/ports/net_vip_map_external.j2.yaml b/network/ports/net_vip_map_external.j2.yaml index 056909e59e..dfa756b460 100644 --- a/network/ports/net_vip_map_external.j2.yaml +++ b/network/ports/net_vip_map_external.j2.yaml @@ -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 %} diff --git a/network/ports/net_vip_map_external_v6.j2.yaml b/network/ports/net_vip_map_external_v6.j2.yaml index 935c2b845f..dfa756b460 100644 --- a/network/ports/net_vip_map_external_v6.j2.yaml +++ b/network/ports/net_vip_map_external_v6.j2.yaml @@ -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 %} diff --git a/network/ports/noop.yaml b/network/ports/noop.yaml index d572371aeb..962da6ca65 100644 --- a/network/ports/noop.yaml +++ b/network/ports/noop.yaml @@ -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: diff --git a/network/ports/port.j2 b/network/ports/port.j2 index 89624256f0..a272f49144 100644 --- a/network/ports/port.j2 +++ b/network/ports/port.j2 @@ -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: diff --git a/network/ports/port_from_pool.j2 b/network/ports/port_from_pool.j2 index d20e6d74b4..16f019bb33 100644 --- a/network/ports/port_from_pool.j2 +++ b/network/ports/port_from_pool.j2 @@ -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: diff --git a/network/ports/vip.yaml b/network/ports/vip.yaml index 4010ea11de..8d0400dd91 100644 --- a/network/ports/vip.yaml +++ b/network/ports/vip.yaml @@ -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: diff --git a/network/ports/vip_v6.yaml b/network/ports/vip_v6.yaml index ca15dc955a..0902e92a87 100644 --- a/network/ports/vip_v6.yaml +++ b/network/ports/vip_v6.yaml @@ -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: