Add load_minigraph option to include traffic-shift-away during config migration (#11403)

This commit is contained in:
tjchadaga 2022-07-12 10:08:58 -07:00 committed by GitHub
parent d0ae99d979
commit 4f95974669
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -109,7 +109,15 @@ run_hookdir() {
reload_minigraph() reload_minigraph()
{ {
echo "Reloading minigraph..." echo "Reloading minigraph..."
if
[[ "$(sonic-cfggen -d -v DEVICE_METADATA.localhost.subtype | tr [:upper:] [:lower:])" == *"dualtor"* ]] ||
[[ "$(sonic-cfggen -d -v DEVICE_METADATA.localhost.type | tr [:upper:] [:lower:])" == *"leafrouter"* ]];
then
#Keep device isolated with traffic-shift-away option on LeafRouter and Dualtor
config load_minigraph -y -n -t
else
config load_minigraph -y -n config load_minigraph -y -n
fi
config save -y config save -y
} }