[xdf] Fix parsing of non-range private vlan(s) 55/57655/3
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Wed, 9 May 2018 17:36:34 +0000 (19:36 +0200)
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Tue, 22 May 2018 15:48:08 +0000 (15:48 +0000)
Private (tenant) vlan range support introduced a regression in parsing
PDF/IDF with a single vlan (no range) due to the value being
interpreted as an int instead of string.

Change-Id: Id5d67c4c516a9bb807ffa5e111ead5cbcee7e2ca
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
(cherry picked from commit 0bc600fd4d269a17ebcf28700b46e199d66c25db)

mcp/reclass/classes/cluster/.gitignore
mcp/reclass/classes/cluster/mcp-pike-odl-ha/openstack/compute_pdf.yml.j2
mcp/reclass/classes/cluster/mcp-pike-ovn-ha/openstack/compute_pdf.yml.j2
mcp/reclass/classes/cluster/mcp-pike-ovs-ha/openstack/compute_pdf.yml.j2

index a6b1b7d..7d40a2b 100644 (file)
@@ -15,3 +15,5 @@ mcp-pike-ovn-ha/infra/init_vcp.yml
 mcp-pike-ovn-ha/infra/kvm.yml
 mcp-pike-odl-ha/opendaylight/control.yml
 mcp-pike-odl-ha/openstack/init.yml
+mcp-pike-odl-noha/infra/config.yml
+mcp-pike-odl-noha/openstack/compute.yml
index 912537f..7cf4c88 100644 (file)
@@ -8,7 +8,7 @@
 {%- import 'net_map.j2' as nm with context %}
 {#- Filter-out NIC duplicates by constructing a dict (used NICs only) #}
 {%- set nics = { nm.cmp001.nic_private: True } %}
-{%- set vlan_private_start = nm.vlan_private.rsplit('-')[0] %}
+{%- set vlan_private_start = (nm.vlan_private | string).rsplit('-')[0] %}
 {%- set vlans = { vlan_private_start: nm.cmp001.nic_private } %}
 ---
 parameters:
index 912537f..7cf4c88 100644 (file)
@@ -8,7 +8,7 @@
 {%- import 'net_map.j2' as nm with context %}
 {#- Filter-out NIC duplicates by constructing a dict (used NICs only) #}
 {%- set nics = { nm.cmp001.nic_private: True } %}
-{%- set vlan_private_start = nm.vlan_private.rsplit('-')[0] %}
+{%- set vlan_private_start = (nm.vlan_private | string).rsplit('-')[0] %}
 {%- set vlans = { vlan_private_start: nm.cmp001.nic_private } %}
 ---
 parameters:
index 912537f..7cf4c88 100644 (file)
@@ -8,7 +8,7 @@
 {%- import 'net_map.j2' as nm with context %}
 {#- Filter-out NIC duplicates by constructing a dict (used NICs only) #}
 {%- set nics = { nm.cmp001.nic_private: True } %}
-{%- set vlan_private_start = nm.vlan_private.rsplit('-')[0] %}
+{%- set vlan_private_start = (nm.vlan_private | string).rsplit('-')[0] %}
 {%- set vlans = { vlan_private_start: nm.cmp001.nic_private } %}
 ---
 parameters: