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/override_switches b/switch-configuration/config/scripts/override_switches index 461db1b0..2d1196ff 100755 --- a/switch-configuration/config/scripts/override_switches +++ b/switch-configuration/config/scripts/override_switches @@ -109,9 +109,14 @@ if ($opt_i) my %errors=(); foreach my $switch (@list) { - my ($Name, $Num, $MgtVL, $IPv6Addr, $Type); + my ($Name, $Num, $MgtVL, $IPv6Addr, $Type, $hierarchy); print "Looking up switch $switch\n"; - ($Name, $Num, $MgtVL, $IPv6Addr, $Type) = (get_switchtype($switch)); + ($Name, $Num, $MgtVL, $IPv6Addr, $Type, $hierarchy) = (get_switchtype($switch)); + if ($hierarchy =~ /^Z/) + { + print STDERR "Skipping switch $Name in hierarchy $hierarchy.\n"; + next; + } die("Error: Couldn't get type for $switch (got $Name)\n") unless $Name eq $switch; print "Got Entry: $Name, $Num, $MgtVL, $IPv6Addr, $Type for $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