Replacing the count with loop.index for indexing

Replacing the count with loop.index in all-nodes-config.j2.yaml
after the Jinja changes

Change-Id: Id703f6c85f27cdde0b2d48b18e938e55d31a491a
Closes-Bug: #1754679
This commit is contained in:
waleed mousa 2018-03-11 09:40:10 -04:00
parent 448598d681
commit 77ae5a61a0
1 changed files with 1 additions and 3 deletions

View File

@ -179,15 +179,13 @@ resources:
# the internal_api_virtual_ip is needed for contrail only
internal_api_virtual_ip: {get_param: [NetVipMap, {get_param: InternalApiNetName}]}
network_virtual_ips:
{% set count = 1 %}
{%- for network in networks if network.vip|default(false) %}
# External virtual ip is currently being handled separately as public_virtual_ip.
# Likewise, optional StorageNFS virtual ip is handled separately as ganesha_vip.
{%- if network.name != 'External' and network.name != 'StorageNFS' %}
{{network.name_lower}}:
ip_address: {get_param: [NetVipMap, {get_param: {{network.name}}NetName}]}
index: {{count}}
{% set count = count + 1 %}
index: {{loop.index}}
{%- endif %}
{%- endfor %}
redis_vip: {get_param: RedisVirtualIP}