r1452 + bugfix: SNMP didn't work properly for C4948 ports
authorDenis Ovsienko <infrastation@yandex.ru>
Fri, 28 Dec 2007 17:53:42 +0000 (17:53 +0000)
committerDenis Ovsienko <infrastation@yandex.ru>
Fri, 28 Dec 2007 17:53:42 +0000 (17:53 +0000)
ChangeLog
inc/interface.php

index b1e67d9..d483a9e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 0.14.9
        bugfix: upgrade to 0.14.8 broke IPv4 prefix creation
        bugfix: more DB cleanups
+       bugfix: SNMP didn't work properly for C4948 ports
 0.14.8 2007-12-22
        bugfix: adjusted hardcoded values in VLAN trigger
        bugfix: adjusted HW, SW and port types in SNMP data collector
index 2b5e2c1..dfb68f6 100644 (file)
@@ -3429,12 +3429,22 @@ function renderSNMPPortFinder ($object_id = 0)
                                break;
                        case '616': // WS-C3560G-48PS
                        case '617': // WS-C3560G-48TS
+                               for ($i = 1; $i <= 48; $i++)
+                               {
+                                       $label = "${i}X";
+                                       $error = commitAddPort ($object_id, 'gi0/' . $i, 24, $label, $ifList2["GigabitEthernet0/${i}"]['phyad']);
+                                       if ($error == '')
+                                               $newports++;
+                                       else
+                                               $log[] = array ('code' => 'error', 'message' => 'Failed to add port ' . $label . ': ' . $error);
+                               }
+                               break;
                        case '626': // WS-C4948
                        case '659': // WS-C4948-10GE
                                for ($i = 1; $i <= 48; $i++)
                                {
                                        $label = "${i}X";
-                                       $error = commitAddPort ($object_id, 'gi0/' . $i, 24, $label, $ifList2["GigabitEthernet0/${i}"]['phyad']);
+                                       $error = commitAddPort ($object_id, 'gi1/' . $i, 24, $label, $ifList2["GigabitEthernet1/${i}"]['phyad']);
                                        if ($error == '')
                                                $newports++;
                                        else