From 049669fda1324897cb2c6043b7acf0a8660c0f21 Mon Sep 17 00:00:00 2001 From: cjmakes Date: Sun, 29 Sep 2024 12:30:10 -0700 Subject: [PATCH 1/8] Removes newlines from switch configs Result of running script to remove backslashes ```bash find . -type f -exec sed -i ':a;N;$!ba;s/\\\n\s*//g' {} \; ``` --- switch-configuration/config/types/Booth | 6 +- switch-configuration/config/types/Catwalk | 120 ++++++---------------- switch-configuration/config/types/cfIDF | 6 +- switch-configuration/config/types/exIDF | 100 +++++------------- 4 files changed, 59 insertions(+), 173 deletions(-) diff --git a/switch-configuration/config/types/Booth b/switch-configuration/config/types/Booth index 83710210..f23b4d12 100644 --- a/switch-configuration/config/types/Booth +++ b/switch-configuration/config/types/Booth @@ -1,8 +1,6 @@ // Expo Booth Area switch Template -TRUNK ge-0/0/0 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra,exAVLAN, \ - exSigns,exVmVendor,vendor_backbone - Uplink -TRUNK ge-0/0/1 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra,exAVLAN, \ - exSigns,exVmVendor,vendor_backbone - Downlink +TRUNK ge-0/0/0 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra,exAVLAN, exSigns,exVmVendor,vendor_backbone - Uplink +TRUNK ge-0/0/1 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra,exAVLAN, exSigns,exVmVendor,vendor_backbone - Downlink RSRVD 6 TRUNK ge-0/0/8 exInfra,exSCALE-SLOW,exSCALE-FAST POE AP TRUNK ge-0/0/9 exInfra,exSCALE-SLOW,exSCALE-FAST POE AP diff --git a/switch-configuration/config/types/Catwalk b/switch-configuration/config/types/Catwalk index b747ac89..198299af 100644 --- a/switch-configuration/config/types/Catwalk +++ b/switch-configuration/config/types/Catwalk @@ -1,94 +1,34 @@ // Expo Center Catwalk Switch Configuration -TRUNK ge-0/0/0 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, \ - exAVLAN,vendor_backbone,exVmVendor \ - exSigns,HAM_BRIDGE - Uplink -TRUNK ge-0/0/1 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, \ - exAVLAN,vendor_backbone,exVmVendor \ - exSigns,HAM_BRIDGE - Downlink -TRUNK ge-0/0/2 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, \ - exAVLAN,vendor_backbone,exVmVendor \ - exSigns,HAM_BRIDGE - Downlink -TRUNK ge-0/0/3 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, \ - exAVLAN,vendor_backbone,exVmVendor \ - exSigns,HAM_BRIDGE - Downlink -TRUNK ge-0/0/4 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, \ - exAVLAN,vendor_backbone,exVmVendor \ - exSigns,HAM_BRIDGE - Downlink -TRUNK ge-0/0/5 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, \ - exAVLAN,vendor_backbone,exVmVendor \ - exSigns,HAM_BRIDGE - Downlink -TRUNK ge-0/0/6 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, \ - exAVLAN,vendor_backbone,exVmVendor \ - exSigns,HAM_BRIDGE - Downlink -TRUNK ge-0/0/7 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, \ - exAVLAN,vendor_backbone,exVmVendor \ - exSigns,HAM_BRIDGE - Downlink -TRUNK ge-0/0/8 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, \ - exAVLAN,vendor_backbone,exVmVendor \ - exSigns,HAM_BRIDGE - Downlink -TRUNK ge-0/0/9 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, \ - exAVLAN,vendor_backbone,exVmVendor \ - exSigns,HAM_BRIDGE - Downlink -TRUNK ge-0/0/10 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, \ - exAVLAN,vendor_backbone,exVmVendor \ - exSigns,HAM_BRIDGE - Downlink -TRUNK ge-0/0/11 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, \ - exAVLAN,vendor_backbone,exVmVendor \ - exSigns,HAM_BRIDGE - Downlink -TRUNK ge-0/0/12 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, \ - exAVLAN,vendor_backbone,exVmVendor \ - exSigns,HAM_BRIDGE - Downlink -TRUNK ge-0/0/13 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, \ - exAVLAN,vendor_backbone,exVmVendor \ - exSigns,HAM_BRIDGE - Downlink -TRUNK ge-0/0/14 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, \ - exAVLAN,vendor_backbone,exVmVendor \ - exSigns,HAM_BRIDGE - Downlink -TRUNK ge-0/0/15 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, \ - exAVLAN,vendor_backbone,exVmVendor \ - exSigns,HAM_BRIDGE - Downlink -TRUNK ge-0/0/16 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, \ - exAVLAN,vendor_backbone,exVmVendor \ - exSigns,HAM_BRIDGE - Downlink -TRUNK ge-0/0/17 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, \ - exAVLAN,vendor_backbone,exVmVendor \ - exSigns,HAM_BRIDGE - Downlink -TRUNK ge-0/0/18 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, \ - exAVLAN,vendor_backbone,exVmVendor \ - exSigns,HAM_BRIDGE - Downlink -TRUNK ge-0/0/19 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, \ - exAVLAN,vendor_backbone,exVmVendor \ - exSigns,HAM_BRIDGE - Downlink -TRUNK ge-0/0/20 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, \ - exAVLAN,vendor_backbone,exVmVendor \ - exSigns,HAM_BRIDGE - Downlink -TRUNK ge-0/0/21 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, \ - exAVLAN,vendor_backbone,exVmVendor \ - exSigns,HAM_BRIDGE - Downlink -TRUNK ge-0/0/22 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, \ - exAVLAN,vendor_backbone,exVmVendor \ - exSigns,HAM_BRIDGE - Downlink -TRUNK ge-0/0/23 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, \ - exAVLAN,vendor_backbone,exVmVendor \ - exSigns,HAM_BRIDGE - Downlink -TRUNK ge-0/0/24 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, \ - exAVLAN,vendor_backbone,exVmVendor \ - exSigns,HAM_BRIDGE - Downlink -TRUNK ge-0/0/25 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, \ - exAVLAN,vendor_backbone,exVmVendor \ - exSigns,HAM_BRIDGE - Downlink -TRUNK ge-0/0/26 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, \ - exAVLAN,vendor_backbone,exVmVendor \ - exSigns,HAM_BRIDGE - Downlink -TRUNK ge-0/0/27 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, \ - exAVLAN,vendor_backbone,exVmVendor \ - exSigns,HAM_BRIDGE - Downlink -TRUNK ge-0/0/28 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, \ - exAVLAN,vendor_backbone,exVmVendor \ - exSigns,HAM_BRIDGE - Downlink -TRUNK ge-0/0/29 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, \ - exAVLAN,vendor_backbone,exVmVendor \ - exSigns,exVmVendor,HAM_BRIDGE - Downlink +TRUNK ge-0/0/0 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, exAVLAN,vendor_backbone,exVmVendor exSigns,HAM_BRIDGE - Uplink +TRUNK ge-0/0/1 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, exAVLAN,vendor_backbone,exVmVendor exSigns,HAM_BRIDGE - Downlink +TRUNK ge-0/0/2 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, exAVLAN,vendor_backbone,exVmVendor exSigns,HAM_BRIDGE - Downlink +TRUNK ge-0/0/3 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, exAVLAN,vendor_backbone,exVmVendor exSigns,HAM_BRIDGE - Downlink +TRUNK ge-0/0/4 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, exAVLAN,vendor_backbone,exVmVendor exSigns,HAM_BRIDGE - Downlink +TRUNK ge-0/0/5 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, exAVLAN,vendor_backbone,exVmVendor exSigns,HAM_BRIDGE - Downlink +TRUNK ge-0/0/6 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, exAVLAN,vendor_backbone,exVmVendor exSigns,HAM_BRIDGE - Downlink +TRUNK ge-0/0/7 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, exAVLAN,vendor_backbone,exVmVendor exSigns,HAM_BRIDGE - Downlink +TRUNK ge-0/0/8 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, exAVLAN,vendor_backbone,exVmVendor exSigns,HAM_BRIDGE - Downlink +TRUNK ge-0/0/9 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, exAVLAN,vendor_backbone,exVmVendor exSigns,HAM_BRIDGE - Downlink +TRUNK ge-0/0/10 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, exAVLAN,vendor_backbone,exVmVendor exSigns,HAM_BRIDGE - Downlink +TRUNK ge-0/0/11 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, exAVLAN,vendor_backbone,exVmVendor exSigns,HAM_BRIDGE - Downlink +TRUNK ge-0/0/12 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, exAVLAN,vendor_backbone,exVmVendor exSigns,HAM_BRIDGE - Downlink +TRUNK ge-0/0/13 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, exAVLAN,vendor_backbone,exVmVendor exSigns,HAM_BRIDGE - Downlink +TRUNK ge-0/0/14 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, exAVLAN,vendor_backbone,exVmVendor exSigns,HAM_BRIDGE - Downlink +TRUNK ge-0/0/15 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, exAVLAN,vendor_backbone,exVmVendor exSigns,HAM_BRIDGE - Downlink +TRUNK ge-0/0/16 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, exAVLAN,vendor_backbone,exVmVendor exSigns,HAM_BRIDGE - Downlink +TRUNK ge-0/0/17 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, exAVLAN,vendor_backbone,exVmVendor exSigns,HAM_BRIDGE - Downlink +TRUNK ge-0/0/18 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, exAVLAN,vendor_backbone,exVmVendor exSigns,HAM_BRIDGE - Downlink +TRUNK ge-0/0/19 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, exAVLAN,vendor_backbone,exVmVendor exSigns,HAM_BRIDGE - Downlink +TRUNK ge-0/0/20 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, exAVLAN,vendor_backbone,exVmVendor exSigns,HAM_BRIDGE - Downlink +TRUNK ge-0/0/21 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, exAVLAN,vendor_backbone,exVmVendor exSigns,HAM_BRIDGE - Downlink +TRUNK ge-0/0/22 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, exAVLAN,vendor_backbone,exVmVendor exSigns,HAM_BRIDGE - Downlink +TRUNK ge-0/0/23 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, exAVLAN,vendor_backbone,exVmVendor exSigns,HAM_BRIDGE - Downlink +TRUNK ge-0/0/24 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, exAVLAN,vendor_backbone,exVmVendor exSigns,HAM_BRIDGE - Downlink +TRUNK ge-0/0/25 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, exAVLAN,vendor_backbone,exVmVendor exSigns,HAM_BRIDGE - Downlink +TRUNK ge-0/0/26 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, exAVLAN,vendor_backbone,exVmVendor exSigns,HAM_BRIDGE - Downlink +TRUNK ge-0/0/27 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, exAVLAN,vendor_backbone,exVmVendor exSigns,HAM_BRIDGE - Downlink +TRUNK ge-0/0/28 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, exAVLAN,vendor_backbone,exVmVendor exSigns,HAM_BRIDGE - Downlink +TRUNK ge-0/0/29 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, exAVLAN,vendor_backbone,exVmVendor exSigns,exVmVendor,HAM_BRIDGE - Downlink TRUNK ge-0/0/30 exSCALE-SLOW,exSCALE-FAST,exInfra POE AP // for Game Night TRUNK ge-0/0/31 exSCALE-SLOW,exSCALE-FAST,exInfra POE AP // for Game Night TRUNK ge-0/0/32 exSCALE-SLOW,exSCALE-FAST,exInfra POE AP // for Game Night diff --git a/switch-configuration/config/types/cfIDF b/switch-configuration/config/types/cfIDF index 10396fc1..2d8a88cc 100644 --- a/switch-configuration/config/types/cfIDF +++ b/switch-configuration/config/types/cfIDF @@ -1,8 +1,6 @@ // Conference Center IDF Switch Configuration -TRUNK ge-0/0/0 cfSCALE-SLOW,cfSCALE-FAST,cfSpeaker,cfInfra,cfCTF,cfAVLAN,cfNOC, \ - cfSigns,cfHam_N6S,HAM_BRIDGE - Uplink -TRUNK ge-0/0/1 cfSCALE-SLOW,cfSCALE-FAST,cfSpeaker,cfInfra,cfCTF,cfAVLAN,cfNOC, \ - cfSigns,cfHam_N6S,HAM_BRIDGE - Uplink +TRUNK ge-0/0/0 cfSCALE-SLOW,cfSCALE-FAST,cfSpeaker,cfInfra,cfCTF,cfAVLAN,cfNOC, cfSigns,cfHam_N6S,HAM_BRIDGE - Uplink +TRUNK ge-0/0/1 cfSCALE-SLOW,cfSCALE-FAST,cfSpeaker,cfInfra,cfCTF,cfAVLAN,cfNOC, cfSigns,cfHam_N6S,HAM_BRIDGE - Uplink TRUNK ge-0/0/2 cfSCALE-SLOW,cfSCALE-FAST,cfSpeaker,cfInfra,cfAVLAN,cfSigns - Downlink TRUNK ge-0/0/3 cfSCALE-SLOW,cfSCALE-FAST,cfSpeaker,cfInfra,cfAVLAN,cfSigns - Downlink TRUNK ge-0/0/4 cfSCALE-SLOW,cfSCALE-FAST,cfSpeaker,cfInfra,cfAVLAN,cfSigns - Downlink diff --git a/switch-configuration/config/types/exIDF b/switch-configuration/config/types/exIDF index e8f3ffa6..2d21865a 100644 --- a/switch-configuration/config/types/exIDF +++ b/switch-configuration/config/types/exIDF @@ -1,76 +1,28 @@ // Expo Center IDF(s) Switch Configuration Template -TRUNK ge-0/0/0 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, \ - exAVLAN,exVmVendor, \ - exSigns,HAM_BRIDGE,exRegistration - Uplink -TRUNK ge-0/0/1 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, \ - exAVLAN,exVmVendor, \ - exSigns,HAM_BRIDGE,exRegistration - Downlink -TRUNK ge-0/0/2 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, \ - exAVLAN,exVmVendor, \ - exSigns,HAM_BRIDGE,exRegistration - Downlink -TRUNK ge-0/0/3 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, \ - exAVLAN,exVmVendor, \ - exSigns,HAM_BRIDGE,exRegistration - Downlink -TRUNK ge-0/0/4 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, \ - exAVLAN,exVmVendor, \ - exSigns,HAM_BRIDGE,exRegistration - Downlink -TRUNK ge-0/0/5 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, \ - exAVLAN,exVmVendor, \ - exSigns,HAM_BRIDGE,exRegistration - Downlink -TRUNK ge-0/0/6 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, \ - exAVLAN,exVmVendor, \ - exSigns,HAM_BRIDGE,exRegistration - Downlink -TRUNK ge-0/0/7 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, \ - exAVLAN,exVmVendor, \ - exSigns,HAM_BRIDGE,exRegistration - Downlink -TRUNK ge-0/0/8 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, \ - exAVLAN,exVmVendor, \ - exSigns,HAM_BRIDGE,exRegistration - Downlink -TRUNK ge-0/0/9 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, \ - exAVLAN,exVmVendor, \ - exSigns,HAM_BRIDGE,exRegistration - Downlink -TRUNK ge-0/0/10 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, \ - exAVLAN,exVmVendor, \ - exSigns,HAM_BRIDGE,exRegistration - Downlink -TRUNK ge-0/0/11 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, \ - exAVLAN,exVmVendor, \ - exSigns,HAM_BRIDGE,exRegistration - Downlink -TRUNK ge-0/0/12 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, \ - exAVLAN,exVmVendor, \ - exSigns,HAM_BRIDGE,exRegistration - Downlink -TRUNK ge-0/0/13 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, \ - exAVLAN,exVmVendor, \ - exSigns,HAM_BRIDGE,exRegistration - Downlink -TRUNK ge-0/0/14 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, \ - exAVLAN,exVmVendor, \ - exSigns,HAM_BRIDGE,exRegistration - Downlink -TRUNK ge-0/0/15 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, \ - exAVLAN,exVmVendor, \ - exSigns,HAM_BRIDGE,exRegistration - Downlink -TRUNK ge-0/0/16 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, \ - exAVLAN,exVmVendor, \ - exSigns,HAM_BRIDGE,exRegistration - Downlink -TRUNK ge-0/0/17 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, \ - exAVLAN,exVmVendor, \ - exSigns,HAM_BRIDGE,exRegistration - Downlink -TRUNK ge-0/0/18 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, \ - exAVLAN,exVmVendor, \ - exSigns,HAM_BRIDGE,exRegistration - Downlink -TRUNK ge-0/0/19 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, \ - exAVLAN,exVmVendor, \ - exSigns,HAM_BRIDGE,exRegistration - Downlink -TRUNK ge-0/0/20 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, \ - exAVLAN,exVmVendor, \ - exSigns,HAM_BRIDGE,exRegistration - Downlink -TRUNK ge-0/0/21 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, \ - exAVLAN,exVmVendor, \ - exSigns,HAM_BRIDGE,exRegistration - Downlink -TRUNK ge-0/0/22 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, \ - exAVLAN,exVmVendor, \ - exSigns,HAM_BRIDGE,exRegistration - Downlink -TRUNK ge-0/0/23 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, \ - exAVLAN,exVmVendor, \ - exSigns,HAM_BRIDGE,exRegistration - Downlink +TRUNK ge-0/0/0 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, exAVLAN,exVmVendor, exSigns,HAM_BRIDGE,exRegistration - Uplink +TRUNK ge-0/0/1 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, exAVLAN,exVmVendor, exSigns,HAM_BRIDGE,exRegistration - Downlink +TRUNK ge-0/0/2 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, exAVLAN,exVmVendor, exSigns,HAM_BRIDGE,exRegistration - Downlink +TRUNK ge-0/0/3 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, exAVLAN,exVmVendor, exSigns,HAM_BRIDGE,exRegistration - Downlink +TRUNK ge-0/0/4 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, exAVLAN,exVmVendor, exSigns,HAM_BRIDGE,exRegistration - Downlink +TRUNK ge-0/0/5 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, exAVLAN,exVmVendor, exSigns,HAM_BRIDGE,exRegistration - Downlink +TRUNK ge-0/0/6 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, exAVLAN,exVmVendor, exSigns,HAM_BRIDGE,exRegistration - Downlink +TRUNK ge-0/0/7 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, exAVLAN,exVmVendor, exSigns,HAM_BRIDGE,exRegistration - Downlink +TRUNK ge-0/0/8 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, exAVLAN,exVmVendor, exSigns,HAM_BRIDGE,exRegistration - Downlink +TRUNK ge-0/0/9 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, exAVLAN,exVmVendor, exSigns,HAM_BRIDGE,exRegistration - Downlink +TRUNK ge-0/0/10 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, exAVLAN,exVmVendor, exSigns,HAM_BRIDGE,exRegistration - Downlink +TRUNK ge-0/0/11 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, exAVLAN,exVmVendor, exSigns,HAM_BRIDGE,exRegistration - Downlink +TRUNK ge-0/0/12 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, exAVLAN,exVmVendor, exSigns,HAM_BRIDGE,exRegistration - Downlink +TRUNK ge-0/0/13 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, exAVLAN,exVmVendor, exSigns,HAM_BRIDGE,exRegistration - Downlink +TRUNK ge-0/0/14 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, exAVLAN,exVmVendor, exSigns,HAM_BRIDGE,exRegistration - Downlink +TRUNK ge-0/0/15 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, exAVLAN,exVmVendor, exSigns,HAM_BRIDGE,exRegistration - Downlink +TRUNK ge-0/0/16 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, exAVLAN,exVmVendor, exSigns,HAM_BRIDGE,exRegistration - Downlink +TRUNK ge-0/0/17 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, exAVLAN,exVmVendor, exSigns,HAM_BRIDGE,exRegistration - Downlink +TRUNK ge-0/0/18 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, exAVLAN,exVmVendor, exSigns,HAM_BRIDGE,exRegistration - Downlink +TRUNK ge-0/0/19 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, exAVLAN,exVmVendor, exSigns,HAM_BRIDGE,exRegistration - Downlink +TRUNK ge-0/0/20 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, exAVLAN,exVmVendor, exSigns,HAM_BRIDGE,exRegistration - Downlink +TRUNK ge-0/0/21 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, exAVLAN,exVmVendor, exSigns,HAM_BRIDGE,exRegistration - Downlink +TRUNK ge-0/0/22 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, exAVLAN,exVmVendor, exSigns,HAM_BRIDGE,exRegistration - Downlink +TRUNK ge-0/0/23 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, exAVLAN,exVmVendor, exSigns,HAM_BRIDGE,exRegistration - Downlink TRUNK ge-0/0/24 exSCALE-SLOW,exSCALE-FAST,exInfra POE AP TRUNK ge-0/0/25 exSCALE-SLOW,exSCALE-FAST,exInfra POE AP TRUNK ge-0/0/26 exSCALE-SLOW,exSCALE-FAST,exInfra POE AP @@ -85,6 +37,4 @@ TRUNK ge-0/0/34 exSCALE-SLOW,exSCALE-FAST,exInfra POE AP TRUNK ge-0/0/35 exSCALE-SLOW,exSCALE-FAST,exInfra POE AP VLAN exSigns 4 POE // ge-0/0/{36-39} RSRVD 8 // ge-0/0/{40-47} -FIBER ge-0/1/0 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, \ - exAVLAN,exVmVendor, \ - exSigns,HAM_BRIDGE,exRegistration Uplink +FIBER ge-0/1/0 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, exAVLAN,exVmVendor, exSigns,HAM_BRIDGE,exRegistration Uplink From 731847331479e698001d790bccfbe93de52cbdbb Mon Sep 17 00:00:00 2001 From: cjmakes Date: Sun, 29 Sep 2024 12:54:48 -0700 Subject: [PATCH 2/8] moves comments to new column --- switch-configuration/config/types/Catwalk | 36 +++++++++++------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/switch-configuration/config/types/Catwalk b/switch-configuration/config/types/Catwalk index 198299af..ee04c51f 100644 --- a/switch-configuration/config/types/Catwalk +++ b/switch-configuration/config/types/Catwalk @@ -29,21 +29,21 @@ TRUNK ge-0/0/26 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, exAVLAN,vendor_back TRUNK ge-0/0/27 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, exAVLAN,vendor_backbone,exVmVendor exSigns,HAM_BRIDGE - Downlink TRUNK ge-0/0/28 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, exAVLAN,vendor_backbone,exVmVendor exSigns,HAM_BRIDGE - Downlink TRUNK ge-0/0/29 exSCALE-SLOW,exSCALE-FAST,exSpeaker,exInfra, exAVLAN,vendor_backbone,exVmVendor exSigns,exVmVendor,HAM_BRIDGE - Downlink -TRUNK ge-0/0/30 exSCALE-SLOW,exSCALE-FAST,exInfra POE AP // for Game Night -TRUNK ge-0/0/31 exSCALE-SLOW,exSCALE-FAST,exInfra POE AP // for Game Night -TRUNK ge-0/0/32 exSCALE-SLOW,exSCALE-FAST,exInfra POE AP // for Game Night -TRUNK ge-0/0/33 exSCALE-SLOW,exSCALE-FAST,exInfra POE AP // for Game Night -TRUNK ge-0/0/34 exSCALE-SLOW,exSCALE-FAST,exInfra POE AP // for Game Night -TRUNK ge-0/0/35 exSCALE-SLOW,exSCALE-FAST,exInfra POE AP // for Game Night -TRUNK ge-0/0/36 exSCALE-SLOW,exSCALE-FAST,exInfra POE AP // for Game Night -TRUNK ge-0/0/37 exSCALE-SLOW,exSCALE-FAST,exInfra POE AP // for Game Night -TRUNK ge-0/0/38 exSCALE-SLOW,exSCALE-FAST,exInfra POE AP // for Game Night -TRUNK ge-0/0/39 exSCALE-SLOW,exSCALE-FAST,exInfra POE AP // for Game Night -TRUNK ge-0/0/40 exSCALE-SLOW,exSCALE-FAST,exInfra POE AP // for Game Night -TRUNK ge-0/0/41 exSCALE-SLOW,exSCALE-FAST,exInfra POE AP // for Game Night -TRUNK ge-0/0/42 exSCALE-SLOW,exSCALE-FAST,exInfra POE AP // for Game Night -TRUNK ge-0/0/43 exSCALE-SLOW,exSCALE-FAST,exInfra POE AP // for Game Night -TRUNK ge-0/0/44 exSCALE-SLOW,exSCALE-FAST,exInfra POE AP // for Game Night -TRUNK ge-0/0/45 exSCALE-SLOW,exSCALE-FAST,exInfra POE AP // for Game Night -TRUNK ge-0/0/46 exSCALE-SLOW,exSCALE-FAST,exInfra POE AP // for Game Night -TRUNK ge-0/0/47 exSCALE-SLOW,exSCALE-FAST,exInfra POE AP // for Game Night +TRUNK ge-0/0/30 exSCALE-SLOW,exSCALE-FAST,exInfra POE AP // for Game Night +TRUNK ge-0/0/31 exSCALE-SLOW,exSCALE-FAST,exInfra POE AP // for Game Night +TRUNK ge-0/0/32 exSCALE-SLOW,exSCALE-FAST,exInfra POE AP // for Game Night +TRUNK ge-0/0/33 exSCALE-SLOW,exSCALE-FAST,exInfra POE AP // for Game Night +TRUNK ge-0/0/34 exSCALE-SLOW,exSCALE-FAST,exInfra POE AP // for Game Night +TRUNK ge-0/0/35 exSCALE-SLOW,exSCALE-FAST,exInfra POE AP // for Game Night +TRUNK ge-0/0/36 exSCALE-SLOW,exSCALE-FAST,exInfra POE AP // for Game Night +TRUNK ge-0/0/37 exSCALE-SLOW,exSCALE-FAST,exInfra POE AP // for Game Night +TRUNK ge-0/0/38 exSCALE-SLOW,exSCALE-FAST,exInfra POE AP // for Game Night +TRUNK ge-0/0/39 exSCALE-SLOW,exSCALE-FAST,exInfra POE AP // for Game Night +TRUNK ge-0/0/40 exSCALE-SLOW,exSCALE-FAST,exInfra POE AP // for Game Night +TRUNK ge-0/0/41 exSCALE-SLOW,exSCALE-FAST,exInfra POE AP // for Game Night +TRUNK ge-0/0/42 exSCALE-SLOW,exSCALE-FAST,exInfra POE AP // for Game Night +TRUNK ge-0/0/43 exSCALE-SLOW,exSCALE-FAST,exInfra POE AP // for Game Night +TRUNK ge-0/0/44 exSCALE-SLOW,exSCALE-FAST,exInfra POE AP // for Game Night +TRUNK ge-0/0/45 exSCALE-SLOW,exSCALE-FAST,exInfra POE AP // for Game Night +TRUNK ge-0/0/46 exSCALE-SLOW,exSCALE-FAST,exInfra POE AP // for Game Night +TRUNK ge-0/0/47 exSCALE-SLOW,exSCALE-FAST,exInfra POE AP // for Game Night From 928c8f83a754269693078ccfb121c2878bdc275a Mon Sep 17 00:00:00 2001 From: cjmakes Date: Sun, 29 Sep 2024 12:54:21 -0700 Subject: [PATCH 3/8] adds missing slash to comment --- switch-configuration/config/types/cfIDF | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/switch-configuration/config/types/cfIDF b/switch-configuration/config/types/cfIDF index 2d8a88cc..709d003a 100644 --- a/switch-configuration/config/types/cfIDF +++ b/switch-configuration/config/types/cfIDF @@ -35,7 +35,7 @@ TRUNK ge-0/0/32 cfSCALE-SLOW,cfSCALE-FAST,cfInfra POE AP TRUNK ge-0/0/33 cfSCALE-SLOW,cfSCALE-FAST,cfInfra POE AP TRUNK ge-0/0/34 cfSCALE-SLOW,cfSCALE-FAST,cfInfra POE AP TRUNK ge-0/0/35 cfSCALE-SLOW,cfSCALE-FAST,cfInfra POE AP -VLAN cfCTF 10 - / ge-0/0/{36-45} +VLAN cfCTF 10 - // ge-0/0/{36-45} VLAN cfInfra 1 - // ge-0/0/46 -- Conference Center Bhyve Server VLAN cfAVLAN 1 - // ge-0/0/47 -- Conference Center AV Server From 4cf1448bc4d2e91f0cdad618631dba6f35c86091 Mon Sep 17 00:00:00 2001 From: cjmakes Date: Sun, 29 Sep 2024 10:33:15 -0700 Subject: [PATCH 4/8] adds test for switch-configuration/config/types --- facts/datasource.py | 4 ++++ facts/test_datasources.py | 20 ++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/facts/datasource.py b/facts/datasource.py index 3301c4cf..e31c72bb 100644 --- a/facts/datasource.py +++ b/facts/datasource.py @@ -161,6 +161,10 @@ def isvalidtype(val): return True return False +def isvalidport(val): + """"test for valid port config [FIBER, RSRVD, TRUNK, VLAN, VVBB, VVLAN]""" + return val in ["FIBER", "RSRVD", "TRUNK", "VLAN", "VVBB", "VVLAN"] + def test_csvfile(meta): """csv wrapper for test_datafile""" diff --git a/facts/test_datasources.py b/facts/test_datasources.py index bab71a87..80bf57ec 100644 --- a/facts/test_datasources.py +++ b/facts/test_datasources.py @@ -107,6 +107,26 @@ def test_switchtypes_tsv(): result, err = ds.test_tsvfile(meta) assert result, err +def test_switchconfigs_tsv(): + """test switchconfigs""" + + directory = "../switch-configuration/config/types/" + for filename in os.listdir(directory): + meta = { + "file": directory + filename, + "header": False, + "count": "1+", + "cols": [ + ds.isvalidport, + ds.isuntested, + ds.isuntested, + ds.isuntested, + ds.isuntested, + ds.isuntested, + ], + } + result, err = ds.test_tsvfile(meta) + assert result, err def test_vlansd_tsv(): """test vlans.d/""" From 2830b53bdf828bdbee5d114c307813b980a806b2 Mon Sep 17 00:00:00 2001 From: cjmakes Date: Sun, 29 Sep 2024 12:45:44 -0700 Subject: [PATCH 5/8] test link type --- facts/datasource.py | 3 +++ facts/test_datasources.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/facts/datasource.py b/facts/datasource.py index e31c72bb..af39d3e1 100644 --- a/facts/datasource.py +++ b/facts/datasource.py @@ -165,6 +165,9 @@ def isvalidport(val): """"test for valid port config [FIBER, RSRVD, TRUNK, VLAN, VVBB, VVLAN]""" return val in ["FIBER", "RSRVD", "TRUNK", "VLAN", "VVBB", "VVLAN"] +def isvalidlink(val): + """"test for valid link type [Uplink, Downlink, AP, MassFlash]""" + return val in ["Uplink", "Downlink", "AP", "MassFlash"] def test_csvfile(meta): """csv wrapper for test_datafile""" diff --git a/facts/test_datasources.py b/facts/test_datasources.py index 80bf57ec..db0f0d6b 100644 --- a/facts/test_datasources.py +++ b/facts/test_datasources.py @@ -121,7 +121,7 @@ def test_switchconfigs_tsv(): ds.isuntested, ds.isuntested, ds.isuntested, - ds.isuntested, + ds.isvalidlink, ds.isuntested, ], } From 38d8132fe1c7bbbbb73498ed5200d9dba123adc4 Mon Sep 17 00:00:00 2001 From: cjmakes Date: Sun, 29 Sep 2024 12:46:10 -0700 Subject: [PATCH 6/8] skips comments --- facts/datasource.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/facts/datasource.py b/facts/datasource.py index af39d3e1..dc961483 100644 --- a/facts/datasource.py +++ b/facts/datasource.py @@ -217,6 +217,8 @@ def test_datafile(delimiter, meta): continue # run the validators for each column for i, val in enumerate(elems): + if val.startswith("//"): + continue if not meta["cols"][i](val.rstrip("\n")): return False, "invalid field " + val + " failed " + meta["cols"][ i From c9624e0333fef95c992b339bf6c8be1e25c36c6e Mon Sep 17 00:00:00 2001 From: cjmakes Date: Sun, 29 Sep 2024 12:46:23 -0700 Subject: [PATCH 7/8] skip blanks --- facts/datasource.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/facts/datasource.py b/facts/datasource.py index dc961483..6b05029d 100644 --- a/facts/datasource.py +++ b/facts/datasource.py @@ -167,7 +167,7 @@ def isvalidport(val): def isvalidlink(val): """"test for valid link type [Uplink, Downlink, AP, MassFlash]""" - return val in ["Uplink", "Downlink", "AP", "MassFlash"] + return val in ["Uplink", "Downlink", "AP", "MassFlash", "-"] def test_csvfile(meta): """csv wrapper for test_datafile""" From e7bf430bbda563dbaf9ddddfb97cc8ac78a6b7a5 Mon Sep 17 00:00:00 2001 From: cjmakes Date: Wed, 2 Oct 2024 12:31:33 -0700 Subject: [PATCH 8/8] linter formatting --- facts/datasource.py | 7 +++++-- facts/test_datasources.py | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/facts/datasource.py b/facts/datasource.py index 6b05029d..d316e5dd 100644 --- a/facts/datasource.py +++ b/facts/datasource.py @@ -161,14 +161,17 @@ def isvalidtype(val): return True return False + def isvalidport(val): - """"test for valid port config [FIBER, RSRVD, TRUNK, VLAN, VVBB, VVLAN]""" + """test for valid port config [FIBER, RSRVD, TRUNK, VLAN, VVBB, VVLAN]""" return val in ["FIBER", "RSRVD", "TRUNK", "VLAN", "VVBB", "VVLAN"] + def isvalidlink(val): - """"test for valid link type [Uplink, Downlink, AP, MassFlash]""" + """test for valid link type [Uplink, Downlink, AP, MassFlash]""" return val in ["Uplink", "Downlink", "AP", "MassFlash", "-"] + def test_csvfile(meta): """csv wrapper for test_datafile""" return test_datafile(r",", meta) diff --git a/facts/test_datasources.py b/facts/test_datasources.py index db0f0d6b..b6c1c81d 100644 --- a/facts/test_datasources.py +++ b/facts/test_datasources.py @@ -107,6 +107,7 @@ def test_switchtypes_tsv(): result, err = ds.test_tsvfile(meta) assert result, err + def test_switchconfigs_tsv(): """test switchconfigs""" @@ -128,6 +129,7 @@ def test_switchconfigs_tsv(): result, err = ds.test_tsvfile(meta) assert result, err + def test_vlansd_tsv(): """test vlans.d/"""