Skip to content

Commit 12e8c8f

Browse files
authored
[MinigraphTemplate]add management v6 address and minigraph paser to ignore V6 address for now (#222)
1 parent cdf961d commit 12e8c8f

File tree

5 files changed

+27
-1
lines changed

5 files changed

+27
-1
lines changed

ansible/library/minigraph_facts.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,9 @@ def parse_dpg(dpg, hname):
192192
for mgmtintf in mgmtintfs.findall(str(QName(ns1, "ManagementIPInterface"))):
193193
ipprefix = mgmtintf.find(str(QName(ns1, "PrefixStr"))).text
194194
mgmtipn = ipaddress.IPNetwork(ipprefix)
195+
# Ignore IPv6 management address
196+
if mgmtipn.version == 6:
197+
continue
195198
ipaddr = mgmtipn.ip
196199
prefix_len = str(mgmtipn.prefixlen)
197200
ipmask = mgmtipn.netmask

ansible/templates/topo/t0.j2

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,14 @@
9797
</a:Prefix>
9898
<a:PrefixStr>{{ ansible_host }}/{{ mgmt_subnet_mask_length }}</a:PrefixStr>
9999
</a:ManagementIPInterface>
100+
<a:ManagementIPInterface>
101+
<Name>V6HostIP</Name>
102+
<AttachTo>eth0</AttachTo>
103+
<a:Prefix xmlns:b="Microsoft.Search.Autopilot.Evolution">
104+
<b:IPPrefix>FC00:2::32/64</b:IPPrefix>
105+
</a:Prefix>
106+
<a:PrefixStr>FC00:2::32/64</a:PrefixStr>
107+
</a:ManagementIPInterface>
100108
</ManagementIPInterfaces>
101109
<ManagementVIPInterfaces xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution"/>
102110
<MplsInterfaces/>

ansible/templates/topo/t1-lag.j2

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,14 @@
111111
</a:Prefix>
112112
<a:PrefixStr>{{ ansible_host }}/{{ mgmt_subnet_mask_length }}</a:PrefixStr>
113113
</a:ManagementIPInterface>
114+
<a:ManagementIPInterface>
115+
<Name>V6HostIP</Name>
116+
<AttachTo>eth0</AttachTo>
117+
<a:Prefix xmlns:b="Microsoft.Search.Autopilot.Evolution">
118+
<b:IPPrefix>FC00:2::32/64</b:IPPrefix>
119+
</a:Prefix>
120+
<a:PrefixStr>FC00:2::32/64</a:PrefixStr>
121+
</a:ManagementIPInterface>
114122
</ManagementIPInterfaces>
115123
<MplsInterfaces/>
116124
<MplsTeInterfaces/>

ansible/templates/topo/t1.j2

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,14 @@
105105
</a:Prefix>
106106
<a:PrefixStr>{{ ansible_host }}/{{ mgmt_subnet_mask_length }}</a:PrefixStr>
107107
</a:ManagementIPInterface>
108+
<a:ManagementIPInterface>
109+
<Name>V6HostIP</Name>
110+
<AttachTo>eth0</AttachTo>
111+
<a:Prefix xmlns:b="Microsoft.Search.Autopilot.Evolution">
112+
<b:IPPrefix>FC00:2::32/64</b:IPPrefix>
113+
</a:Prefix>
114+
<a:PrefixStr>FC00:2::32/64</a:PrefixStr>
115+
</a:ManagementIPInterface>
108116
</ManagementIPInterfaces>
109117
<MplsInterfaces/>
110118
<MplsTeInterfaces/>

ansible/templates/topo/updategraph.conf

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)