瀏覽代碼

Update Bundle name

Maximiliano Schvindt 7 年之前
父節點
當前提交
4d3d088fd7
共有 4 個文件被更改,包括 20 次插入16 次删除
  1. 6 2
      Command/HuaweiOnuScanCommand.php
  2. 3 3
      SNMP/MIB.php
  3. 2 2
      SNMP/MIBS/OIDSHuaweiV1.php
  4. 9 9
      SNMP/SNMP.php

+ 6 - 2
Command/HuaweiOnuScanCommand.php

@@ -58,11 +58,15 @@ class HuaweiOnuScanCommand extends BaseCommand
         //$dataCached = $this->getData($key_olt_scan, true);
         //$dataCached = $this->getData($key_olt_scan, true);
         $dataCached = array();
         $dataCached = array();
 
 
-        $slots = $SNMP->$library()->onuSlot();
+        /* $slots = $SNMP->$library()->onuSlot();
         $pons = $SNMP->$library()->onuPon();
         $pons = $SNMP->$library()->onuPon();
-        $onus = $SNMP->$library()->onuOnuid();
+        $onus = $SNMP->$library()->onuOnuid(); */
         $serialNumbers = $SNMP->$library()->onuSerialNumber();
         $serialNumbers = $SNMP->$library()->onuSerialNumber();
 
 
+        print_r($serialNumbers);
+
+        die;
+
         $countOnus = 0;
         $countOnus = 0;
         foreach($onus as $index => $onuId) {
         foreach($onus as $index => $onuId) {
             $countOnus++;
             $countOnus++;

+ 3 - 3
SNMP/MIB.php

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

+ 2 - 2
SNMP/MIBS/OIDSHuaweiV1.php

@@ -12,7 +12,7 @@ class OIDSHuaweiV1 extends \HuaweiBundle\SNMP\MIB {
     const OID_authOnuListSlot               = "1.3.6.1.4.1.5875.800.3.10.1.1.2";
     const OID_authOnuListSlot               = "1.3.6.1.4.1.5875.800.3.10.1.1.2";
     const OID_authOnuListPon                = "1.3.6.1.4.1.5875.800.3.10.1.1.3";
     const OID_authOnuListPon                = "1.3.6.1.4.1.5875.800.3.10.1.1.3";
     const OID_authOnuListOnuid              = "1.3.6.1.4.1.5875.800.3.10.1.1.4";
     const OID_authOnuListOnuid              = "1.3.6.1.4.1.5875.800.3.10.1.1.4";
-    const OID_authOnuListMac                = "1.3.6.1.4.1.5875.800.3.10.1.1.10";
+    const OID_authOnuListMac                = "1.3.6.1.4.1.2011.6.128.1.1.2.43.1.3";
     const OID_onuPonRxOpticalPower                = "1.3.6.1.4.1.5875.800.3.9.3.3.1.6";
     const OID_onuPonRxOpticalPower                = "1.3.6.1.4.1.5875.800.3.9.3.3.1.6";
     const OID_onuPonTxOpticalPower                = "1.3.6.1.4.1.5875.800.3.9.3.3.1.7";
     const OID_onuPonTxOpticalPower                = "1.3.6.1.4.1.5875.800.3.9.3.3.1.7";
     const OID_onuPonOpticalVltage                 = "1.3.6.1.4.1.5875.800.3.9.3.3.1.8";
     const OID_onuPonOpticalVltage                 = "1.3.6.1.4.1.5875.800.3.9.3.3.1.8";
@@ -62,7 +62,7 @@ class OIDSHuaweiV1 extends \HuaweiBundle\SNMP\MIB {
 
 
     public function onuSerialNumber($index = null) {
     public function onuSerialNumber($index = null) {
         if(is_null($index)) {
         if(is_null($index)) {
-            return $this->getSNMP()->lastOidWalk(self::OID_authOnuListMac,14);
+            return $this->getSNMP()->lastOidWalk(self::OID_authOnuListMac,16);
         } 
         } 
         
         
         $values = $this->getSNMP()->lastOidWalk(self::OID_authOnuListMac,14);
         $values = $this->getSNMP()->lastOidWalk(self::OID_authOnuListMac,14);

+ 9 - 9
SNMP/SNMP.php

@@ -96,7 +96,7 @@ class SNMP
      *
      *
      * @param string $host The target host for SNMP queries.
      * @param string $host The target host for SNMP queries.
      * @param string $community The community to use for SNMP queries.
      * @param string $community The community to use for SNMP queries.
-     * @return FiberhomeBundle\SNMP\SNMP An instance of $this (for fluent interfaces)
+     * @return HuaweiBundle\SNMP\SNMP An instance of $this (for fluent interfaces)
      */
      */
     public function __construct( $host = '127.0.0.1', $community = 'public' )
     public function __construct( $host = '127.0.0.1', $community = 'public' )
     {
     {
@@ -407,7 +407,7 @@ class SNMP
      * Should be one of the class OID_OUTPUT_* constants
      * Should be one of the class OID_OUTPUT_* constants
      *
      *
      * @param int $f The fomat to use
      * @param int $f The fomat to use
-     * @return FiberhomeBundle\SNMP\SNMP An instance of $this (for fluent interfaces)
+     * @return HuaweiBundle\SNMP\SNMP An instance of $this (for fluent interfaces)
      */
      */
     public function setOidOutputFormat( $f )
     public function setOidOutputFormat( $f )
     {
     {
@@ -420,7 +420,7 @@ class SNMP
      * Sets the target host for SNMP queries.
      * Sets the target host for SNMP queries.
      *
      *
      * @param string $h The target host for SNMP queries.
      * @param string $h The target host for SNMP queries.
-     * @return FiberhomeBundle\SNMP\SNMP An instance of $this (for fluent interfaces)
+     * @return HuaweiBundle\SNMP\SNMP An instance of $this (for fluent interfaces)
      */
      */
     public function setHost( $h )
     public function setHost( $h )
     {
     {
@@ -448,7 +448,7 @@ class SNMP
      * Sets the community string to use for SNMP queries.
      * Sets the community string to use for SNMP queries.
      *
      *
      * @param string $c The community to use for SNMP queries.
      * @param string $c The community to use for SNMP queries.
-     * @return FiberhomeBundle\SNMP\SNMP An instance of $this (for fluent interfaces)
+     * @return HuaweiBundle\SNMP\SNMP An instance of $this (for fluent interfaces)
      */
      */
     public function setCommunity( $c )
     public function setCommunity( $c )
     {
     {
@@ -470,7 +470,7 @@ class SNMP
      * Sets the timeout to use for SNMP queries (microseconds).
      * Sets the timeout to use for SNMP queries (microseconds).
      *
      *
      * @param int $t The timeout to use for SNMP queries (microseconds).
      * @param int $t The timeout to use for SNMP queries (microseconds).
-     * @return FiberhomeBundle\SNMP\SNMP An instance of $this (for fluent interfaces)
+     * @return HuaweiBundle\SNMP\SNMP An instance of $this (for fluent interfaces)
      */
      */
     public function setTimeout( $t )
     public function setTimeout( $t )
     {
     {
@@ -492,7 +492,7 @@ class SNMP
      * Sets the SNMP query retry count.
      * Sets the SNMP query retry count.
      *
      *
      * @param int $r The SNMP query retry count
      * @param int $r The SNMP query retry count
-     * @return FiberhomeBundle\SNMP\SNMP An instance of $this (for fluent interfaces)
+     * @return HuaweiBundle\SNMP\SNMP An instance of $this (for fluent interfaces)
      */
      */
     public function setRetry( $r )
     public function setRetry( $r )
     {
     {
@@ -568,7 +568,7 @@ class SNMP
      * Set the cache to use
      * Set the cache to use
      *
      *
      * @param \OSS_SNMP\Cache $c The cache to use
      * @param \OSS_SNMP\Cache $c The cache to use
-     * @return FiberhomeBundle\SNMP\SNMP For fluent interfaces
+     * @return HuaweiBundle\SNMP\SNMP For fluent interfaces
      */
      */
     public function setCache( $c )
     public function setCache( $c )
     {
     {
@@ -622,11 +622,11 @@ class SNMP
      *
      *
      * @param string $mib The extension class to use
      * @param string $mib The extension class to use
      * @param array $args
      * @param array $args
-     * @return FiberhomeBundle\MIBS
+     * @return HuaweiBundle\MIBS
      */
      */
     public function useExtension( $mib, $args )
     public function useExtension( $mib, $args )
     {
     {
-        $mib = 'FiberhomeBundle\\SNMP\\MIBS\\' . str_replace( '_', '\\', $mib );
+        $mib = 'HuaweiBundle\\SNMP\\MIBS\\' . str_replace( '_', '\\', $mib );
         $m = new $mib();
         $m = new $mib();
         $m->setSNMP( $this );
         $m->setSNMP( $this );
         return $m;
         return $m;