Skip to content

Commit

Permalink
More fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
murrant committed Jul 9, 2024
1 parent 86d4ddf commit 109b996
Show file tree
Hide file tree
Showing 6 changed files with 367 additions and 329 deletions.
2 changes: 1 addition & 1 deletion LibreNMS/OS/EltexMes23xx.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class EltexMes23xx extends OS
/**
* Specific HexToString for Eltex
*/
public function normData(string $par = ''): string
public static function normData(string $par = ''): string
{
$tmp = str_replace([':', ' '], '', trim(strtoupper($par)));
$ret = preg_match('/^[0-9A-F]+$/', $tmp) ? hex2str($tmp) : $par; //if string is pure hex, convert to ascii
Expand Down
100 changes: 50 additions & 50 deletions tests/data/dlink_dgs-3627g.json
Original file line number Diff line number Diff line change
Expand Up @@ -5537,8 +5537,8 @@
"ifName": "1/15",
"portName": null,
"ifIndex": 15,
"ifSpeed": 0,
"ifSpeed_prev": null,
"ifSpeed": null,
"ifSpeed_prev": 0,
"ifConnectorPresent": "true",
"ifOperStatus": "down",
"ifOperStatus_prev": "down",
Expand Down Expand Up @@ -5637,8 +5637,8 @@
"ifName": "1/16",
"portName": null,
"ifIndex": 16,
"ifSpeed": 0,
"ifSpeed_prev": null,
"ifSpeed": null,
"ifSpeed_prev": 0,
"ifConnectorPresent": "true",
"ifOperStatus": "down",
"ifOperStatus_prev": "down",
Expand Down Expand Up @@ -5937,8 +5937,8 @@
"ifName": "1/19",
"portName": null,
"ifIndex": 19,
"ifSpeed": 0,
"ifSpeed_prev": null,
"ifSpeed": null,
"ifSpeed_prev": 0,
"ifConnectorPresent": "true",
"ifOperStatus": "down",
"ifOperStatus_prev": "down",
Expand Down Expand Up @@ -6037,8 +6037,8 @@
"ifName": "1/20",
"portName": null,
"ifIndex": 20,
"ifSpeed": 0,
"ifSpeed_prev": null,
"ifSpeed": null,
"ifSpeed_prev": 0,
"ifConnectorPresent": "true",
"ifOperStatus": "down",
"ifOperStatus_prev": "down",
Expand Down Expand Up @@ -6137,8 +6137,8 @@
"ifName": "1/21",
"portName": null,
"ifIndex": 21,
"ifSpeed": 0,
"ifSpeed_prev": null,
"ifSpeed": null,
"ifSpeed_prev": 0,
"ifConnectorPresent": "true",
"ifOperStatus": "down",
"ifOperStatus_prev": "down",
Expand Down Expand Up @@ -6237,8 +6237,8 @@
"ifName": "1/22",
"portName": null,
"ifIndex": 22,
"ifSpeed": 0,
"ifSpeed_prev": null,
"ifSpeed": null,
"ifSpeed_prev": 0,
"ifConnectorPresent": "true",
"ifOperStatus": "down",
"ifOperStatus_prev": "down",
Expand Down Expand Up @@ -6337,8 +6337,8 @@
"ifName": "1/23",
"portName": null,
"ifIndex": 23,
"ifSpeed": 0,
"ifSpeed_prev": null,
"ifSpeed": null,
"ifSpeed_prev": 0,
"ifConnectorPresent": "true",
"ifOperStatus": "down",
"ifOperStatus_prev": "down",
Expand Down Expand Up @@ -6437,8 +6437,8 @@
"ifName": "1/24",
"portName": null,
"ifIndex": 24,
"ifSpeed": 0,
"ifSpeed_prev": null,
"ifSpeed": null,
"ifSpeed_prev": 0,
"ifConnectorPresent": "true",
"ifOperStatus": "down",
"ifOperStatus_prev": "down",
Expand Down Expand Up @@ -6637,8 +6637,8 @@
"ifName": "1/26",
"portName": null,
"ifIndex": 26,
"ifSpeed": 0,
"ifSpeed_prev": null,
"ifSpeed": null,
"ifSpeed_prev": 0,
"ifConnectorPresent": "true",
"ifOperStatus": "down",
"ifOperStatus_prev": "down",
Expand Down Expand Up @@ -6737,8 +6737,8 @@
"ifName": "1/27",
"portName": null,
"ifIndex": 27,
"ifSpeed": 0,
"ifSpeed_prev": null,
"ifSpeed": null,
"ifSpeed_prev": 0,
"ifConnectorPresent": "true",
"ifOperStatus": "down",
"ifOperStatus_prev": "down",
Expand Down Expand Up @@ -6837,8 +6837,8 @@
"ifName": "802.1Q Encapsulation Tag 0001",
"portName": null,
"ifIndex": 1024,
"ifSpeed": 0,
"ifSpeed_prev": null,
"ifSpeed": null,
"ifSpeed_prev": 0,
"ifConnectorPresent": "true",
"ifOperStatus": "up",
"ifOperStatus_prev": "up",
Expand Down Expand Up @@ -6937,8 +6937,8 @@
"ifName": "802.1Q Encapsulation Tag 1002",
"portName": null,
"ifIndex": 2025,
"ifSpeed": 0,
"ifSpeed_prev": null,
"ifSpeed": null,
"ifSpeed_prev": 0,
"ifConnectorPresent": "true",
"ifOperStatus": "up",
"ifOperStatus_prev": "up",
Expand Down Expand Up @@ -7037,8 +7037,8 @@
"ifName": "802.1Q Encapsulation Tag 2002",
"portName": null,
"ifIndex": 3025,
"ifSpeed": 0,
"ifSpeed_prev": null,
"ifSpeed": null,
"ifSpeed_prev": 0,
"ifConnectorPresent": "true",
"ifOperStatus": "up",
"ifOperStatus_prev": "up",
Expand Down Expand Up @@ -7137,8 +7137,8 @@
"ifName": "802.1Q Encapsulation Tag 3040",
"portName": null,
"ifIndex": 4063,
"ifSpeed": 0,
"ifSpeed_prev": null,
"ifSpeed": null,
"ifSpeed_prev": 0,
"ifConnectorPresent": "true",
"ifOperStatus": "up",
"ifOperStatus_prev": "up",
Expand Down Expand Up @@ -7237,8 +7237,8 @@
"ifName": "802.1Q Encapsulation Tag 3971",
"portName": null,
"ifIndex": 4994,
"ifSpeed": 0,
"ifSpeed_prev": null,
"ifSpeed": null,
"ifSpeed_prev": 0,
"ifConnectorPresent": "true",
"ifOperStatus": "up",
"ifOperStatus_prev": "up",
Expand Down Expand Up @@ -7337,8 +7337,8 @@
"ifName": "802.1Q Encapsulation Tag 3972",
"portName": null,
"ifIndex": 4995,
"ifSpeed": 0,
"ifSpeed_prev": null,
"ifSpeed": null,
"ifSpeed_prev": 0,
"ifConnectorPresent": "true",
"ifOperStatus": "up",
"ifOperStatus_prev": "up",
Expand Down Expand Up @@ -7437,8 +7437,8 @@
"ifName": "802.1Q Encapsulation Tag 4002",
"portName": null,
"ifIndex": 5025,
"ifSpeed": 0,
"ifSpeed_prev": null,
"ifSpeed": null,
"ifSpeed_prev": 0,
"ifConnectorPresent": "true",
"ifOperStatus": "up",
"ifOperStatus_prev": "up",
Expand Down Expand Up @@ -7537,8 +7537,8 @@
"ifName": "802.1Q Encapsulation Tag 4003",
"portName": null,
"ifIndex": 5026,
"ifSpeed": 0,
"ifSpeed_prev": null,
"ifSpeed": null,
"ifSpeed_prev": 0,
"ifConnectorPresent": "true",
"ifOperStatus": "up",
"ifOperStatus_prev": "up",
Expand Down Expand Up @@ -7637,8 +7637,8 @@
"ifName": "System",
"portName": null,
"ifIndex": 5121,
"ifSpeed": 0,
"ifSpeed_prev": null,
"ifSpeed": null,
"ifSpeed_prev": 0,
"ifConnectorPresent": "true",
"ifOperStatus": "up",
"ifOperStatus_prev": "up",
Expand Down Expand Up @@ -7737,8 +7737,8 @@
"ifName": "1002",
"portName": null,
"ifIndex": 5122,
"ifSpeed": 0,
"ifSpeed_prev": null,
"ifSpeed": null,
"ifSpeed_prev": 0,
"ifConnectorPresent": "true",
"ifOperStatus": "up",
"ifOperStatus_prev": "up",
Expand Down Expand Up @@ -7837,8 +7837,8 @@
"ifName": "2002",
"portName": null,
"ifIndex": 5123,
"ifSpeed": 0,
"ifSpeed_prev": null,
"ifSpeed": null,
"ifSpeed_prev": 0,
"ifConnectorPresent": "true",
"ifOperStatus": "up",
"ifOperStatus_prev": "up",
Expand Down Expand Up @@ -7937,8 +7937,8 @@
"ifName": "4002",
"portName": null,
"ifIndex": 5124,
"ifSpeed": 0,
"ifSpeed_prev": null,
"ifSpeed": null,
"ifSpeed_prev": 0,
"ifConnectorPresent": "true",
"ifOperStatus": "up",
"ifOperStatus_prev": "up",
Expand Down Expand Up @@ -8037,8 +8037,8 @@
"ifName": "4003",
"portName": null,
"ifIndex": 5125,
"ifSpeed": 0,
"ifSpeed_prev": null,
"ifSpeed": null,
"ifSpeed_prev": 0,
"ifConnectorPresent": "true",
"ifOperStatus": "down",
"ifOperStatus_prev": "down",
Expand Down Expand Up @@ -8137,8 +8137,8 @@
"ifName": "lb0",
"portName": null,
"ifIndex": 7169,
"ifSpeed": 0,
"ifSpeed_prev": null,
"ifSpeed": null,
"ifSpeed_prev": 0,
"ifConnectorPresent": "true",
"ifOperStatus": "up",
"ifOperStatus_prev": "up",
Expand Down Expand Up @@ -9691,7 +9691,7 @@
"entPhysicalIsFRU": "true",
"entPhysicalModelName": "1 Port XFP Module",
"entPhysicalVendorType": "zeroDotZero",
"entPhysicalSerialNum": "???????????????",
"entPhysicalSerialNum": "FFFFFFFFFFFFFFFF",
"entPhysicalContainedIn": 10,
"entPhysicalParentRelPos": 1,
"entPhysicalMfgName": "",
Expand Down Expand Up @@ -9767,7 +9767,7 @@
"entPhysicalIsFRU": "true",
"entPhysicalModelName": "1 Port XFP Module",
"entPhysicalVendorType": "zeroDotZero",
"entPhysicalSerialNum": "???????????????",
"entPhysicalSerialNum": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF",
"entPhysicalContainedIn": 14,
"entPhysicalParentRelPos": 2,
"entPhysicalMfgName": "",
Expand Down
Loading

0 comments on commit 109b996

Please sign in to comment.