From 54e8ac3cbddebedb1ef22df79239a3bcfcc01ef8 Mon Sep 17 00:00:00 2001 From: Adam Amstrong Date: Sat, 13 Feb 2010 07:40:43 +0000 Subject: [PATCH] add new IronWare (Brocade/Foundry) OS type. rename temp/fan/voltage_host to device_id git-svn-id: http://www.observium.org/svn/observer/trunk@830 61d68cd4-352d-0410-923a-c4978735b2b8 --- database-update.sql | 5 + discovery.php | 2 +- html/images/os/ironware.png | Bin 0 -> 3250 bytes html/includes/dev-overview-data.inc.php | 4 +- .../graphs/device_temperatures.inc.php | 2 +- html/includes/graphs/fanspeed.inc.php | 2 +- html/includes/graphs/temperature.inc.php | 2 +- html/includes/graphs/voltage.inc.php | 2 +- html/includes/print-interface.inc.php | 10 +- html/pages/device.php | 2 +- html/pages/device/graphs/temperatures.inc.php | 2 +- html/pages/device/health.inc.php | 6 +- html/pages/device/health/fanspeeds.inc.php | 2 +- html/pages/device/health/temp.inc.php | 2 +- html/pages/device/health/voltages.inc.php | 2 +- html/pages/device/overview/fanspeeds.inc.php | 6 +- .../device/overview/temperatures.inc.php | 6 +- html/pages/device/overview/voltages.inc.php | 6 +- html/pages/sensors/fanspeeds.php | 4 +- html/pages/sensors/temperatures.php | 4 +- html/pages/sensors/voltages.php | 4 +- includes/discovery/fanspeeds.php | 16 +- includes/discovery/temperatures.php | 98 ++-- includes/discovery/voltages.php | 16 +- includes/functions.php | 4 +- includes/polling/fanspeeds.inc.php | 2 +- includes/polling/temperatures.inc.php | 2 +- includes/polling/voltages.inc.php | 2 +- includes/rewrites.php | 439 ++++++++++++++++++ includes/static-config.php | 1 + 30 files changed, 573 insertions(+), 82 deletions(-) create mode 100644 html/images/os/ironware.png diff --git a/database-update.sql b/database-update.sql index 672aed81f..bdbf205b5 100644 --- a/database-update.sql +++ b/database-update.sql @@ -73,6 +73,7 @@ ALTER TABLE `devices` MODIFY `type` varchar(8) DEFAULT 'unknown'; ALTER TABLE `devices` CHANGE `os` `os` VARCHAR( 32 ) NULL DEFAULT NULL; ALTER TABLE `temperature` ADD `temp_precision` INT(11) NULL DEFAULT '1'; UPDATE temperature SET temp_precision=10 WHERE temp_tenths=1; +ALTER TABLE `temperature` ADD `temp_index` INT NOT NULL AFTER `temp_host` , ADD `temp_mibtype` VARCHAR( 32 ) NOT NULL AFTER `temp_index` ALTER TABLE `temperature` DROP `temp_tenths`; CREATE TABLE IF NOT EXISTS `dbSchema` ( `revision` int(11) NOT NULL default '0', PRIMARY KEY (`revision`)) ENGINE=MyISAM DEFAULT CHARSET=latin1; ALTER TABLE `storage` ADD `storage_perc_warn` INT(11) NULL DEFAULT '60'; @@ -82,3 +83,7 @@ ALTER TABLE `voltage` ADD `volt_limit_low` int(11) NULL DEFAULT NULL AFTER `volt ALTER TABLE `voltage` CHANGE `volt_current` `volt_current` FLOAT(3) NULL DEFAULT NULL; ALTER TABLE `voltage` CHANGE `volt_limit` `volt_limit` FLOAT(3) NULL DEFAULT NULL; ALTER TABLE `voltage` CHANGE `volt_limit_low` `volt_limit_low` FLOAT(3) NULL DEFAULT NULL; +ALTER TABLE `fanspeed` ADD `fan_index` INT NOT NULL AFTER `fan_host` , ADD `fan_mibtype` VARCHAR( 32 ) NOT NULL AFTER `fan_index` +ALTER TABLE `temperature` CHANGE `temp_host` `device_id` INT( 11 ) NOT NULL DEFAULT '0' +ALTER TABLE `fanspeed` CHANGE `fan_host` `device_id` INT( 11 ) NOT NULL DEFAULT '0' +ALTER TABLE `voltage` CHANGE `volt_host` `device_id` INT( 11 ) NOT NULL DEFAULT '0' diff --git a/discovery.php b/discovery.php index 8c9c29eaf..05d59b0d8 100755 --- a/discovery.php +++ b/discovery.php @@ -84,7 +84,7 @@ foreach ($devices as $device) echo("\n"); ## Discover OS Changes -# include("includes/discovery/os.inc.php"); + #include("includes/discovery/os.inc.php"); ## Discover Interfaces include("includes/discovery/interfaces.php"); diff --git a/html/images/os/ironware.png b/html/images/os/ironware.png new file mode 100644 index 0000000000000000000000000000000000000000..8b1ebeb7209e3e1dc0e6e9c94c5182a286bd74f9 GIT binary patch literal 3250 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 literal 0 HcmV?d00001 diff --git a/html/includes/dev-overview-data.inc.php b/html/includes/dev-overview-data.inc.php index ac31743b4..0f00f00ef 100644 --- a/html/includes/dev-overview-data.inc.php +++ b/html/includes/dev-overview-data.inc.php @@ -2,7 +2,9 @@ echo("
" . $device['sysDescr'] . "
"); - $uptime = @mysql_result(mysql_query("SELECT `attrib_value` FROM `devices_attribs` WHERE `device_id` = '" . $device['device_id'] . "' AND `attrib_type` = 'uptime'"), 0); +# $uptime = @mysql_result(mysql_query("SELECT `attrib_value` FROM `devices_attribs` WHERE `device_id` = '" . $device['device_id'] . "' AND `attrib_type` = 'uptime'"), 0); + $uptime = $device['uptime']; + if(is_file("images/devices/" . $device['hardware'] . ".gif")) { $dev_img = "
"; diff --git a/html/includes/graphs/device_temperatures.inc.php b/html/includes/graphs/device_temperatures.inc.php index 804532fb1..3272b6813 100644 --- a/html/includes/graphs/device_temperatures.inc.php +++ b/html/includes/graphs/device_temperatures.inc.php @@ -5,7 +5,7 @@ include("common.inc.php"); $rrd_options .= " -l 0 -E "; $iter = "1"; -$sql = mysql_query("SELECT * FROM temperature where temp_host = '$device_id'"); +$sql = mysql_query("SELECT * FROM temperature where device_id = '$device_id'"); $rrd_options .= " COMMENT:' Cur Min Max\\n'"; while($temperature = mysql_fetch_array($sql)) { diff --git a/html/includes/graphs/fanspeed.inc.php b/html/includes/graphs/fanspeed.inc.php index b5e80e97a..36098a717 100644 --- a/html/includes/graphs/fanspeed.inc.php +++ b/html/includes/graphs/fanspeed.inc.php @@ -8,7 +8,7 @@ include("common.inc.php"); $fanspeed = mysql_fetch_array(mysql_query("SELECT * FROM fanspeed where fan_id = '".mres($_GET['id'])."'")); - $hostname = mysql_result(mysql_query("SELECT hostname FROM devices WHERE device_id = '" . $fanspeed['fan_host'] . "'"),0); + $hostname = mysql_result(mysql_query("SELECT hostname FROM devices WHERE device_id = '" . $fanspeed['device_id'] . "'"),0); $fanspeed['fan_descr_fixed'] = substr(str_pad($fanspeed['fan_descr'], 28),0,28); diff --git a/html/includes/graphs/temperature.inc.php b/html/includes/graphs/temperature.inc.php index 5dd4397b6..21e381f54 100644 --- a/html/includes/graphs/temperature.inc.php +++ b/html/includes/graphs/temperature.inc.php @@ -9,7 +9,7 @@ include("common.inc.php"); $sql = mysql_query("SELECT * FROM temperature where temp_id = '$temp'"); $temperature = mysql_fetch_array(mysql_query("SELECT * FROM temperature where temp_id = '".mres($_GET['id'])."'")); - $hostname = mysql_result(mysql_query("SELECT hostname FROM devices WHERE device_id = '" . $temperature['temp_host'] . "'"),0); + $hostname = mysql_result(mysql_query("SELECT hostname FROM devices WHERE device_id = '" . $temperature['device_id'] . "'"),0); $temperature['temp_descr_fixed'] = substr(str_pad($temperature['temp_descr'], 28),0,28); diff --git a/html/includes/graphs/voltage.inc.php b/html/includes/graphs/voltage.inc.php index a73092e88..79067cc4d 100644 --- a/html/includes/graphs/voltage.inc.php +++ b/html/includes/graphs/voltage.inc.php @@ -8,7 +8,7 @@ include("common.inc.php"); $voltage = mysql_fetch_array(mysql_query("SELECT * FROM voltage where volt_id = '".mres($_GET['id'])."'")); - $hostname = mysql_result(mysql_query("SELECT hostname FROM devices WHERE device_id = '" . $voltage['volt_host'] . "'"),0); + $hostname = mysql_result(mysql_query("SELECT hostname FROM devices WHERE device_id = '" . $voltage['device_id'] . "'"),0); $voltage['volt_descr_fixed'] = substr(str_pad($voltage['volt_descr'], 28),0,28); diff --git a/html/includes/print-interface.inc.php b/html/includes/print-interface.inc.php index 9387077f3..a5ff2f7e2 100644 --- a/html/includes/print-interface.inc.php +++ b/html/includes/print-interface.inc.php @@ -24,7 +24,7 @@ } else { $mac = ""; } echo(" - "); + "); echo(" " . generateiflink($interface, $interface['ifIndex'] . ". ".$interface['label']) . " $error_img $mac @@ -66,10 +66,10 @@ $interface['out_rate'] = $interface['ifOutOctets_rate'] * 8; $in_perc = @round($interface['in_rate']/$interface['ifSpeed']*100); $out_perc = @round($interface['in_rate']/$interface['ifSpeed']*100); - echo(" " . - formatRates($interface['in_rate']) . "
".format_bi($interface['ifInUcastPkts_rate'])."pps

"); - echo(" " . - formatRates($interface['out_rate']) . "
".format_bi($interface['ifOutUcastPkts_rate'])."pps
"); + echo(" ".formatRates($interface['in_rate'])."
+ ".formatRates($interface['out_rate']) . "
+ ".format_bi($interface['ifInUcastPkts_rate'])."pps

+ ".format_bi($interface['ifOutUcastPkts_rate'])."pps
"); } echo(""); diff --git a/html/pages/device.php b/html/pages/device.php index 8d8cc9c3b..fcf653c8f 100644 --- a/html/pages/device.php +++ b/html/pages/device.php @@ -40,7 +40,7 @@ echo('
  • '); $health = mysql_result(mysql_query("select count(*) from storage WHERE host_id = '" . $device['device_id'] . "'"), 0) + - mysql_result(mysql_query("select count(temp_id) from temperature WHERE temp_host = '" . $device['device_id'] . "'"), 0) + + mysql_result(mysql_query("select count(temp_id) from temperature WHERE device_id = '" . $device['device_id'] . "'"), 0) + mysql_result(mysql_query("select count(*) from cempMemPool WHERE device_id = '" . $device['device_id'] . "'"), 0) + mysql_result(mysql_query("select count(*) from cpmCPU WHERE device_id = '" . $device['device_id'] . "'"), 0); diff --git a/html/pages/device/graphs/temperatures.inc.php b/html/pages/device/graphs/temperatures.inc.php index 2e8a94009..04a0c668b 100644 --- a/html/pages/device/graphs/temperatures.inc.php +++ b/html/pages/device/graphs/temperatures.inc.php @@ -1,5 +1,5 @@ "); diff --git a/html/pages/device/health.inc.php b/html/pages/device/health.inc.php index eb7234505..e696212e6 100644 --- a/html/pages/device/health.inc.php +++ b/html/pages/device/health.inc.php @@ -1,13 +1,13 @@ "); diff --git a/html/pages/device/health/temp.inc.php b/html/pages/device/health/temp.inc.php index faa3a7516..5416b1554 100644 --- a/html/pages/device/health/temp.inc.php +++ b/html/pages/device/health/temp.inc.php @@ -1,6 +1,6 @@ "); diff --git a/html/pages/device/health/voltages.inc.php b/html/pages/device/health/voltages.inc.php index db13d3390..a6b37aba4 100644 --- a/html/pages/device/health/voltages.inc.php +++ b/html/pages/device/health/voltages.inc.php @@ -1,6 +1,6 @@ "); diff --git a/html/pages/device/overview/fanspeeds.inc.php b/html/pages/device/overview/fanspeeds.inc.php index b1ba3e2c3..710679352 100644 --- a/html/pages/device/overview/fanspeeds.inc.php +++ b/html/pages/device/overview/fanspeeds.inc.php @@ -1,13 +1,13 @@ "); echo("

    Fanspeeds

    "); $i = '1'; - $fans = mysql_query("SELECT * FROM fanspeed WHERE fan_host = '" . $device['device_id'] . "'"); + $fans = mysql_query("SELECT * FROM fanspeed WHERE device_id = '" . $device['device_id'] . "'"); echo(""); echo("
    "); echo(""); diff --git a/html/pages/device/overview/temperatures.inc.php b/html/pages/device/overview/temperatures.inc.php index a866b7352..2479d1fb6 100644 --- a/html/pages/device/overview/temperatures.inc.php +++ b/html/pages/device/overview/temperatures.inc.php @@ -1,13 +1,13 @@ "); echo("

    Temperatures

    "); $i = '1'; - $temps = mysql_query("SELECT * FROM temperature WHERE temp_host = '" . $device['device_id'] . "'"); + $temps = mysql_query("SELECT * FROM temperature WHERE device_id = '" . $device['device_id'] . "'"); echo("
    "); echo("
    "); echo(""); diff --git a/html/pages/device/overview/voltages.inc.php b/html/pages/device/overview/voltages.inc.php index 1ff9c31ff..81372ff0b 100644 --- a/html/pages/device/overview/voltages.inc.php +++ b/html/pages/device/overview/voltages.inc.php @@ -1,13 +1,13 @@ "); echo("

    Voltages

    "); $i = '1'; - $volts = mysql_query("SELECT * FROM voltage WHERE volt_host = '" . $device['device_id'] . "'"); + $volts = mysql_query("SELECT * FROM voltage WHERE device_id = '" . $device['device_id'] . "'"); echo("
    "); echo("
    "); echo(""); diff --git a/html/pages/sensors/fanspeeds.php b/html/pages/sensors/fanspeeds.php index 5126d0b85..3a6a1bbd0 100644 --- a/html/pages/sensors/fanspeeds.php +++ b/html/pages/sensors/fanspeeds.php @@ -1,9 +1,9 @@ = '5') { - $sql = "SELECT * FROM `fanspeed` AS F, `devices` AS D WHERE F.fan_host = D.device_id ORDER BY D.hostname, F.fan_descr"; + $sql = "SELECT * FROM `fanspeed` AS F, `devices` AS D WHERE F.device_id = D.device_id ORDER BY D.hostname, F.fan_descr"; } else { - $sql = "SELECT * FROM `fanspeed` AS F, `devices` AS D, devices_perms as P WHERE F.fan_host = D.device_id AND D.device_id = P.device_id AND P.user_id = '" . $_SESSION['user_id'] . "' ORDER BY D.hostname, F.fan_descr"; + $sql = "SELECT * FROM `fanspeed` AS F, `devices` AS D, devices_perms as P WHERE F.device_id = D.device_id AND D.device_id = P.device_id AND P.user_id = '" . $_SESSION['user_id'] . "' ORDER BY D.hostname, F.fan_descr"; } $query = mysql_query($sql); diff --git a/html/pages/sensors/temperatures.php b/html/pages/sensors/temperatures.php index 2d6b6ca5e..53cea6c44 100644 --- a/html/pages/sensors/temperatures.php +++ b/html/pages/sensors/temperatures.php @@ -1,9 +1,9 @@ = '5') { - $sql = "SELECT * FROM `temperature` AS T, `devices` AS D WHERE T.temp_host = D.device_id ORDER BY D.hostname, T.temp_descr"; + $sql = "SELECT * FROM `temperature` AS T, `devices` AS D WHERE T.device_id = D.device_id ORDER BY D.hostname, T.temp_descr"; } else { - $sql = "SELECT * FROM `temperature` AS T, `devices` AS D, devices_perms as P WHERE T.temp_host = D.device_id AND D.device_id = P.device_id AND P.user_id = '" . $_SESSION['user_id'] . "' ORDER BY D.hostname, T.temp_descr"; + $sql = "SELECT * FROM `temperature` AS T, `devices` AS D, devices_perms as P WHERE T.device_id = D.device_id AND D.device_id = P.device_id AND P.user_id = '" . $_SESSION['user_id'] . "' ORDER BY D.hostname, T.temp_descr"; } $query = mysql_query($sql); diff --git a/html/pages/sensors/voltages.php b/html/pages/sensors/voltages.php index b9e41858b..b6d5cc8e6 100644 --- a/html/pages/sensors/voltages.php +++ b/html/pages/sensors/voltages.php @@ -1,9 +1,9 @@ = '5') { - $sql = "SELECT * FROM `voltage` AS V, `devices` AS D WHERE V.volt_host = D.device_id ORDER BY D.hostname, V.volt_descr"; + $sql = "SELECT * FROM `voltage` AS V, `devices` AS D WHERE V.device_id = D.device_id ORDER BY D.hostname, V.volt_descr"; } else { - $sql = "SELECT * FROM `voltage` AS V, `devices` AS D, devices_perms as P WHERE V.volt_host = D.device_id AND D.device_id = P.device_id AND P.user_id = '" . $_SESSION['user_id'] . "' ORDER BY D.hostname, V.volt_descr"; + $sql = "SELECT * FROM `voltage` AS V, `devices` AS D, devices_perms as P WHERE V.device_id = D.device_id AND D.device_id = P.device_id AND P.user_id = '" . $_SESSION['user_id'] . "' ORDER BY D.hostname, V.volt_descr"; } $query = mysql_query($sql); diff --git a/includes/discovery/fanspeeds.php b/includes/discovery/fanspeeds.php index bdb69304f..858bd61bf 100644 --- a/includes/discovery/fanspeeds.php +++ b/includes/discovery/fanspeeds.php @@ -27,16 +27,16 @@ if ($device['os'] == "linux") $fan = trim(shell_exec($config['snmpget'] . " -m LM-SENSORS-MIB -O qv -$snmpver -c $community $hostname:$port $fan_oid")) / 1000; $descr = str_ireplace("temp-", "", $descr); $descr = trim($descr); - if (mysql_result(mysql_query("SELECT count(fan_id) FROM `fanspeed` WHERE fan_oid = '$fan_oid' AND fan_host = '$id'"),0) == '0') + if (mysql_result(mysql_query("SELECT count(fan_id) FROM `fanspeed` WHERE fan_oid = '$fan_oid' AND device_id = '$id'"),0) == '0') { - $query = "INSERT INTO fanspeed (`fan_host`, `fan_oid`, `fan_descr`, `fan_precision`, `fan_limit`, `fan_current`) values ('$id', '$fan_oid', '$descr',1000, " . ($config['defaults']['fan_limit'] ? $config['defaults']['fan_limit'] : '60') . ", '$fan')"; + $query = "INSERT INTO fanspeed (`device_id`, `fan_oid`, `fan_descr`, `fan_precision`, `fan_limit`, `fan_current`) values ('$id', '$fan_oid', '$descr',1000, " . ($config['defaults']['fan_limit'] ? $config['defaults']['fan_limit'] : '60') . ", '$fan')"; mysql_query($query); echo("+"); } - elseif (mysql_result(mysql_query("SELECT `fan_descr` FROM fanspeed WHERE `fan_host` = '$id' AND `fan_oid` = '$fan_oid'"), 0) != $descr) + elseif (mysql_result(mysql_query("SELECT `fan_descr` FROM fanspeed WHERE `device_id` = '$id' AND `fan_oid` = '$fan_oid'"), 0) != $descr) { echo("U"); - mysql_query("UPDATE fanspeed SET `fan_descr` = '$descr' WHERE `fan_host` = '$id' AND `fan_oid` = '$fan_oid'"); + mysql_query("UPDATE fanspeed SET `fan_descr` = '$descr' WHERE `device_id` = '$id' AND `fan_oid` = '$fan_oid'"); } else { @@ -75,9 +75,9 @@ if ($device['os'] == "linux") if ($monitor == 'true') { $descr = trim(str_replace(" Fan","",str_ireplace("Speed", "", $descr))); - if (mysql_result(mysql_query("SELECT count(fan_id) FROM `fanspeed` WHERE fan_oid = '$fan_oid' AND fan_host = '$id'"),0) == '0') + if (mysql_result(mysql_query("SELECT count(fan_id) FROM `fanspeed` WHERE fan_oid = '$fan_oid' AND device_id = '$id'"),0) == '0') { - $query = "INSERT INTO fanspeed (`fan_host`, `fan_oid`, `fan_descr`, `fan_current`, `fan_limit`) values ('$id', '$fan_oid', '$descr', '$fan', '$limit')"; + $query = "INSERT INTO fanspeed (`device_id`, `fan_oid`, `fan_descr`, `fan_current`, `fan_limit`) values ('$id', '$fan_oid', '$descr', '$fan', '$limit')"; mysql_query($query); echo("+"); } @@ -94,7 +94,7 @@ if ($device['os'] == "linux") ## Delete removed sensors -$sql = "SELECT * FROM fanspeed AS V, devices AS D WHERE V.fan_host = D.device_id AND D.device_id = '".$device['device_id']."'"; +$sql = "SELECT * FROM fanspeed AS V, devices AS D WHERE V.device_id = D.device_id AND D.device_id = '".$device['device_id']."'"; if ($query = mysql_query($sql)) { while ($sensor = mysql_fetch_array($query)) @@ -103,7 +103,7 @@ if ($query = mysql_query($sql)) $i = 0; while ($i < count($fan_exists) && !$exists) { - $thisfan = $sensor['fan_host'] . " " . $sensor['fan_oid']; + $thisfan = $sensor['device_id'] . " " . $sensor['fan_oid']; if ($fan_exists[$i] == $thisfan) { $exists = 1; } $i++; } diff --git a/includes/discovery/temperatures.php b/includes/discovery/temperatures.php index d1773d2d8..ac5ba1a96 100755 --- a/includes/discovery/temperatures.php +++ b/includes/discovery/temperatures.php @@ -7,6 +7,50 @@ $port = $device['port']; echo("Temperatures : "); + +if($device['os'] == "ironware") +{ + echo("IronWare "); + $oids = shell_exec($config['snmpwalk'] . " -$snmpver -CI -Osqn -m FOUNDRY-SN-AGENT-MIB:FOUNDRY-SN-ROOT-MIB -c $community $hostname:$port snAgentTempSensorDescr"); + $oids = trim($oids); + $oids = str_replace(".1.3.6.1.4.1.1991.1.1.2.13.1.1.3.", "", $oids); + foreach(explode("\n", $oids) as $data) + { + $data = trim($data); + if ($data != "") + { + list($oid) = explode(" ", $data); + $temp_oid = ".1.3.6.1.4.1.1991.1.1.2.13.1.1.4.$oid"; + $descr_oid = ".1.3.6.1.4.1.1991.1.1.2.13.1.1.3.$oid"; + $descr = trim(shell_exec($config['snmpget'] . " -m JUNIPER-MIB -O qv -$snmpver -c $community $hostname:$port $descr_oid")); + $temp = trim(shell_exec($config['snmpget'] . " -m JUNIPER-MIB -O qv -$snmpver -c $community $hostname:$port $temp_oid")); + if (!strstr($descr, "No") && !strstr($temp, "No") && $descr != "" && $temp != "0") + { + $descr = str_replace("\"", "", $descr); + $descr = str_replace("temperature", "", $descr); + $descr = str_replace("temp", "", $descr); + $descr = str_replace("sensor", "Sensor", $descr); + $descr = str_replace("Line module", "Line Mod", $descr); + $descr = str_replace(" ", " ", $descr); + $descr = trim($descr); + if (mysql_result(mysql_query("SELECT count(temp_id) FROM `temperature` WHERE temp_oid = '$temp_oid' AND device_id = '$id'"),0) == '0') + { + $query = "INSERT INTO temperature (`device_id`, `temp_oid`, `temp_descr`, `temp_limit`, `temp_current`, `temp_precision`) values ('$id', '$temp_oid', '$descr'," . ($config['defaults']['temp_limit'] ? $config['defaults']['temp_limit'] : '60') . ", '$temp', '2')"; + mysql_query($query); + echo("+"); + } elseif (mysql_result(mysql_query("SELECT `temp_descr` FROM temperature WHERE `device_id` = '$id' AND `temp_oid` = '$temp_oid'"), 0) != $descr) { + mysql_query("UPDATE temperature SET `temp_descr` = '$descr' WHERE `device_id` = '$id' AND `temp_oid` = '$temp_oid' AND `temp_precision` = '2'"); + echo("U"); + } else { + echo("."); + } + $temp_exists[] = "$id $temp_oid"; + } + } + } +} + + ## JunOS Temperatures if ($device['os'] == "junos") { @@ -31,13 +75,13 @@ if ($device['os'] == "junos") $descr = str_replace("temp", "", $descr); $descr = str_replace("sensor", "", $descr); $descr = trim($descr); - if (mysql_result(mysql_query("SELECT count(temp_id) FROM `temperature` WHERE temp_oid = '$temp_oid' AND temp_host = '$id'"),0) == '0') + if (mysql_result(mysql_query("SELECT count(temp_id) FROM `temperature` WHERE temp_oid = '$temp_oid' AND device_id = '$id'"),0) == '0') { - $query = "INSERT INTO temperature (`temp_host`, `temp_oid`, `temp_descr`, `temp_limit`, `temp_current`) values ('$id', '$temp_oid', '$descr'," . ($config['defaults']['temp_limit'] ? $config['defaults']['temp_limit'] : '60') . ", '$temp')"; + $query = "INSERT INTO temperature (`device_id`, `temp_oid`, `temp_descr`, `temp_limit`, `temp_current`) values ('$id', '$temp_oid', '$descr'," . ($config['defaults']['temp_limit'] ? $config['defaults']['temp_limit'] : '60') . ", '$temp')"; mysql_query($query); echo("+"); - } elseif (mysql_result(mysql_query("SELECT `temp_descr` FROM temperature WHERE `temp_host` = '$id' AND `temp_oid` = '$temp_oid'"), 0) != $descr) { - mysql_query("UPDATE temperature SET `temp_descr` = '$descr' WHERE `temp_host` = '$id' AND `temp_oid` = '$temp_oid'"); + } elseif (mysql_result(mysql_query("SELECT `temp_descr` FROM temperature WHERE `device_id` = '$id' AND `temp_oid` = '$temp_oid'"), 0) != $descr) { + mysql_query("UPDATE temperature SET `temp_descr` = '$descr' WHERE `device_id` = '$id' AND `temp_oid` = '$temp_oid'"); echo("U"); } else { echo("."); @@ -59,15 +103,15 @@ if ($device['os'] == "papouch-tme") { $temp_oid = "SNMPv2-SMI::enterprises.18248.1.1.1.0"; $descr = trim(str_replace("\"", "", $descr)); - if (mysql_result(mysql_query("SELECT count(temp_id) FROM `temperature` WHERE temp_oid = '$temp_oid' AND temp_host = '$id'"),0) == '0') + if (mysql_result(mysql_query("SELECT count(temp_id) FROM `temperature` WHERE temp_oid = '$temp_oid' AND device_id = '$id'"),0) == '0') { - $query = "INSERT INTO temperature (`temp_host`, `temp_oid`, `temp_descr`, `temp_precision`, `temp_limit`, `temp_current`) values ('$id', '$temp_oid', '$descr',10," . ($config['defaults']['temp_limit'] ? $config['defaults']['temp_limit'] : '60') . ", '$temp')"; + $query = "INSERT INTO temperature (`device_id`, `temp_oid`, `temp_descr`, `temp_precision`, `temp_limit`, `temp_current`) values ('$id', '$temp_oid', '$descr',10," . ($config['defaults']['temp_limit'] ? $config['defaults']['temp_limit'] : '60') . ", '$temp')"; mysql_query($query); echo("+"); - } elseif (mysql_result(mysql_query("SELECT `temp_descr` FROM temperature WHERE `temp_host` = '$id' AND `temp_oid` = '$temp_oid'"), 0) != $descr) + } elseif (mysql_result(mysql_query("SELECT `temp_descr` FROM temperature WHERE `device_id` = '$id' AND `temp_oid` = '$temp_oid'"), 0) != $descr) { echo("U"); - mysql_query("UPDATE temperature SET `temp_descr` = '$descr' WHERE `temp_host` = '$id' AND `temp_oid` = '$temp_oid'"); + mysql_query("UPDATE temperature SET `temp_descr` = '$descr' WHERE `device_id` = '$id' AND `temp_oid` = '$temp_oid'"); } else { echo("."); } @@ -89,15 +133,15 @@ if ($device['os'] == "linux") $descr_query = $config['snmpget'] . " -$snmpver -m SNMPv2-SMI -Osqn -c $community $hostname:$port .1.3.6.1.4.1.2021.7891.$oid.2.1 | sed s/.1.3.6.1.4.1.2021.7891.$oid.2.1\ //"; $descr = trim(str_replace("\"", "", shell_exec($descr_query))); $fulloid = ".1.3.6.1.4.1.2021.7891.$oid.101.1"; - if (!mysql_result(mysql_query("SELECT count(temp_id) FROM temperature WHERE `temp_host` = '$id' AND `temp_oid` = '$fulloid'"), 0)) + if (!mysql_result(mysql_query("SELECT count(temp_id) FROM temperature WHERE `device_id` = '$id' AND `temp_oid` = '$fulloid'"), 0)) { echo("+"); - mysql_query("INSERT INTO `temperature` (`temp_host`,`temp_oid`,`temp_descr`,`temp_limit`) VALUES ('$id', '$fulloid', '$descr'," . ($config['defaults']['temp_limit'] ? $config['defaults']['temp_limit'] : '60') . ")"); + mysql_query("INSERT INTO `temperature` (`device_id`,`temp_oid`,`temp_descr`,`temp_limit`) VALUES ('$id', '$fulloid', '$descr'," . ($config['defaults']['temp_limit'] ? $config['defaults']['temp_limit'] : '60') . ")"); } - elseif (mysql_result(mysql_query("SELECT `temp_descr` FROM temperature WHERE `temp_host` = '$id' AND `temp_oid` = '$fulloid'"), 0) != $descr) + elseif (mysql_result(mysql_query("SELECT `temp_descr` FROM temperature WHERE `device_id` = '$id' AND `temp_oid` = '$fulloid'"), 0) != $descr) { echo("U"); - mysql_query("UPDATE temperature SET `temp_descr` = '$descr' WHERE `temp_host` = '$id' AND `temp_oid` = '$fulloid'"); + mysql_query("UPDATE temperature SET `temp_descr` = '$descr' WHERE `device_id` = '$id' AND `temp_oid` = '$fulloid'"); } else { @@ -123,15 +167,15 @@ if (strstr($device['hardware'], "dell")) $descr_query = $config['snmpget'] . " -m MIB-Dell-10892 -$snmpver -Onvq -c $community $hostname:$port .1.3.6.1.4.1.674.10892.1.700.20.1.8.$oid"; $descr = trim(str_replace("\"", "", shell_exec($descr_query))); $fulloid = ".1.3.6.1.4.1.674.10892.1.700.20.1.6.$oid"; - if (!mysql_result(mysql_query("SELECT count(temp_id) FROM temperature WHERE `temp_host` = '$id' AND `temp_oid` = '$fulloid'"), 0)) + if (!mysql_result(mysql_query("SELECT count(temp_id) FROM temperature WHERE `device_id` = '$id' AND `temp_oid` = '$fulloid'"), 0)) { - mysql_query("INSERT INTO `temperature` (`temp_host`,`temp_oid`,`temp_descr`, `temp_precision`, `temp_limit`) VALUES ('$id', '$fulloid', '$descr', '10', " . ($config['defaults']['temp_limit'] ? $config['defaults']['temp_limit'] : '60') . ")"); + mysql_query("INSERT INTO `temperature` (`device_id`,`temp_oid`,`temp_descr`, `temp_precision`, `temp_limit`) VALUES ('$id', '$fulloid', '$descr', '10', " . ($config['defaults']['temp_limit'] ? $config['defaults']['temp_limit'] : '60') . ")"); echo("+"); } - elseif (mysql_result(mysql_query("SELECT `temp_descr` FROM temperature WHERE `temp_host` = '$id' AND `temp_oid` = '$fulloid'"), 0) != $descr) + elseif (mysql_result(mysql_query("SELECT `temp_descr` FROM temperature WHERE `device_id` = '$id' AND `temp_oid` = '$fulloid'"), 0) != $descr) { - mysql_query("UPDATE temperature SET `temp_descr` = '$descr' WHERE `temp_host` = '$id' AND `temp_oid` = '$fulloid'"); - echo("UPDATE temperature SET `temp_descr` = '$descr' WHERE `temp_host` = '$id' AND `temp_oid` = '$fulloid'"); + mysql_query("UPDATE temperature SET `temp_descr` = '$descr' WHERE `device_id` = '$id' AND `temp_oid` = '$fulloid'"); + echo("UPDATE temperature SET `temp_descr` = '$descr' WHERE `device_id` = '$id' AND `temp_oid` = '$fulloid'"); echo("U"); } else @@ -162,16 +206,16 @@ if ($device['os'] == "linux") $temp = trim(shell_exec($config['snmpget'] . " -m LM-SENSORS-MIB -O qv -$snmpver -c $community $hostname:$port $temp_oid")) / 1000; $descr = str_ireplace("temp-", "", $descr); $descr = trim($descr); - if (mysql_result(mysql_query("SELECT count(temp_id) FROM `temperature` WHERE temp_oid = '$temp_oid' AND temp_host = '$id'"),0) == '0') + if (mysql_result(mysql_query("SELECT count(temp_id) FROM `temperature` WHERE temp_oid = '$temp_oid' AND device_id = '$id'"),0) == '0') { - $query = "INSERT INTO temperature (`temp_host`, `temp_oid`, `temp_descr`, `temp_precision`, `temp_limit`, `temp_current`) values ('$id', '$temp_oid', '$descr',1000, " . ($config['defaults']['temp_limit'] ? $config['defaults']['temp_limit'] : '60') . ", '$temp')"; + $query = "INSERT INTO temperature (`device_id`, `temp_oid`, `temp_descr`, `temp_precision`, `temp_limit`, `temp_current`) values ('$id', '$temp_oid', '$descr',1000, " . ($config['defaults']['temp_limit'] ? $config['defaults']['temp_limit'] : '60') . ", '$temp')"; mysql_query($query); echo("+"); } - elseif (mysql_result(mysql_query("SELECT `temp_descr` FROM temperature WHERE `temp_host` = '$id' AND `temp_oid` = '$temp_oid'"), 0) != $descr) + elseif (mysql_result(mysql_query("SELECT `temp_descr` FROM temperature WHERE `device_id` = '$id' AND `temp_oid` = '$temp_oid'"), 0) != $descr) { echo("U"); - mysql_query("UPDATE temperature SET `temp_descr` = '$descr' WHERE `temp_host` = '$id' AND `temp_oid` = '$temp_oid'"); + mysql_query("UPDATE temperature SET `temp_descr` = '$descr' WHERE `device_id` = '$id' AND `temp_oid` = '$temp_oid'"); } else { @@ -209,9 +253,9 @@ if ($device['os'] == "linux") if ($monitor == 'true') { $descr = trim(str_ireplace("temperature", "", $descr)); - if (mysql_result(mysql_query("SELECT count(temp_id) FROM `temperature` WHERE temp_oid = '$temp_oid' AND temp_host = '$id'"),0) == '0') + if (mysql_result(mysql_query("SELECT count(temp_id) FROM `temperature` WHERE temp_oid = '$temp_oid' AND device_id = '$id'"),0) == '0') { - $query = "INSERT INTO temperature (`temp_host`, `temp_oid`, `temp_descr`, `temp_current`, `temp_limit`, `temp_precision`) values ('$id', '$temp_oid', '$descr', '$temp', '$limit','$divisor')"; + $query = "INSERT INTO temperature (`device_id`, `temp_oid`, `temp_descr`, `temp_current`, `temp_limit`, `temp_precision`) values ('$id', '$temp_oid', '$descr', '$temp', '$limit','$divisor')"; mysql_query($query); echo("+"); } @@ -248,9 +292,9 @@ if ($device['os'] == "ios") $descr = str_replace("temperature", "", $descr); $descr = str_replace("temp", "", $descr); $descr = trim($descr); - if (mysql_result(mysql_query("SELECT count(temp_id) FROM `temperature` WHERE temp_oid = '$temp_oid' AND temp_host = '$id'"),0) == '0') + if (mysql_result(mysql_query("SELECT count(temp_id) FROM `temperature` WHERE temp_oid = '$temp_oid' AND device_id = '$id'"),0) == '0') { - $query = "INSERT INTO temperature (`temp_host`, `temp_oid`, `temp_descr`, `temp_limit`, `temp_current`) values ('$id', '$temp_oid', '$descr', " . ($config['defaults']['temp_limit'] ? $config['defaults']['temp_limit'] : '60') . ", '$temp')"; + $query = "INSERT INTO temperature (`device_id`, `temp_oid`, `temp_descr`, `temp_limit`, `temp_current`) values ('$id', '$temp_oid', '$descr', " . ($config['defaults']['temp_limit'] ? $config['defaults']['temp_limit'] : '60') . ", '$temp')"; mysql_query($query); echo("+"); } @@ -266,7 +310,7 @@ if ($device['os'] == "ios") ## Delete removed sensors -$sql = "SELECT * FROM temperature AS T, devices AS D WHERE T.temp_host = D.device_id AND D.device_id = '".$device['device_id']."'"; +$sql = "SELECT * FROM temperature AS T, devices AS D WHERE T.device_id = D.device_id AND D.device_id = '".$device['device_id']."'"; if ($query = mysql_query($sql)) { @@ -276,7 +320,7 @@ if ($query = mysql_query($sql)) $i = 0; while ($i < count($temp_exists) && !$exists) { - $thistemp = $sensor['temp_host'] . " " . $sensor['temp_oid']; + $thistemp = $sensor['device_id'] . " " . $sensor['temp_oid']; if ($temp_exists[$i] == $thistemp) { $exists = 1; } $i++; } diff --git a/includes/discovery/voltages.php b/includes/discovery/voltages.php index d112f33a6..728437e0e 100755 --- a/includes/discovery/voltages.php +++ b/includes/discovery/voltages.php @@ -27,16 +27,16 @@ if ($device['os'] == "linux") $volt = trim(shell_exec($config['snmpget'] . " -m LM-SENSORS-MIB -O qv -$snmpver -c $community $hostname:$port $volt_oid")) / 1000; $descr = str_ireplace("temp-", "", $descr); $descr = trim($descr); - if (mysql_result(mysql_query("SELECT count(volt_id) FROM `voltage` WHERE volt_oid = '$volt_oid' AND volt_host = '$id'"),0) == '0') + if (mysql_result(mysql_query("SELECT count(volt_id) FROM `voltage` WHERE volt_oid = '$volt_oid' AND device_id = '$id'"),0) == '0') { - $query = "INSERT INTO voltage (`volt_host`, `volt_oid`, `volt_descr`, `volt_precision`, `volt_limit`, `volt_current`) values ('$id', '$volt_oid', '$descr',1000, " . ($config['defaults']['volt_limit'] ? $config['defaults']['volt_limit'] : '60') . ", '$volt')"; + $query = "INSERT INTO voltage (`device_id`, `volt_oid`, `volt_descr`, `volt_precision`, `volt_limit`, `volt_current`) values ('$id', '$volt_oid', '$descr',1000, " . ($config['defaults']['volt_limit'] ? $config['defaults']['volt_limit'] : '60') . ", '$volt')"; mysql_query($query); echo("+"); } - elseif (mysql_result(mysql_query("SELECT `volt_descr` FROM voltage WHERE `volt_host` = '$id' AND `volt_oid` = '$volt_oid'"), 0) != $descr) + elseif (mysql_result(mysql_query("SELECT `volt_descr` FROM voltage WHERE `device_id` = '$id' AND `volt_oid` = '$volt_oid'"), 0) != $descr) { echo("U"); - mysql_query("UPDATE voltage SET `volt_descr` = '$descr' WHERE `volt_host` = '$id' AND `volt_oid` = '$volt_oid'"); + mysql_query("UPDATE voltage SET `volt_descr` = '$descr' WHERE `device_id` = '$id' AND `volt_oid` = '$volt_oid'"); } else { @@ -75,9 +75,9 @@ if ($device['os'] == "linux") if ($monitor == 'true') { $descr = trim(str_ireplace("Voltage", "", $descr)); - if (mysql_result(mysql_query("SELECT count(volt_id) FROM `voltage` WHERE volt_oid = '$volt_oid' AND volt_host = '$id'"),0) == '0') + if (mysql_result(mysql_query("SELECT count(volt_id) FROM `voltage` WHERE volt_oid = '$volt_oid' AND device_id = '$id'"),0) == '0') { - $query = "INSERT INTO voltage (`volt_host`, `volt_oid`, `volt_descr`, `volt_current`, `volt_limit`, `volt_limit_low`, `volt_precision`) values ('$id', '$volt_oid', '$descr', '$volt', '$limit','$lowlimit','1000')"; + $query = "INSERT INTO voltage (`device_id`, `volt_oid`, `volt_descr`, `volt_current`, `volt_limit`, `volt_limit_low`, `volt_precision`) values ('$id', '$volt_oid', '$descr', '$volt', '$limit','$lowlimit','1000')"; mysql_query($query); echo("+"); } @@ -94,7 +94,7 @@ if ($device['os'] == "linux") ## Delete removed sensors -$sql = "SELECT * FROM voltage AS V, devices AS D WHERE V.volt_host = D.device_id AND D.device_id = '".$device['device_id']."'"; +$sql = "SELECT * FROM voltage AS V, devices AS D WHERE V.device_id = D.device_id AND D.device_id = '".$device['device_id']."'"; if ($query = mysql_query($sql)) { @@ -104,7 +104,7 @@ if ($query = mysql_query($sql)) $i = 0; while ($i < count($volt_exists) && !$exists) { - $thisvolt = $sensor['volt_host'] . " " . $sensor['volt_oid']; + $thisvolt = $sensor['device_id'] . " " . $sensor['volt_oid']; if ($volt_exists[$i] == $thisvolt) { $exists = 1; } $i++; } diff --git a/includes/functions.php b/includes/functions.php index 73ca6d5f2..6426c1da5 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -425,7 +425,7 @@ function delHost($id) mysql_query("DELETE FROM `devices_attribs` WHERE `device_id` = '$id'"); mysql_query("DELETE FROM `devices_perms` WHERE `device_id` = '$id'"); mysql_query("DELETE FROM `bgpPeers` WHERE `device_id` = '$id'"); - mysql_query("DELETE FROM `temperature` WHERE `temp_host` = '$id'"); + mysql_query("DELETE FROM `temperature` WHERE `device_id` = '$id'"); mysql_query("DELETE FROM `vlans` WHERE `device_id` = '$id'"); mysql_query("DELETE FROM `vrfs` WHERE `device_id` = '$id'"); mysql_query("DELETE FROM `storage` WHERE `host_id` = '$id'"); @@ -458,7 +458,7 @@ function retireHost($id) echo("Removed interface $int_id ($int_if)
    "); } mysql_query("DELETE FROM `entPhysical` WHERE `device_id` = '$id'"); - mysql_query("DELETE FROM `temperature` WHERE `temp_host` = '$id'"); + mysql_query("DELETE FROM `temperature` WHERE `device_id` = '$id'"); mysql_query("DELETE FROM `storage` WHERE `host_id` = '$id'"); mysql_query("DELETE FROM `alerts` WHERE `device_id` = '$id'"); mysql_query("DELETE FROM `services` WHERE `service_host` = '$id'"); diff --git a/includes/polling/fanspeeds.inc.php b/includes/polling/fanspeeds.inc.php index 5c7b6fbc0..e76f4af1a 100755 --- a/includes/polling/fanspeeds.inc.php +++ b/includes/polling/fanspeeds.inc.php @@ -1,6 +1,6 @@ 'Stackable FastIron workgroup', + 'snFIBBSwitch' => 'Stackable FastIron backbone', + 'snNIRouter' => 'Stackable NetIron', + 'snSI' => 'Stackable ServerIron', + 'snSIXL' => 'Stackable ServerIronXL', + 'snSIXLTCS' => 'Stackable ServerIronXL TCS', + 'snTISwitch' => 'Stackable TurboIron', + 'snTIRouter' => 'Stackable TurboIron', + 'snT8Switch' => 'Stackable TurboIron 8', + 'snT8Router' => 'Stackable TurboIron 8', + 'snT8SIXLG' => 'Stackable ServerIronXLG', + 'snBI4000Switch' => 'BigIron 4000', + 'snBI4000Router' => 'BigIron 4000', + 'snBI4000SI' => 'BigServerIron', + 'snBI8000Switch' => 'BigIron 8000', + 'snBI8000Router' => 'BigIron 8000', + 'snBI8000SI' => 'BigServerIron', + 'snFI2Switch' => 'FastIron II', + 'snFI2Router' => 'FastIron II', + 'snFI2PlusSwitch' => 'FastIron II Plus', + 'snFI2PlusRouter' => 'FastIron II Plus', + 'snNI400Router' => 'NetIron 400', + 'snNI800Router' => 'NetIron 800', + 'snFI2GCSwitch' => 'FastIron II GC', + 'snFI2GCRouter' => 'FastIron II GC', + 'snFI2PlusGCSwitch' => 'FastIron II Plus GC', + 'snFI2PlusGCRouter' => 'FastIron II Plus GC', + 'snBI15000Switch' => 'BigIron 15000', + 'snBI15000Router' => 'BigIron 15000', + 'snNI1500Router' => 'NetIron 1500', + 'snFI3Switch' => 'FastIron III', + 'snFI3Router' => 'FastIron III', + 'snFI3GCSwitch' => 'FastIron III GC', + 'snFI3GCRouter' => 'FastIron III GC', + 'snSI400Switch' => 'ServerIron 400', + 'snSI400Router' => 'ServerIron 400', + 'snSI800Switch' => 'ServerIron800', + 'snSI800Router' => 'ServerIron800', + 'snSI1500Switch' => 'ServerIron1500', + 'snSI1500Router' => 'ServerIron1500', + 'sn4802Switch' => 'Stackable 4802', + 'sn4802Router' => 'Stackable 4802', + 'sn4802SI' => 'Stackable 4802 ServerIron', + 'snFI400Switch' => 'FastIron 400', + 'snFI400Router' => 'FastIron 400', + 'snFI800Switch' => 'FastIron800', + 'snFI800Router' => 'FastIron800', + 'snFI1500Switch' => 'FastIron1500', + 'snFI1500Router' => 'FastIron1500', + 'snFES2402' => 'FastIron Edge Switch(FES) 2402', + 'snFES2402Switch' => 'FES2402', + 'snFES2402Router' => 'FES2402', + 'snFES4802' => 'FastIron Edge Switch(FES) 4802', + 'snFES4802Switch' => 'FES4802', + 'snFES4802Router' => 'FES4802', + 'snFES9604' => 'FastIron Edge Switch(FES) 9604', + 'snFES9604Switch' => 'FES9604', + 'snFES9604Router' => 'FES9604', + 'snFES12GCF' => 'FastIron Edge Switch(FES) 12GCF ', + 'snFES12GCFSwitch' => 'snFES12GCF ', + 'snFES12GCFRouter' => 'snFES12GCF', + 'snFES2402P' => 'FastIron Edge Switch(FES) 2402 POE ', + 'snFES2402P' => 'snFES2402POE ', + 'snFES2402P' => 'snFES2402POE', + 'snFES4802P' => 'FastIron Edge Switch (FES) 4802 POE ', + 'snFES4802P' => 'snFES4802POE ', + 'snFES4802P' => 'snFES4802POE', + 'snNI4802Switch' => 'NetIron 4802', + 'snNI4802Router' => 'NetIron 4802', + 'snBIMG8Switch' => 'BigIron MG8', + 'snBIMG8Router' => 'BigIron MG8', + 'snNI40GRouter' => 'NetIron 40G', + 'snFESX424' => 'FastIron Edge Switch(FES) 24G', + 'snFESX424Switch' => 'FESX424', + 'snFESX424Router' => 'FESX424', + 'snFESX424Prem' => 'FastIron Edge Switch(FES) 24G-PREM', + 'snFESX424PremSwitch' => 'FESX424-PREM', + 'snFESX424PremRouter' => 'FESX424-PREM', + 'snFESX424Plus1XG' => 'FastIron Edge Switch(FES) 24G + 1 10G', + 'snFESX424Plus1XGSwitch' => 'FESX424+1XG', + 'snFESX424Plus1XGRouter' => 'FESX424+1XG', + 'snFESX424Plus1XGPrem' => 'FastIron Edge Switch(FES) 24G + 1 10G-PREM', + 'snFESX424Plus1XGPremSwitch' => 'FESX424+1XG-PREM', + 'snFESX424Plus1XGPremRouter' => 'FESX424+1XG-PREM', + 'snFESX424Plus2XG' => 'FastIron Edge Switch(FES) 24G + 2 10G', + 'snFESX424Plus2XGSwitch' => 'FESX424+2XG', + 'snFESX424Plus2XGRouter' => 'FESX424+2XG', + 'snFESX424Plus2XGPrem' => 'FastIron Edge Switch(FES) 24G + 2 10G-PREM', + 'snFESX424Plus2XGPremSwitch' => 'FESX424+2XG-PREM', + 'snFESX424Plus2XGPremRouter' => 'FESX424+2XG-PREM', + 'snFESX448' => 'FastIron Edge Switch(FES) 48G', + 'snFESX448Switch' => 'FESX448', + 'snFESX448Router' => 'FESX448', + 'snFESX448Prem' => 'FastIron Edge Switch(FES) 48G-PREM', + 'snFESX448PremSwitch' => 'FESX448-PREM', + 'snFESX448PremRouter' => 'FESX448-PREM', + 'snFESX448Plus1XG' => 'FastIron Edge Switch(FES) 48G + 1 10G', + 'snFESX448Plus1XGSwitch' => 'FESX448+1XG', + 'snFESX448Plus1XGRouter' => 'FESX448+1XG', + 'snFESX448Plus1XGPrem' => 'FastIron Edge Switch(FES) 48G + 1 10G-PREM', + 'snFESX448Plus1XGPremSwitch' => 'FESX448+1XG-PREM', + 'snFESX448Plus1XGPremRouter' => 'FESX448+1XG-PREM', + 'snFESX448Plus2XG' => 'FastIron Edge Switch(FES) 48G + 2 10G', + 'snFESX448Plus2XGSwitch' => 'FESX448+2XG', + 'snFESX448Plus2XGRouter' => 'FESX448+2XG', + 'snFESX448Plus2XGPrem' => 'FastIron Edge Switch(FES) 48G + 2 10G-PREM', + 'snFESX448Plus2XGPremSwitch' => 'FESX448+2XG-PREM', + 'snFESX448Plus2XGPremRouter' => 'FESX448+2XG-PREM', + 'snFESX424Fiber' => 'FastIron Edge Switch(FES)Fiber 24G', + 'snFESX424FiberSwitch' => 'FESX424Fiber', + 'snFESX424FiberRouter' => 'FESX424Fiber', + 'snFESX424FiberPrem' => 'FastIron Edge Switch(FES)Fiber 24G-PREM', + 'snFESX424FiberPremSwitch' => 'FESX424Fiber-PREM', + 'snFESX424FiberPremRouter' => 'FESX424Fiber-PREM', + 'snFESX424FiberPlus1XG' => 'FastIron Edge Switch(FES)Fiber 24G + 1 10G', + 'snFESX424FiberPlus1XGSwitch' => 'FESX424Fiber+1XG', + 'snFESX424FiberPlus1XGRouter' => 'FESX424Fiber+1XG', + 'snFESX424FiberPlus1XGPrem' => 'FastIron Edge Switch(FES)Fiber 24G + 1 10G-PREM', + 'snFESX424FiberPlus1XGPremSwitch' => 'FESX424Fiber+1XG-PREM', + 'snFESX424FiberPlus1XGPremRouter' => 'FESX424Fiber+1XG-PREM', + 'snFESX424FiberPlus2XG' => 'FastIron Edge Switch(FES)Fiber 24G + 2 10G', + 'snFESX424FiberPlus2XGSwitch' => 'FESX424Fiber+2XG', + 'snFESX424FiberPlus2XGRouter' => 'FESX424Fiber+2XG', + 'snFESX424FiberPlus2XGPrem' => 'FastIron Edge Switch(FES)Fiber 24G + 2 10G-PREM', + 'snFESX424FiberPlus2XGPremSwitch' => 'FESX424Fiber+2XG-PREM', + 'snFESX424FiberPlus2XGPremRouter' => 'FESX424Fiber+2XG-PREM', + 'snFESX448Fiber' => 'FastIron Edge Switch(FES)Fiber 48G', + 'snFESX448FiberSwitch' => 'FESX448Fiber', + 'snFESX448FiberRouter' => 'FESX448Fiber', + 'snFESX448FiberPrem' => 'FastIron Edge Switch(FES)Fiber 48G-PREM', + 'snFESX448FiberPremSwitch' => 'FESX448Fiber-PREM', + 'snFESX448FiberPremRouter' => 'FESX448Fiber-PREM', + 'snFESX448FiberPlus1XG' => 'FastIron Edge Switch(FES)Fiber 48G + 1 10G', + 'snFESX448FiberPlus1XGSwitch' => 'FESX448Fiber+1XG', + 'snFESX448FiberPlus1XGRouter' => 'FESX448Fiber+1XG', + 'snFESX448FiberPlus1XGPrem' => 'FastIron Edge Switch(FES)Fiber 48G + 1 10G-PREM', + 'snFESX448FiberPlus1XGPremSwitch' => 'FESX448Fiber+1XG-PREM', + 'snFESX448FiberPlus1XGPremRouter' => 'FESX448Fiber+1XG-PREM', + 'snFESX448FiberPlus2XG' => 'FastIron Edge Switch(FES)Fiber 48G + 2 10G', + 'snFESX448FiberPlus2XGSwitch' => 'FESX448Fiber+2XG', + 'snFESX448FiberPlus2XGRouter' => 'FESX448+2XG', + 'snFESX448FiberPlus2XGPrem' => 'FastIron Edge Switch(FES)Fiber 48G + 2 10G-PREM', + 'snFESX448FiberPlus2XGPremSwitch' => 'FESX448Fiber+2XG-PREM', + 'snFESX448FiberPlus2XGPremRouter' => 'FESX448Fiber+2XG-PREM', + 'snFESX424P' => 'FastIron Edge Switch(FES) 24G POE', + 'snFESX424P' => 'FESX424POE', + 'snFESX424P' => 'FESX424POE', + 'snFESX424P' => 'FastIron Edge Switch(FES) 24GPOE-PREM', + 'snFESX424P' => 'FESX424POE-PREM', + 'snFESX424P' => 'FESX424POE-PREM', + 'snFESX424P' => 'FastIron Edge Switch(FES) 24GPOE + 1 10G', + 'snFESX424P' => 'FESX424POE+1XG', + 'snFESX424P' => 'FESX424POE+1XG', + 'snFESX424P' => 'FastIron Edge Switch(FES) 24GPOE + 1 10G-PREM', + 'snFESX424P' => 'FESX424POE+1XG-PREM', + 'snFESX424P' => 'FESX424POE+1XG-PREM', + 'snFESX424P' => 'FastIron Edge Switch(FES) 24GPOE + 2 10G', + 'snFESX424P' => 'FESX424POE+2XG', + 'snFESX424P' => 'FESX424POE+2XG', + 'snFESX424P' => 'FastIron Edge Switch(FES) 24GPOE + 2 10G-PREM', + 'snFESX424P' => 'FESX424POE+2XG-PREM', + 'snFESX424P' => 'FESX424POE+2XG-PREM', + 'snFESX624' => 'FastIron Edge V6 Switch(FES) 24G', + 'snFESX624Switch' => 'FESX624', + 'snFESX624Router' => 'FESX624', + 'snFESX624Prem' => 'FastIron Edge V6 Switch(FES) 24G-PREM', + 'snFESX624PremSwitch' => 'FESX624-PREM', + 'snFESX624PremRouter' => 'FESX624-PREM', + 'snFESX624Plus1XG' => 'FastIron Edge V6 Switch(FES) 24G + 1 10G', + 'snFESX624Plus1XGSwitch' => 'FESX624+1XG', + 'snFESX624Plus1XGRouter' => 'FESX624+1XG', + 'snFESX624Plus1XGPrem' => 'FastIron Edge V6 Switch(FES) 24G + 1 10G-PREM', + 'snFESX624Plus1XGPremSwitch' => 'FESX624+1XG-PREM', + 'snFESX624Plus1XGPremRouter' => 'FESX624+1XG-PREM', + 'snFESX624Plus2XG' => 'FastIron Edge V6 Switch(FES) 24G + 2 10G', + 'snFESX624Plus2XGSwitch' => 'FESX624+2XG', + 'snFESX624Plus2XGRouter' => 'FESX624+2XG', + 'snFESX624Plus2XGPrem' => 'FastIron Edge V6 Switch(FES) 24G + 2 10G-PREM', + 'snFESX624Plus2XGPremSwitch' => 'FESX624+2XG-PREM', + 'snFESX624Plus2XGPremRouter' => 'FESX624+2XG-PREM', + 'snFESX648' => 'FastIron Edge V6 Switch(FES) 48G', + 'snFESX648Switch' => 'FESX648', + 'snFESX648Router' => 'FESX648', + 'snFESX648Prem' => 'FastIron Edge V6 Switch(FES) 48G-PREM', + 'snFESX648PremSwitch' => 'FESX648-PREM', + 'snFESX648PremRouter' => 'FESX648-PREM', + 'snFESX648Plus1XG' => 'FastIron Edge V6 Switch(FES) 48G + 1 10G', + 'snFESX648Plus1XGSwitch' => 'FESX648+1XG', + 'snFESX648Plus1XGRouter' => 'FESX648+1XG', + 'snFESX648Plus1XGPrem' => 'FastIron Edge V6 Switch(FES) 48G + 1 10G-PREM', + 'snFESX648Plus1XGPremSwitch' => 'FESX648+1XG-PREM', + 'snFESX648Plus1XGPremRouter' => 'FESX648+1XG-PREM', + 'snFESX648Plus2XG' => 'FastIron Edge V6 Switch(FES) 48G + 2 10G', + 'snFESX648Plus2XGSwitch' => 'FESX648+2XG', + 'snFESX648Plus2XGRouter' => 'FESX648+2XG', + 'snFESX648Plus2XGPrem' => 'FastIron Edge V6 Switch(FES) 48G + 2 10G-PREM', + 'snFESX648Plus2XGPremSwitch' => 'FESX648+2XG-PREM', + 'snFESX648Plus2XGPremRouter' => 'FESX648+2XG-PREM', + 'snFESX624Fiber' => 'FastIron V6 Edge Switch(FES)Fiber 24G', + 'snFESX624FiberSwitch' => 'FESX624Fiber', + 'snFESX624FiberRouter' => 'FESX624Fiber', + 'snFESX624FiberPrem' => 'FastIron Edge V6 Switch(FES)Fiber 24G-PREM', + 'snFESX624FiberPremSwitch' => 'FESX624Fiber-PREM', + 'snFESX624FiberPremRouter' => 'FESX624Fiber-PREM', + 'snFESX624FiberPlus1XG' => 'FastIron Edge V6 Switch(FES)Fiber 24G + 1 10G', + 'snFESX624FiberPlus1XGSwitch' => 'FESX624Fiber+1XG', + 'snFESX624FiberPlus1XGRouter' => 'FESX624Fiber+1XG', + 'snFESX624FiberPlus1XGPrem' => 'FastIron Edge V6 Switch(FES)Fiber 24G + 1 10G-PREM', + 'snFESX624FiberPlus1XGPremSwitch' => 'FESX624Fiber+1XG-PREM', + 'snFESX624FiberPlus1XGPremRouter' => 'FESX624Fiber+1XG-PREM', + 'snFESX624FiberPlus2XG' => 'FastIron Edge V6 Switch(FES)Fiber 24G + 2 10G', + 'snFESX624FiberPlus2XGSwitch' => 'FESX624Fiber+2XG', + 'snFESX624FiberPlus2XGRouter' => 'FESX624Fiber+2XG', + 'snFESX624FiberPlus2XGPrem' => 'FastIron Edge V6 Switch(FES)Fiber 24G + 2 10G-PREM', + 'snFESX624FiberPlus2XGPremSwitch' => 'FESX624Fiber+2XG-PREM', + 'snFESX624FiberPlus2XGPremRouter' => 'FESX624Fiber+2XG-PREM', + 'snFESX648Fiber' => 'FastIron Edge V6 Switch(FES)Fiber 48G', + 'snFESX648FiberSwitch' => 'FESX648Fiber', + 'snFESX648FiberRouter' => 'FESX648Fiber', + 'snFESX648FiberPrem' => 'FastIron Edge V6 Switch(FES)Fiber 48G-PREM', + 'snFESX648FiberPremSwitch' => 'FESX648Fiber-PREM', + 'snFESX648FiberPremRouter' => 'FESX648Fiber-PREM', + 'snFESX648FiberPlus1XG' => 'FastIron Edge V6 Switch(FES)Fiber 48G + 1 10G', + 'snFESX648FiberPlus1XGSwitch' => 'FESX648Fiber+1XG', + 'snFESX648FiberPlus1XGRouter' => 'FESX648Fiber+1XG', + 'snFESX648FiberPlus1XGPrem' => 'FastIron Edge V6 Switch(FES)Fiber 48G + 1 10G-PREM', + 'snFESX648FiberPlus1XGPremSwitch' => 'FESX648Fiber+1XG-PREM', + 'snFESX648FiberPlus1XGPremRouter' => 'FESX648Fiber+1XG-PREM', + 'snFESX648FiberPlus2XG' => 'FastIron Edge V6 Switch(FES)Fiber 48G + 2 10G', + 'snFESX648FiberPlus2XGSwitch' => 'FESX648Fiber+2XG', + 'snFESX648FiberPlus2XGRouter' => 'FESX648+2XG', + 'snFESX648FiberPlus2XGPrem' => 'FastIron Edge V6 Switch(FES)Fiber 48G + 2 10G-PREM', + 'snFESX648FiberPlus2XGPremSwitch' => 'FESX648Fiber+2XG-PREM', + 'snFESX648FiberPlus2XGPremRouter' => 'FESX648Fiber+2XG-PREM', + 'snFESX624P' => 'FastIron Edge V6 Switch(FES) 24G POE', + 'snFESX624P' => 'FESX624POE', + 'snFESX624P' => 'FESX624POE', + 'snFESX624P' => 'FastIron Edge V6 Switch(FES) 24GPOE-PREM', + 'snFESX624P' => 'FESX624POE-PREM', + 'snFESX624P' => 'FESX624POE-PREM', + 'snFESX624P' => 'FastIron Edge V6 Switch(FES) 24GPOE + 1 10G', + 'snFESX624P' => 'FESX624POE+1XG', + 'snFESX624P' => 'FESX624POE+1XG', + 'snFESX624P' => 'FastIron Edge V6 Switch(FES) 24GPOE + 1 10G-PREM', + 'snFESX624P' => 'FESX624POE+1XG-PREM', + 'snFESX624P' => 'FESX624POE+1XG-PREM', + 'snFESX624P' => 'FastIron Edge V6 Switch(FES) 24GPOE + 2 10G', + 'snFESX624P' => 'FESX624POE+2XG', + 'snFESX624P' => 'FESX624POE+2XG', + 'snFESX624P' => 'FastIron Edge V6 Switch(FES) 24GPOE + 2 10G-PREM', + 'snFESX624P' => 'FESX624POE+2XG-PREM', + 'snFESX624P' => 'FESX624POE+2XG-PREM', + 'snFWSX424' => 'FastIron WorkGroup Switch(FWS) 24G', + 'snFWSX424Switch' => 'FWSX424', + 'snFWSX424Router' => 'FWSX424', + 'snFWSX424Plus1XG' => 'FastIron WorkGroup Switch(FWS) 24G + 1 10G', + 'snFWSX424Plus1XGSwitch' => 'FWSX424+1XG', + 'snFWSX424Plus1XGRouter' => 'FWSX424+1XG', + 'snFWSX424Plus2XG' => 'FastIron WorkGroup Switch(FWS) 24G + 2 10G', + 'snFWSX424Plus2XGSwitch' => 'FWSX424+2XG', + 'snFWSX424Plus2XGRouter' => 'FWSX424+2XG', + 'snFWSX448' => 'FastIron WorkGroup Switch(FWS) 48G', + 'snFWSX448Switch' => 'FWSX448', + 'snFWSX448Router' => 'FWSX448', + 'snFWSX448Plus1XG' => 'FastIron WorkGroup Switch(FWS) 48G + 1 10G', + 'snFWSX448Plus1XGSwitch' => 'FWSX448+1XG', + 'snFWSX448Plus1XGRouter' => 'FWSX448+1XG', + 'snFWSX448Plus2XG' => 'FastIron WorkGroup Switch(FWS) 48G + 2 10G', + 'snFWSX448Plus2XGSwitch' => 'FWSX448+2XG', + 'snFWSX448Plus2XGRouter' => 'FWSX448+2XG', + 'snFastIronSuperXFamily' => 'FastIron SuperX Family', + 'snFastIronSuperX' => 'FastIron SuperX', + 'snFastIronSuperXSwitch' => 'FastIron SuperX Switch', + 'snFastIronSuperXRouter' => 'FastIron SuperX Router', + 'snFastIronSuperXBaseL3Switch' => 'FastIron SuperX Base L3 Switch', + 'snFastIronSuperXPrem' => 'FastIron SuperX Premium', + 'snFastIronSuperXPremSwitch' => 'FastIron SuperX Premium Switch', + 'snFastIronSuperXPremRouter' => 'FastIron SuperX Premium Router', + 'snFastIronSuperXPremBaseL3Switch' => 'FastIron SuperX Premium Base L3 Switch', + 'snFastIronSuperX800' => 'FastIron SuperX 800 ', + 'snFastIronSuperX800Switch' => 'FastIron SuperX 800 Switch', + 'snFastIronSuperX800Router' => 'FastIron SuperX 800 Router', + 'snFastIronSuperX800BaseL3Switch' => 'FastIron SuperX 800 Base L3 Switch', + 'snFastIronSuperX800Prem' => 'FastIron SuperX 800 Premium', + 'snFastIronSuperX800PremSwitch' => 'FastIron SuperX 800 Premium Switch', + 'snFastIronSuperX800PremRouter' => 'FastIron SuperX 800 Premium Router', + 'snFastIronSuperX800PremBaseL3Switch' => 'FastIron SuperX 800 Premium Base L3 Switch', + 'snFastIronSuperX1600' => 'FastIron SuperX 1600 ', + 'snFastIronSuperX1600Switch' => 'FastIron SuperX 1600 Switch', + 'snFastIronSuperX1600Router' => 'FastIron SuperX 1600 Router', + 'snFastIronSuperX1600BaseL3Switch' => 'FastIron SuperX 1600 Base L3 Switch', + 'snFastIronSuperX1600Prem' => 'FastIron SuperX 1600 Premium', + 'snFastIronSuperX1600PremSwitch' => 'FastIron SuperX 1600 Premium Switch', + 'snFastIronSuperX1600PremRouter' => 'FastIron SuperX 1600 Premium Router', + 'snFastIronSuperX1600PremBaseL3Switch' => 'FastIron SuperX 1600 Premium Base L3 Switch', + 'snFastIronSuperXV6' => 'FastIron SuperX V6 ', + 'snFastIronSuperXV6Switch' => 'FastIron SuperX V6 Switch', + 'snFastIronSuperXV6Router' => 'FastIron SuperX V6 Router', + 'snFastIronSuperXV6BaseL3Switch' => 'FastIron SuperX V6 Base L3 Switch', + 'snFastIronSuperXV6Prem' => 'FastIron SuperX V6 Premium', + 'snFastIronSuperXV6PremSwitch' => 'FastIron SuperX V6 Premium Switch', + 'snFastIronSuperXV6PremRouter' => 'FastIron SuperX V6 Premium Router', + 'snFastIronSuperXV6PremBaseL3Switch' => 'FastIron SuperX V6 Premium Base L3 Switch', + 'snFastIronSuperX800V6' => 'FastIron SuperX 800 V6 ', + 'snFastIronSuperX800V6Switch' => 'FastIron SuperX 800 V6 Switch', + 'snFastIronSuperX800V6Router' => 'FastIron SuperX 800 V6 Router', + 'snFastIronSuperX800V6BaseL3Switch' => 'FastIron SuperX 800 V6 Base L3 Switch', + 'snFastIronSuperX800V6Prem' => 'FastIron SuperX 800 V6 Premium', + 'snFastIronSuperX800V6PremSwitch' => 'FastIron SuperX 800 Premium V6 Switch', + 'snFastIronSuperX800V6PremRouter' => 'FastIron SuperX 800 Premium V6 Router', + 'snFastIronSuperX800V6PremBaseL3Switch' => 'FastIron SuperX 800 Premium V6 Base L3 Switch', + 'snFastIronSuperX1600V6' => 'FastIron SuperX 1600 V6 ', + 'snFastIronSuperX1600V6Switch' => 'FastIron SuperX 1600 V6 Switch', + 'snFastIronSuperX1600V6Router' => 'FastIron SuperX 1600 V6 Router', + 'snFastIronSuperX1600V6BaseL3Switch' => 'FastIron SuperX 1600 V6 Base L3 Switch', + 'snFastIronSuperX1600V6Prem' => 'FastIron SuperX 1600 Premium V6', + 'snFastIronSuperX1600V6PremSwitch' => 'FastIron SuperX 1600 Premium V6 Switch', + 'snFastIronSuperX1600V6PremRouter' => 'FastIron SuperX 1600 Premium V6 Router', + 'snFastIronSuperX1600V6PremBaseL3Switch' => 'FastIron SuperX 1600 Premium V6 Base L3 Switch', + 'snBigIronSuperXFamily' => 'BigIron SuperX Family', + 'snBigIronSuperX' => 'BigIron SuperX', + 'snBigIronSuperXSwitch' => 'BigIron SuperX Switch', + 'snBigIronSuperXRouter' => 'BigIron SuperX Router', + 'snBigIronSuperXBaseL3Switch' => 'BigIron SuperX Base L3 Switch', + 'snTurboIronSuperXFamily' => 'TurboIron SuperX Family', + 'snTurboIronSuperX' => 'TurboIron SuperX', + 'snTurboIronSuperXSwitch' => 'TurboIron SuperX Switch', + 'snTurboIronSuperXRouter' => 'TurboIron SuperX Router', + 'snTurboIronSuperXBaseL3Switch' => 'TurboIron SuperX Base L3 Switch', + 'snTurboIronSuperXPrem' => 'TurboIron SuperX Premium', + 'snTurboIronSuperXPremSwitch' => 'TurboIron SuperX Premium Switch', + 'snTurboIronSuperXPremRouter' => 'TurboIron SuperX Premium Router', + 'snTurboIronSuperXPremBaseL3Switch' => 'TurboIron SuperX Premium Base L3 Switch', + 'snNIIMRRouter' => 'NetIron IMR', + 'snBIRX16Switch' => 'BigIron RX16', + 'snBIRX16Router' => 'BigIron RX16', + 'snBIRX8Switch' => 'BigIron RX8', + 'snBIRX8Router' => 'BigIron RX8', + 'snBIRX4Switch' => 'BigIron RX4', + 'snBIRX4Router' => 'BigIron RX4', + 'snBIRX32Switch' => 'BigIron RX32', + 'snBIRX32Router' => 'BigIron RX32', + 'snNIXMR16000Router' => 'NetIron XMR16000', + 'snNIXMR8000Router' => 'NetIron XMR8000', + 'snNIXMR4000Router' => 'NetIron XMR4000', + 'snNIXMR32000Router' => 'NetIron XMR32000', + 'snSecureIronLS100' => 'SecureIronLS 100', + 'snSecureIronLS100Switch' => 'SecureIronLS 100 Switch', + 'snSecureIronLS100Router' => 'SecureIronLS 100 Router', + 'snSecureIronLS300' => 'SecureIronLS 300', + 'snSecureIronLS300Switch' => 'SecureIronLS 300 Switch', + 'snSecureIronLS300Router' => 'SecureIronLS 300 Router', + 'snSecureIronTM100' => 'SecureIronTM 100', + 'snSecureIronTM100Switch' => 'SecureIronTM 100 Switch', + 'snSecureIronTM100Router' => 'SecureIronTM 100 Router', + 'snSecureIronTM300' => 'SecureIronTM 300', + 'snSecureIronTM300Switch' => 'SecureIronTM 300 Switch', + 'snSecureIronTM300Router' => 'SecureIronTM 300 Router', + 'snNetIronMLX16Router' => 'NetIron MLX-16', + 'snNetIronMLX8Router' => 'NetIron MLX-8', + 'snNetIronMLX4Router' => 'NetIron MLX-4', + 'snNetIronMLX32Router' => 'NetIron MLX-32', + 'snFGS624P' => 'FastIron GS Switch(FGS) 24-port 10/100/1000 POE Ready', + 'snFGS624PSwitch' => 'FGS624P', + 'snFGS624PRouter' => 'FGS624P', + 'snFGS624XGP' => 'FastIron GS Switch(FGS) 24-port 10/100/1000 POE Ready + 1 10G', + 'snFGS624XGPSwitch' => 'FGS624XGP', + 'snFGS624XGPRouter' => 'FGS624XGP', + 'snFGS624PP' => 'FastIron GS Switch(FGS) 24-port 10/100/1000 POE ', + 'snFGS624PP' => 'snFGS624P-POE', + 'snFGS624PP' => 'snFGS624P-POE', + 'snFGS624XGPP' => 'FastIron GS Switch(FGS) 24-port 10/100/1000 POE + 1 10G', + 'snFGS624XGPP' => 'FGS624XGP-POE', + 'snFGS624XGPP' => 'FGS624XGP-POE', + 'snFGS648P' => 'FastIron GS Switch(FGS) 48-port 10/100/1000 POE Ready', + 'snFGS648PSwitch' => 'FGS648P', + 'snFGS648PRouter' => 'FGS648P', + 'snFGS648PP' => 'FastIron GS Switch(FGS) 48-port 10/100/1000 POE ', + 'snFGS648PP' => 'snFGS648P-POE', + 'snFGS648PP' => 'snFGS648P-POE', + 'snFLS624' => 'FastIron LS Switch(FLS) 24-port 10/100/1000 ', + 'snFLS624Switch' => 'FLS624', + 'snFLS624Router' => 'FLS624', + 'snFLS648' => 'FastIron LS Switch(FLS) 48-port 10/100/1000', + 'snFLS648Switch' => 'FLS648', + 'snFLS648Router' => 'FLS648', + 'snSI100' => 'ServerIron 100 series', + 'snSI100Switch' => 'SI100', + 'snSI100Router' => 'SI100', + 'snSI350' => 'ServerIron 350 series', + 'snSI350Switch' => 'SI350', + 'snSI350Router' => 'SI350', + 'snSI450' => 'ServerIron 450 series', + 'snSI450Switch' => 'SI450', + 'snSI450Router' => 'SI450', + 'snSI850' => 'ServerIron 850 series', + 'snSI850Switch' => 'SI850', + 'snSI850Router' => 'SI850', + 'snSI350Plus' => 'ServerIron 350 Plus series', + 'snSI350PlusSwitch' => 'SI350 Plus', + 'snSI350PlusRouter' => 'SI350 Plus', + 'snSI450Plus' => 'ServerIron 450 Plus series', + 'snSI450PlusSwitch' => 'SI450 Plus', + 'snSI450PlusRouter' => 'SI450 Plus', + 'snSI850Plus' => 'ServerIron 850 Plus series', + 'snSI850PlusSwitch' => 'SI850 Plus', + 'snSI850PlusRouter' => 'SI850 Plus', + 'snServerIronGTc' => 'ServerIronGT C series', + 'snServerIronGTcSwitch' => 'ServerIronGT C', + 'snServerIronGTcRouter' => 'ServerIronGT C', + 'snServerIronGTe' => 'ServerIronGT E series', + 'snServerIronGTeSwitch' => 'ServerIronGT E', + 'snServerIronGTeRouter' => 'ServerIronGT E', + 'snServerIronGTePlus' => 'ServerIronGT E Plus series', + 'snServerIronGTePlusSwitch' => 'ServerIronGT E Plus', + 'snServerIronGTePlusRouter' => 'ServerIronGT E Plus', + 'snServerIron4G' => 'ServerIron4G series', + 'snServerIron4GSwitch' => 'ServerIron4G', + 'snServerIron4GRouter' => 'ServerIron4G', + 'wirelessAp' => 'wireless access point', + 'wirelessProbe' => 'wireless probe', + 'ironPointMobility' => 'IronPoint Mobility Series', + 'ironPointMC' => 'IronPoint Mobility Controller', + 'dcrs7504Switch' => 'DCRS-7504', + 'dcrs7504Router' => 'DCRS-7504', + 'dcrs7508Switch' => 'DCRS-7508', + 'dcrs7508Router' => 'DCRS-7508', + 'dcrs7515Switch' => 'DCRS-7515', + 'dcrs7515Router' => 'DCRS-7515', +); + $rewrite_ios_features = array( "PK9S" => "IP w/SSH LAN Only", "LANBASEK9" => "Lan Base Crypto", @@ -217,6 +649,13 @@ function rewrite_ios_features ($features) return ($features); } +function rewrite_ironware_hardware ($hardware) +{ + global $rewrite_ironware_hardware; + $hardware = array_str_replace($rewrite_ironware_hardware, $hardware); + return ($hardware); +} + function fixiftype ($type) { diff --git a/includes/static-config.php b/includes/static-config.php index 153111508..963d4135c 100644 --- a/includes/static-config.php +++ b/includes/static-config.php @@ -41,6 +41,7 @@ $os_text['catos'] = "Cisco CatOS"; $os_text['nxos'] = "Cisco NX-OS"; $os_text['asa'] = "Cisco ASA"; $os_text['pix'] = "Cisco PIX"; +$os_text['ironware'] = "Brocade IronWare"; $os_text['freebsd'] = "FreeBSD"; $os_text['openbsd'] = "OpenBSD"; $os_text['netbsd'] = "NetBSD";