Commit f39f3177 authored by Leigh Stoller's avatar Leigh Stoller

Add 40Gb.

parent 3e18f84d
#!/usr/bin/perl -w
#
# Copyright (c) 2003-2014 University of Utah and the Flux Group.
# Copyright (c) 2003-2015 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -36,14 +36,14 @@ sub usage()
{
print STDERR "Usage: addspecialiface -b <speed> [-s <switchinfo>] ".
"<node_id> <iface_id>\n";
print STDERR "Usage: addspecialiface -r <node_id> <iface_id>\n";
print STDERR "Usage: addspecialiface [-t] -r <node_id> <iface_id>\n";
print STDERR "Options:\n";
print STDERR " -d - Turn on debugging\n";
print STDERR " -n - Dry run mode\n";
print STDERR " -t - Do not call snmpit to set trunk mode\n";
print STDERR " -r - Delete interface\n";
print STDERR " -f - (with -r) force deletion, even if iface used\n";
print STDERR " -b speed - Interface speed; 100Mb, 1Gb or 10Gb \n";
print STDERR " -b speed - Interface speed; 100Mb, 1Gb, 10Gb or 40Gb \n";
print STDERR " -s info - switchname,switchcard,switchport\n";
print STDERR " iface_id - eth0, eth1, etc (must end in an integer)\n";
exit(-1);
......@@ -117,7 +117,8 @@ if (defined($options{'t'})) {
if (defined($options{'b'})) {
$speed = $options{'b'};
usage()
if ($speed ne "1Gb" && $speed ne "100Mb" && $speed ne "10Gb");
if ($speed ne "1Gb" && $speed ne "100Mb" && $speed ne "10Gb" &&
$speed ne "40Gb");
}
if (defined($options{'s'})) {
$switchinfo = $options{"s"};
......@@ -240,6 +241,9 @@ if( $speed eq "100Mb" ) {
} elsif( $speed eq "10Gb" ) {
$type = "generic_10G";
$max_speed = "10000000";
} elsif( $speed eq "40Gb" ) {
$type = "generic_40G";
$max_speed = "40000000";
} else { # default is 1G for backward compatibility
$type = "generic_1G";
$max_speed = "1000000";
......
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