Uploaded image for project: 'Observium'
  1. Observium
  2. OBS-2283

ZTE version and hardware detection - ZTE PON and switch

    XMLWordPrintable

Details

    • Add New Device / OS
    • Resolution: Fixed
    • Trivial
    • None
    • Professional Edition
    • Poller

    Description

      Index: includes/polling/os/zte.inc.php
      ===================================================================
      --- includes/polling/os/zte.inc.php    (revision 8529)
      +++ includes/polling/os/zte.inc.php    (working copy)
      @@ -65,12 +65,13 @@
         $version  = $matches['version'];
         $hardware = $matches['hardware'];
       }
      -else if (preg_match('/Ethernet Switch(?: \w+)? (?<hardware>[\w\-]+)(?:\/(?<hw2>[\w\-]+))?, Version: V(?<version>\d[\w\.]+)/', $poll_device['sysDescr'], $matches))
      +else if (preg_match('/Ethernet Switch(?: +\w+)? (?<hardware>[\w\-]+)(?:\/(?<hw2>[\w\-]+))?, Version: V(?<version>\d[\w\.]+)/', $poll_device['sysDescr'], $matches))
       {
         // ZTE Ethernet Switch ZXR10 2826S/2826S-LE, Version: V1.1.12.S
         // ZTE Ethernet Switch ZXR10 2826S-EI, Version: V1.1.20.f
         // ZTE Ethernet Switch ZXR10 2928E, Version: V2.05.10B18
         // ZTE Ethernet Switch 2850-26TM, Version: V1.1.12.U
      +  // ZTE Ethernet Switch  ZXR10 2928E, Version: V2.05.10B18
       
         $version  = $matches['version'];
         $hardware = $matches['hardware'];
      @@ -108,5 +109,11 @@
         //$version  = $matches['version'];
         $hardware = $matches['hardware'];
       }
      +else if (preg_match('/^(?<hardware>C[\d]+) Version V(?<version>\d[\w\.]+)/', $poll_device['sysDescr'], $matches))
      +{
      +  // C320 Version V2.1.0 Software, Copyright (c) by ZTE Corporation Compiled
      +  $version  = $matches['version'];
      +  $hardware = $matches['hardware'];
      +}
       
       // EOF

      In my example of ZTE Ethernet Switch ZXR10 2928E there is two spaces after "Switch ".
      Need change in regexp.

      Also add hardware and version polling for ZTE ZXA C320.

      Attachments

        Issue Links

          Activity

            People

              landy Mike Stupalov
              mtivi Martyushev Tim
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: