Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
2a9a0d06
Commit
2a9a0d06
authored
Jul 19, 2013
by
Kirk Webb
Browse files
Small bits to tie in and install the Mellanox snmpit module.
parent
549941b6
Changes
4
Hide whitespace changes
Inline
Side-by-side
tbsetup/snmpit_test/GNUmakefile.in
View file @
2a9a0d06
...
...
@@ -38,7 +38,8 @@ LIB_STUFF = portstats snmpit_intel.pm \
snmpit_cisco_stack.pm snmpit_intel_stack.pm \
snmpit_foundry.pm snmpit_stack.pm snmpit_remote.pm \
snmpit_nortel.pm snmpit_hp.pm snmpit_apcon.pm \
snmpit_arista.pm snmpit_arista_switch_daemon.py
snmpit_arista.pm snmpit_arista_switch_daemon.py \
snmpit_mellanox.pm
#
# Force dependencies on the scripts so that they will be rerun through
...
...
tbsetup/snmpit_test/portstats.in
View file @
2a9a0d06
...
...
@@ -347,6 +347,11 @@ DEVICE: foreach my $name (keys %portMap) {
$device
=
new
snmpit_arista
(
$name
);
last
;
};
/mellanox/
&&
do
{
require
snmpit_mellanox
;
$device
=
new
snmpit_mellanox
(
$name
);
last
;
};
# 'default' case
warn
"
WARNING: Unknown switch type (
$type
) for
$name
, skipping some ports
\n
";
...
...
tbsetup/snmpit_test/snmpit_mellanox.pm
View file @
2a9a0d06
...
...
@@ -76,7 +76,7 @@ my $PORT_FORMAT_MLNX = 3;
# Creates a new object.
#
# usage: new($classname,$devicename,$debuglevel,$community)
# returns a new object, blessed into the snmpit_
arista
class.
# returns a new object, blessed into the snmpit_
mellanox
class.
#
sub
new
($$$;$) {
...
...
@@ -1543,10 +1543,6 @@ sub disablePortTrunking($$) {
#
# On sucess, returns a two-dimensional list indexed by port,oid
#
# Note: Since we mostly use XML-RPC to communicate with Arista switch,
# this function is just borrowed from snmpit_hp without any big
# change. Let's hope it can work...
#
sub
getFields
($$$)
{
my
$self
=
shift
;
my
(
$ports
,
$oids
)
=
@_
;
...
...
tbsetup/snmpit_test/snmpit_stack.pm
View file @
2a9a0d06
...
...
@@ -1618,6 +1618,12 @@ sub snap($) {
$device
=
new
snmpit_arista
(
$devicename
,
$self
->
{
DEBUG
});
last
;
};
# /arista.*/
(
/mellanox/
)
&&
do
{
require
snmpit_mellanox
;
$device
=
new
snmpit_mellanox
(
$devicename
,
$self
->
{
DEBUG
});
last
;
};
# /mellanox.*/
print
"
Device
$devicename
is not of a known type
\n
";
}
if
(
!
$device
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment