From 3c117437ceb4c36bc8f422fae7dac5ec334a7c06 Mon Sep 17 00:00:00 2001 From: Owen DeLong Date: Fri, 29 Jul 2022 16:02:59 -0700 Subject: [PATCH] Fixed Key dependency in Makefile Fix for show floor wired networks and vendor backbone --- switch-configuration/Makefile | 2 +- .../config/scripts/build_switch_configs.pl | 4 ++ .../config/scripts/bulk_local_load_switches | 8 +-- .../config/scripts/switch_template.pl | 71 +++++++++++++------ switch-configuration/config/switchtypes | 8 +-- switch-configuration/config/types/Booth | 1 + switch-configuration/config/types/hiAV | 16 ++--- switch-configuration/config/types/hiBooth | 25 +++---- switch-configuration/config/types/hiIDF | 38 +++++----- switch-configuration/config/types/hiMDF | 44 ++++++------ switch-configuration/config/types/hiNOC | 36 +++++----- .../config/types/hiRegistration | 20 +++--- switch-configuration/config/types/hiRoom | 24 +++---- switch-configuration/config/vlans.d/Expo | 23 +++--- switch-configuration/config/vlans.d/Hilton | 1 + 15 files changed, 180 insertions(+), 141 deletions(-) diff --git a/switch-configuration/Makefile b/switch-configuration/Makefile index 81c39030..f41bf085 100644 --- a/switch-configuration/Makefile +++ b/switch-configuration/Makefile @@ -18,7 +18,7 @@ lint: .lint ../facts/secrets/jroot_pw: echo "$(JROOT_SECRET)" > ../facts/secrets/jroot_pw -.secrets: .lint ../facts/secrets/jroot_pw +.secrets: .lint ../facts/secrets/jroot_pw ../facts/keys/* echo "Using $JROOT_SECRET as secret" touch .secrets diff --git a/switch-configuration/config/scripts/build_switch_configs.pl b/switch-configuration/config/scripts/build_switch_configs.pl index f679337d..38c46601 100755 --- a/switch-configuration/config/scripts/build_switch_configs.pl +++ b/switch-configuration/config/scripts/build_switch_configs.pl @@ -40,11 +40,15 @@ } foreach $file (@outputs) { + open TMP, ">>$file"; + close TMP; unlink($file) || die "Failed to delete $file: $!\n"; debug(3, "Deleted $file from output directory\n"); } foreach $file (@maps) { + open TMP, ">>$file"; + close TMP; unlink($file) || die "Failed to delete $file: $!\n"; debug(3, "Deleted $file from output directory\n"); } diff --git a/switch-configuration/config/scripts/bulk_local_load_switches b/switch-configuration/config/scripts/bulk_local_load_switches index 4b4e6a2d..d2028a9b 100755 --- a/switch-configuration/config/scripts/bulk_local_load_switches +++ b/switch-configuration/config/scripts/bulk_local_load_switches @@ -157,14 +157,14 @@ EOF if ($opt_l) # If -l is specified, install configuration via directly attached management port { my $result; - if($result = system("scp \"output/$Name.conf\" admin\@$IP".":/tmp/new_config.conf")) + if($result = system("scp \"output/$Name.conf\" owen\@$IP".":/tmp/new_config.conf")) { while ($result == 1 || $result == 256) { # Connection error, probably switch isn't fully online print STDERR "Switch didn't accept SCP, retrying in 5 seconds.\n"; sleep 5; - $result = system("scp \"output/$Name.conf\" admin\@$IP".":/tmp/new_config.conf"); + $result = system("scp \"output/$Name.conf\" owen\@$IP".":/tmp/new_config.conf"); } if ($result) { @@ -182,11 +182,11 @@ EOF print STDERR "Activating...\n"; if ($opt_l) # If -l is specified, activate configuration via directly attached management port { - open(JUNIPER, "| ssh admin\@$IP"); + open(JUNIPER, "| ssh owen\@$IP"); } else { - open(JUNIPER, "| ssh admin\@$Name"); + open(JUNIPER, "| ssh owen\@$Name"); } print JUNIPER $SWITCH_COMMANDS; print STDERR "Finished sending commands to switch...\n"; diff --git a/switch-configuration/config/scripts/switch_template.pl b/switch-configuration/config/scripts/switch_template.pl index 77449fc4..1a1543e8 100755 --- a/switch-configuration/config/scripts/switch_template.pl +++ b/switch-configuration/config/scripts/switch_template.pl @@ -841,6 +841,17 @@ sub VV_init_firewall my $VV_firewall = < internet only) -VVRNG vendor_vlan_ 200-498 2001:470:f325:200::/54 10.2.0.0/15 Dynamically allocated and named booth VLANs +VVRNG vendor_vlan_ 200-498 2001:470:f0fb:200::/54 10.2.0.0/15 Dynamically allocated and named booth VLANs //499 is reserved for the Vendor backbone VLAN between the Expo switches and the routers. +VLAN vendor_backbone 499 2001:470:f0fb:499::/64 10.1.0.0/24 Vendor Backbone diff --git a/switch-configuration/config/vlans.d/Hilton b/switch-configuration/config/vlans.d/Hilton index f7aff13e..c22b7842 100644 --- a/switch-configuration/config/vlans.d/Hilton +++ b/switch-configuration/config/vlans.d/Hilton @@ -17,3 +17,4 @@ VLAN hiInstall 111 2001:470:f0fb:111::/64 10.0.11.0/24 Install Fests and Worksh //VLANs (vendor_vlan <-> internet only) VVRNG vendor_vlan_ 200-498 2001:470:f0fb:200::/54 10.2.0.0/15 Dynamically allocated and named booth VLANs //499 is reserved for the Vendor backbone VLAN between the Expo switches and the routers. +VLAN vendor_backbone 499 2001:470:f0fb:499::/64 10.1.0.0/24 Vendor Backbone