From 0ce61946ae7336aed927d330687bcfc568e3ed7c Mon Sep 17 00:00:00 2001 From: dennis_chiu Date: Tue, 20 Oct 2020 14:27:51 +0800 Subject: [PATCH] The current ZTP template does not generate 'BREAKOUT_CFG' when dynamic port breakout(DPB) is supported on the platform. Revise the ZTP template so that the DPB CLI can be excuted when config is generated from the ZTP template. --- src/usr/lib/ztp/templates/ztp-config.j2 | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/usr/lib/ztp/templates/ztp-config.j2 b/src/usr/lib/ztp/templates/ztp-config.j2 index b8f7d95..3c2cdac 100644 --- a/src/usr/lib/ztp/templates/ztp-config.j2 +++ b/src/usr/lib/ztp/templates/ztp-config.j2 @@ -1,4 +1,15 @@ { +{% if BREAKOUT_CFG %} + "BREAKOUT_CFG": { +{%- for intf in BREAKOUT_CFG -%} + "{{intf}}": { +{% if BREAKOUT_CFG[intf].brkout_mode is defined and BREAKOUT_CFG[intf].brkout_mode != "" %} + "brkout_mode": "{{ BREAKOUT_CFG[intf].brkout_mode }}" +{% endif %} + }{%- if loop.last == False -%},{% endif %} +{%- endfor %} + }, +{% endif %} "DEVICE_METADATA": { "localhost" : { "hwsku" : "{{ DEVICE_METADATA.localhost.hwsku }}",