Only add internal_api_virtual_ip if InternalApi is in network_data

Add's a conditional to only include internal_api_virtual_ipi
if InternalApi network is defined in custom networks.

Closes-Bug: 1772124
Change-Id: I332355dc63c414aa411b3c1e09dc950b54d5d175
This commit is contained in:
Harald Jensås 2018-05-19 00:38:32 +02:00
parent 51f9c5c52e
commit 8cfaf354d2

View File

@ -176,8 +176,6 @@ resources:
get_param: [NetVipMap, {get_param: [ServiceNetMap, keystone_public_api_network]}]
public_virtual_ip: {get_param: [NetVipMap, {get_param: ExternalNetName}]}
controller_virtual_ip: {get_param: [NetVipMap, ctlplane]}
# the internal_api_virtual_ip is needed for contrail only
internal_api_virtual_ip: {get_param: [NetVipMap, {get_param: InternalApiNetName}]}
network_virtual_ips:
{%- for network in networks if network.vip|default(false) %}
# External virtual ip is currently being handled separately as public_virtual_ip.
@ -187,6 +185,10 @@ resources:
ip_address: {get_param: [NetVipMap, {get_param: {{network.name}}NetName}]}
index: {{loop.index}}
{%- endif %}
{%- if network.name == 'InternalApi' %}
# the internal_api_virtual_ip is needed for contrail only
internal_api_virtual_ip: {get_param: [NetVipMap, {get_param: InternalApiNetName}]}
{%- endif %}
{%- endfor %}
redis_vip: {get_param: RedisVirtualIP}
{%- for network in networks if network.name == 'StorageNFS' %}