Commit e7579b1f authored by Kirk Webb's avatar Kirk Webb

Tweaks to paths and makefiles for the portfix version of snmpit.

Also added a Feature for pointing Emulab at it.
parent abe2c7c7
......@@ -6557,6 +6557,7 @@ outfiles="$outfiles Makeconf GNUmakefile \
tbsetup/GNUmakefile tbsetup/console_setup tbsetup/spewlogfile \
tbsetup/snmpit_test/GNUmakefile \
tbsetup/snmpit_old/GNUmakefile \
tbsetup/snmpit_portfix/GNUmakefile \
tbsetup/spewrpmtar tbsetup/gentopofile tbsetup/power_sgmote.pm \
tbsetup/console_reset tbsetup/bwconfig tbsetup/power_rpc27.pm \
tbsetup/power_mail.pm tbsetup/power_whol.pm \
......
......@@ -1093,6 +1093,7 @@ outfiles="$outfiles Makeconf GNUmakefile \
tbsetup/GNUmakefile tbsetup/console_setup tbsetup/spewlogfile \
tbsetup/snmpit_test/GNUmakefile \
tbsetup/snmpit_old/GNUmakefile \
tbsetup/snmpit_portfix/GNUmakefile \
tbsetup/spewrpmtar tbsetup/gentopofile tbsetup/power_sgmote.pm \
tbsetup/console_reset tbsetup/bwconfig tbsetup/power_rpc27.pm \
tbsetup/power_mail.pm tbsetup/power_whol.pm \
......
......@@ -49,7 +49,7 @@ LIB_SCRIPTS = libdb.pm Node.pm libdb.py libadminctrl.pm Experiment.pm \
emdb.pm emutil.pm Firewall.pm VirtExperiment.pm libGeni.pm \
libEmulab.pm EmulabConstants.pm TraceUse.pm \
EmulabFeatures.pm Port.pm BlockstoreType.pm Blockstore.pm \
IPBuddyAlloc.pm IPBuddyWrapper.pm
IPBuddyAlloc.pm IPBuddyWrapper.pm Port_portfix.pm
# Stuff installed on plastic.
USERSBINS = genelists.proxy dumperrorlog.proxy backup
......
......@@ -34,7 +34,8 @@ use vars qw(@ISA @EXPORT);
use libdb;
use libtestbed;
use Node;
use Port;
# Doesn't seem to be used presently...
# use Port;
use English;
use Data::Dumper;
use overload ('""' => 'Stringify');
......
......@@ -35,7 +35,7 @@ SYSTEM := $(shell uname -s)
include $(OBJDIR)/Makeconf
SUBDIRS = checkpass ns2ir nseparse checkup template_cvsroot \
snmpit_test snmpit_old
snmpit_test snmpit_old snmpit_portfix
ifeq ($(NSVERIFY),1)
SUBDIRS += nsverify
endif
......@@ -175,6 +175,9 @@ snmpit_test:
snmpit_old:
@$(MAKE) -C snmpit_old all
snmpit_portfix:
@$(MAKE) -C snmpit_old all
nsverify:
@$(MAKE) -C nsverify all
......@@ -231,6 +234,7 @@ endif
@$(MAKE) -C checkup install
@$(MAKE) -C snmpit_test install
@$(MAKE) -C snmpit_old install
@$(MAKE) -C snmpit_portfix install
script-install: $(addprefix $(INSTALL_BINDIR)/, $(BIN_STUFF)) \
$(addprefix $(INSTALL_SBINDIR)/, $(SBIN_STUFF)) \
......@@ -343,6 +347,7 @@ subdir-clean:
@$(MAKE) -C checkup clean
@$(MAKE) -C snmpit_test clean
@$(MAKE) -C snmpit_old clean
@$(MAKE) -C snmpit_portfix clean
distclean: subdir-distclean
......@@ -356,6 +361,7 @@ subdir-distclean:
@$(MAKE) -C checkup distclean
@$(MAKE) -C snmpit_test distclean
@$(MAKE) -C snmpit_old distclean
@$(MAKE) -C snmpit_portfix distclean
#
# XXX Create non .tcl files.
#
......
......@@ -62,6 +62,13 @@ if (EmulabFeatures->FeatureEnabled("OldSnmpit", $this_user, undef, undef)) {
die("*** $0:\n".
" Could not exec $newpath: $!");
}
if (EmulabFeatures->FeatureEnabled("PortfixSnmpit", $this_user, undef, undef)) {
my $newpath = "$TB/lib/snmpit_portfix/portstats";
print STDERR "Invoking alternate portstats from $newpath\n";
exec $newpath, @ARGV;
die("*** $0:\n".
" Could not exec $newpath: $!");
}
my $newpath = "$TB/lib/snmpit_test/portstats";
exec $newpath, @ARGV;
die("*** $0:\n".
......
......@@ -62,6 +62,15 @@ if (EmulabFeatures->FeatureEnabled("OldSnmpit", $this_user, undef, undef)) {
die("*** $0:\n".
" Could not exec $newpath: $!");
}
if (EmulabFeatures->FeatureEnabled("PortfixSnmpit", $this_user, undef, undef)) {
my $newpath = "$TB/bin/snmpit_portfix";
print STDERR "Invoking alternate snmpit from $newpath\n";
exec $newpath, @ARGV;
die("*** $0:\n".
" Could not exec $newpath: $!");
}
my $newpath = "$TB/bin/snmpit_test";
exec $newpath, @ARGV;
die("*** $0:\n".
......
......@@ -24,7 +24,7 @@
SRCDIR = @srcdir@
TESTBED_SRCDIR = @top_srcdir@
OBJDIR = ../..
SUBDIR = tbsetup/snmpit_test
SUBDIR = tbsetup/snmpit_portfix
ISMAINSITE = @TBMAINSITE@
SYSTEM := $(shell uname -s)
......@@ -32,7 +32,7 @@ include $(OBJDIR)/Makeconf
SUBDIRS =
BIN_STUFF = snmpit_test
BIN_STUFF = snmpit_portfix
LIB_STUFF = portstats snmpit_intel.pm \
snmpit_cisco.pm snmpit_lib.pm \
snmpit_cisco_stack.pm snmpit_intel_stack.pm \
......@@ -51,7 +51,7 @@ include $(TESTBED_SRCDIR)/GNUmakerules
install: all script-install
script-install: $(addprefix $(INSTALL_LIBDIR)/snmpit_test/, $(LIB_STUFF)) \
script-install: $(addprefix $(INSTALL_LIBDIR)/snmpit_portfix/, $(LIB_STUFF)) \
$(addprefix $(INSTALL_BINDIR)/, $(BIN_STUFF))
control-install:
......@@ -64,14 +64,14 @@ clrhouse-install:
clean:
rm -f snmpit_arista_switch_daemon.py snmpit_remote.pm \
snmpit_test portstats snmpit_arista.pm
snmpit_portfix portstats snmpit_arista.pm
$(INSTALL_DIR)/lib/snmpit_test/%: %
$(INSTALL_DIR)/lib/snmpit_portfix/%: %
@echo "Installing $<"
-mkdir -p $(INSTALL_DIR)/lib/snmpit_test
-mkdir -p $(INSTALL_DIR)/lib/snmpit_portfix
$(INSTALL) $< $@
$(INSTALL_DIR)/lib/snmpit_test/portstats: portstats
$(INSTALL_DIR)/lib/snmpit_portfix/portstats: portstats
@echo "Installing $<"
-mkdir -p $(INSTALL_DIR)/lib/snmpit_test
-mkdir -p $(INSTALL_DIR)/lib/snmpit_portfix
$(INSTALL_PROGRAM) $< $@
......@@ -46,10 +46,10 @@ my $ELABINELAB = @ELABINELAB@;
use lib '@prefix@/lib';
use libdb;
use libtblog;
use Port;
use Port_portfix;
# Optional alternate version of libraries.
use lib '@prefix@/lib/snmpit_test';
use lib '@prefix@/lib/snmpit_portfix';
use snmpit_lib;
use English;
......
......@@ -40,7 +40,7 @@ use libdb;
use libtestbed;
use Expect;
use Lan;
use Port;
use Port_portfix;
# CLI constants
......
......@@ -38,7 +38,7 @@ use snmpit_lib;
use libtestbed;
use Lan;
use Port;
use Port_portfix;
use Data::Dumper;
use RPC::XML;
use RPC::XML::Client;
......
......@@ -40,7 +40,7 @@ use SNMP;
use snmpit_lib;
use Socket;
use libtestbed;
use Port;
use Port_portfix;
use Lan;
#
......
......@@ -36,7 +36,7 @@ $| = 1; # Turn off line buffering on output
use English;
use SNMP;
use snmpit_lib;
use Port;
use Port_portfix;
#
# These are the commands that can be passed to the portControl function
......
......@@ -41,7 +41,7 @@ use Carp qw(cluck);
use libtestbed;
use Lan;
use Port;
use Port_portfix;
#
......
......@@ -67,7 +67,7 @@ use Lan;
use emutil qw(SpanningTree);
use strict;
use SNMP;
use Port;
use Port_portfix;
use Carp qw(cluck);
my $TBOPS = libtestbed::TB_OPSEMAIL;
......
......@@ -39,7 +39,7 @@ use MLNX_XMLGateway;
use libtestbed;
use Lan;
use Port;
use Port_portfix;
use Data::Dumper;
# Mellanox REST API static paths
......
......@@ -48,7 +48,7 @@ use emutil;
use strict;
# Optional alternate version of libraries.
use lib '@prefix@/lib/snmpit_test';
use lib '@prefix@/lib/snmpit_portfix';
use snmpit_lib;
use snmpit_remote;
......
......@@ -36,7 +36,7 @@ use Data::Dumper;
use libdb;
use libtestbed;
use Port;
use Port_portfix;
use overload ('""' => 'Stringify');
our %devices;
our $parallelized = 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment