Details
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
- relates to
-
OBS-2261 Support for version and hardware detection on ZTE STACK
- Closed