From 862ded02f4560b1703a8e3add4f16cf95a513b2e Mon Sep 17 00:00:00 2001 From: Longxiang Lyu Date: Thu, 23 Jun 2022 02:43:08 -0700 Subject: [PATCH] [dualtor][minigraph] Support new minigraph schema for SoC IP Signed-off-by: Longxiang Lyu --- ansible/templates/minigraph_dpg.j2 | 65 ++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/ansible/templates/minigraph_dpg.j2 b/ansible/templates/minigraph_dpg.j2 index f632de4c14d..bc04123ff04 100644 --- a/ansible/templates/minigraph_dpg.j2 +++ b/ansible/templates/minigraph_dpg.j2 @@ -265,6 +265,71 @@ +{% if mux_cable_facts is defined %} +{% for cable in dual_tor_facts['cables'] %} +{% set intf_index = port_alias.index(cable['dut_intf'])|string %} + + + + + LoopbackInterface + HostIP + Loopback0 + + {{ mux_cable_facts[intf_index]['server_ipv4'] }} + + {{ mux_cable_facts[intf_index]['server_ipv4'] }} + + + LoopbackInterface + HostIP1 + Loopback0 + + {{ mux_cable_facts[intf_index]['server_ipv6'] }} + + {{ mux_cable_facts[intf_index]['server_ipv6'] }} + +{% if 'soc_ipv4' in mux_cable_facts[intf_index] %} + + LoopbackInterface + SoCHostIP0 + Servers{{ loop.index - 1 }}SOC + + {{ mux_cable_facts[intf_index]['soc_ipv4'] }} + + {{ mux_cable_facts[intf_index]['soc_ipv4'] }} + +{% endif %} +{% if 'soc_ipv6' in mux_cable_facts[intf_index] %} + + LoopbackInterface + SoCHostIP1 + Servers{{ loop.index - 1 }}SOC + + {{ mux_cable_facts[intf_index]['soc_ipv6'] }} + + {{ mux_cable_facts[intf_index]['soc_ipv6'] }} + + +{% endif %} + + + + + + Servers{{ loop.index - 1 }} + + + + + + + + + + +{% endfor %} +{% endif %} {% include 'minigraph_dpg_asic.j2' %}