r4370 proper handling of link statuses in NX-OS gateway for Nexus 7000/NX-OS 5.
authorAlexey Andriyanov <alan@al-an.info>
Fri, 18 Mar 2011 17:38:55 +0000 (17:38 +0000)
committerAlexey Andriyanov <alan@al-an.info>
Fri, 18 Mar 2011 17:38:55 +0000 (17:38 +0000)
ciscoReadInterfaceStatus: notconnected and sfpAbsent handlers added

wwwroot/inc/deviceconfig.php

index 314fd8f..033951e 100644 (file)
@@ -1501,7 +1501,7 @@ function ciscoReadInterfaceStatus ($text)
                                list ($status_raw, $vlan, $duplex, $speed) = $field_list;
                                if ($status_raw == 'connected' || $status_raw == 'up')
                                        $status = 'up';
-                               elseif ($status_raw == 'notconnect' || $status_raw == 'down')
+                               elseif (0 === strpos ($status_raw, 'notconn') || $status_raw == 'down' || $status_raw == 'sfpAbsent')
                                        $status = 'down';
                                else
                                        $status = 'disabled';