update: ability to delete a file entity from the Edit tab of the File page
update: 802.1q: links to switchports allowing the vlan added in page Vlan info
update: new object types: power supply chassis, power supply (#409)
+ new feature: Cisco NX-OS v4, v5 LLDP gateway
0.19.1 2011-02-22
update: UI: rack lists are now reduced by common tags with object on Rackspace tab (FILTER_RACKLIST_BY_TAGS config var)
update: 802.1q: If switch has IP interface in some VLAN linked to IP subnet, this VLAN is not pruned from switch's uplink
print WORKFILE @r, "\n\n";;
exit(0);
}
+if ($command eq "getlldpstatus") {
+ open(WORKFILE, ">$workfile") || die "$workfile: $!";
+ $session->cmd ('terminal length 0');
+ $session->cmd ('terminal no monitor');
+ my @r = $session->cmd ('show lldp neighbors detail');
+ print WORKFILE @r, "\n\n";;
+ exit(0);
+}
if ($command eq "deploy") {
open(WORKFILE, "<$workfile") || die "$workfile: $!";
while (<WORKFILE>) {
return $ret;
}
+function nxos4ReadLLDPStatus ($input)
+{
+ $ret = array();
+ $current = array();
+ $if_name = NULL;
+ foreach (explode ("\n", $input) as $line)
+ {
+ $line = trim ($line);
+ if ($line == '')
+ {
+ if (isset ($if_name) and isset ($current['port']) and isset ($current['device']))
+ $ret[$if_name][] = $current;
+ $current = array();
+ $if_name = NULL;
+ }
+ else
+ {
+ $pair = explode (': ', $line);
+ if (count ($pair) == 2 and isset ($pair[1]))
+ {
+ list ($key, $value) = $pair;
+ $value = trim ($value, "\x06\x10\x13");
+ switch ($key)
+ {
+ case 'Port id':
+ $current['port'] = ios12ShortenIfName ($value);
+ break;
+ case 'System Name':
+ $current['device'] = $value;
+ break;
+ case 'Local Port id':
+ $if_name = ios12ShortenIfName ($value);
+ break;
+ }
+ }
+ }
+ }
+ return $ret;
+}
+
function vrp53ReadHNDPStatus ($input)
{
$ret = array();
1407 => array ('chapter_id' => 35, 'dict_value' => 'D-Link%GPASS%DPS-500'),
1408 => array ('chapter_id' => 35, 'dict_value' => 'D-Link%GPASS%DPS-510'),
1409 => array ('chapter_id' => 35, 'dict_value' => 'D-Link%GPASS%DPS-600'),
+ 1410 => array ('chapter_id' => 14, 'dict_value' => 'Cisco NX-OS 5.0'),
+ 1411 => array ('chapter_id' => 14, 'dict_value' => 'Cisco NX-OS 5.1'),
// ^
// ^
// add new dictionary entries up here ^
1557 => array ('chapter_id' => 32, 'dict_value' => 'VMware%GPASS%Distributed vSwitch'),
1558 => array ('chapter_id' => 32, 'dict_value' => 'Cisco%GPASS%Nexus 1000V'),
1559 => array ('chapter_id' => 33, 'dict_value' => 'NS-OS 4.0'),
-// NOTICE: do not add new dictionary entries here, add them to the gap above (~1395)!
+// NOTICE: do not add new dictionary entries here, add them to the gap above (~1411)!
);
?>