Barry O'Donovan преди 13 години
родител
ревизия
435fe0bbbc
променени са 4 файла, в които са добавени 20 реда и са изтрити 20 реда
  1. 2 2
      OSS_SNMP/Cache.php
  2. 3 3
      OSS_SNMP/MIB.php
  3. 2 2
      OSS_SNMP/MIBS/Cisco.php
  4. 13 13
      OSS_SNMP/MIBS/Cisco/CDP.php

+ 2 - 2
OSS_SNMP/Cache.php

@@ -39,9 +39,9 @@ namespace OSS_SNMP;
 /**
  * An abstract cache for storing results of SNMP queries .
  *
- * See the implementation in \OSS\Cache\Basic for proper examples and documentation.
+ * See the implementation in \OSS_SNMP\Cache\Basic for proper examples and documentation.
  *
- * @see \OSS\Cache\Basic
+ * @see \OSS_SNMP\Cache\Basic
  * @copyright Copyright (c) 2012, Open Source Solutions Limited, Dublin, Ireland
  * @author Barry O'Donovan <barry@opensolutions.ie>
  */

+ 3 - 3
OSS_SNMP/MIB.php

@@ -52,8 +52,8 @@ class MIB
     /**
      * Set the SNMP instance
      *
-     * @param \OSS\SNMP $snmp the SNMP instance
-     * @return \OSS\SNMP\MIB An instance of this class for fluent interfaces
+     * @param \OSS_SNMP\SNMP $snmp the SNMP instance
+     * @return \OSS_SNMP\MIB An instance of this class for fluent interfaces
      */
     public function setSNMP( $snmp )
     {
@@ -63,7 +63,7 @@ class MIB
     /**
      * Get the SNMP instance
      *
-     * @return \OSS\SNMP Instance of the SNMP object
+     * @return \OSS_SNMP\SNMP Instance of the SNMP object
      */
     public function getSNMP()
     {

+ 2 - 2
OSS_SNMP/MIBS/Cisco.php

@@ -33,7 +33,7 @@
     SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
-namespace OSS\SNMP\MIBS;
+namespace OSS_SNMP\MIBS;
 
 /**
  * A class for performing SNMP V2 queries on Cisco devices
@@ -41,7 +41,7 @@ namespace OSS\SNMP\MIBS;
  * @copyright Copyright (c) 2012, Open Source Solutions Limited, Dublin, Ireland
  * @author Barry O'Donovan <barry@opensolutions.ie>
  */
-class Cisco extends \OSS\SNMP\MIB
+class Cisco extends \OSS_SNMP\MIB
 {
 
 

+ 13 - 13
OSS_SNMP/MIBS/Cisco/CDP.php

@@ -33,7 +33,7 @@
     SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
-namespace OSS\SNMP\MIBS\Cisco;
+namespace OSS_SNMP\MIBS\Cisco;
 
 /**
  * A class for performing SNMP V2 queries on Cisco devices
@@ -41,7 +41,7 @@ namespace OSS\SNMP\MIBS\Cisco;
  * @copyright Copyright (c) 2012, Open Source Solutions Limited, Dublin, Ireland
  * @author Barry O'Donovan <barry@opensolutions.ie>
  */
-class CDP extends \OSS\SNMP\MIBS\Cisco
+class CDP extends \OSS_SNMP\MIBS\Cisco
 {
 
     const OID_CDP_INTERFACE_ENABLED               = '.1.3.6.1.4.1.9.9.23.1.1.1.1.2';
@@ -137,7 +137,7 @@ class CDP extends \OSS\SNMP\MIBS\Cisco
      * Applies the TruthValue post processor to turn
      * SNMP values into true / false.
      *
-     * @see OSS\SNMP::ppTruthValue()
+     * @see OSS_SNMP\SNMP::ppTruthValue()
      *
      * @return array The device's interfaces CDP enabled status' (as boolean true / false)
      */
@@ -162,14 +162,14 @@ class CDP extends \OSS\SNMP\MIBS\Cisco
 
     /**
      * Constant for possible value of CDP neighbour address type
-     * @see OSS\SNMP\MIBS\Cisco\CDP::neighbourAddressTypes()
+     * @see OSS_SNMP\MIBS\Cisco\CDP::neighbourAddressTypes()
      */
     const CDP_CACHE_NEIGHBOUR_ADDRESS_TYPE_IP = 1;
 
     /**
      * Text representation of CDP neighbour address type
      *
-     * @see OSS\SNMP\MIBS\Cisco\CDP::neighbourAddressTypes()
+     * @see OSS_SNMP\SNMP\MIBS\Cisco\CDP::neighbourAddressTypes()
      * @var array Text representation of CDP neighbour address type
      */
     public static $CDP_CACHE_NEIGHBOUR_ADDRESS_TYPES = array(
@@ -274,7 +274,7 @@ class CDP extends \OSS\SNMP\MIBS\Cisco
      * > indicates no Port-ID field (TLV) was reported in the
      * > most recent CDP message.
      *
-     * @see \OSS\SNMP\MIBS\Cisco\CDP::neighbourId()
+     * @see \OSS_SNMP\SNMP\MIBS\Cisco\CDP::neighbourId()
      * @return array The device's CDP neighbours connected port *description* indexed by the current device's port ID
      */
     public function neighbourPort()
@@ -386,7 +386,7 @@ class CDP extends \OSS\SNMP\MIBS\Cisco
      *
      * Example:
      *
-     *     if( $host->useCisco_CDP()->neighbourHasCapability( $portId, \OSS\SNMP\MIBS\Cisco\CDP::CDP_CACHE_NEIGHBOUR_CAPABILITY_SWITCH )
+     *     if( $host->useCisco_CDP()->neighbourHasCapability( $portId, \OSS_SNMP\SNMP\MIBS\Cisco\CDP::CDP_CACHE_NEIGHBOUR_CAPABILITY_SWITCH )
      *          echo "Host is a switch!!";
      *
      * @param int $portId The CDP neighbour by connected local port ID
@@ -599,7 +599,7 @@ class CDP extends \OSS\SNMP\MIBS\Cisco
      *         }
      *
      * @see neighbourId()
-     * @see \OSS\SNMP\MIBS\Interface::descriptions()
+     * @see \OSS_SNMP\SNMP\MIBS\Interface::descriptions()
      * @see neighbourPort()
      * @param boolean $inverse If true, all remoteXXX params will be discovered (only remotePort is returned otherwise)
      * @param array $skipHostIds If using $inverse, pass an array of CDP IDs of neighbours that should not be 'inverse' discovered.
@@ -637,7 +637,7 @@ class CDP extends \OSS\SNMP\MIBS\Cisco
                     $neighbours[ $neighbourCdpId ][$count]['isLAG']     = false;
                 }
             }
-            catch( \OSS\Exception $e )
+            catch( \OSS_SNMP\Exception $e )
             {
                 $neighbours[ $neighbourCdpId ][$count]['isLAG']     = false;
             }
@@ -651,7 +651,7 @@ class CDP extends \OSS\SNMP\MIBS\Cisco
                     try
                     {
                         if( !isset( $remotes[ $neighbourCdpId ] ) )
-                            $remotes[ $neighbourCdpId ] = new \OSS\SNMP( $neighbourCdpId, $this->getSNMP()->getCommunity() );
+                            $remotes[ $neighbourCdpId ] = new \OSS_SNMP\SNMP( $neighbourCdpId, $this->getSNMP()->getCommunity() );
 
                         $remote = $remotes[ $neighbourCdpId ];
                         $rneighbours = $remote->useCisco_CDP()->neighbours( false );
@@ -677,7 +677,7 @@ class CDP extends \OSS\SNMP\MIBS\Cisco
                             }
                         }
                     }
-                    catch( \OSS\Exception $e )
+                    catch( \OSS_SNMP\Exception $e )
                     {
                     }
                 }
@@ -720,7 +720,7 @@ class CDP extends \OSS\SNMP\MIBS\Cisco
 
             if( !isset( $devices[ $feNeighbour ] ) )
             {
-                $snmp = new \OSS\SNMP( $feNeighbour, $this->getSNMP()->getCommunity() );
+                $snmp = new \OSS_SNMP\SNMP( $feNeighbour, $this->getSNMP()->getCommunity() );
 
                 try
                 {
@@ -728,7 +728,7 @@ class CDP extends \OSS\SNMP\MIBS\Cisco
                     unset( $snmp );
                     $this->crawl( $devices, $feNeighbour, $ignore );
                 }
-                catch( \OSS\Exception $e )
+                catch( \OSS_SNMP\Exception $e )
                 {
                     // this device did not respond / have CDP enabled / CDP available - skip
                     unset( $devices[$feNeighbour] );