device: Improved detection for dlink and dlinkap devices (#8447)

This commit is contained in:
Neil Lathwood
2018-03-23 20:04:25 +00:00
committed by Tony Murray
parent 94f5ed67c5
commit 4c2822fe77
9 changed files with 94 additions and 11 deletions

View File

@@ -4,12 +4,11 @@ type: network
icon: dlink icon: dlink
ifname: 1 ifname: 1
discovery: discovery:
- sysDescr: -
- 'D-Link DES-' sysObjectID_except:
- 'Dlink DES-' - .1.3.6.1.4.1.171.10.37.
- sysDescr_regex: sysObjectID:
- '/^DES-/' - .1.3.6.1.4.1.171.10.
- '/^DGS-/'
good_if: good_if:
- po - po
- vlan - vlan

View File

@@ -3,7 +3,5 @@ text: 'D-Link Access Point'
type: wireless type: wireless
icon: dlink icon: dlink
discovery: discovery:
- sysDescr: - sysObjectID:
- 'D-Link DAP-' - .1.3.6.1.4.1.171.10.37.
- 'D-Link Access Point'
- sysDescr_regex: '/D-Link .* AP/'

40
tests/data/dlink.json Normal file
View File

@@ -0,0 +1,40 @@
{
"os": {
"discovery": {
"devices": [
{
"sysName": "",
"sysObjectID": ".1.3.6.1.4.1.171.10.153.7.1",
"sysDescr": "WS6-DGS-1210-52/F1 6.10.007",
"sysContact": null,
"version": null,
"hardware": "",
"features": null,
"location": null,
"os": "dlink",
"type": "network",
"serial": null,
"icon": "dlink.svg"
}
]
},
"poller": {
"devices": [
{
"sysName": "",
"sysObjectID": ".1.3.6.1.4.1.171.10.153.7.1",
"sysDescr": "WS6-DGS-1210-52/F1 6.10.007",
"sysContact": null,
"version": null,
"hardware": "WS6-DGS-1210-52/F1 Rev. ",
"features": null,
"location": null,
"os": "dlink",
"type": "network",
"serial": null,
"icon": "dlink.svg"
}
]
}
}
}

View File

@@ -0,0 +1,40 @@
{
"os": {
"discovery": {
"devices": [
{
"sysName": "",
"sysObjectID": ".1.3.6.1.4.1.171.10.153.10.1",
"sysDescr": "WS6-DGS-1210-52MP/F1 6.10.007",
"sysContact": null,
"version": null,
"hardware": "",
"features": null,
"location": null,
"os": "dlink",
"type": "network",
"serial": null,
"icon": "dlink.svg"
}
]
},
"poller": {
"devices": [
{
"sysName": "",
"sysObjectID": ".1.3.6.1.4.1.171.10.153.10.1",
"sysDescr": "WS6-DGS-1210-52MP/F1 6.10.007",
"sysContact": null,
"version": null,
"hardware": "WS6-DGS-1210-52MP/F1 Rev. ",
"features": null,
"location": null,
"os": "dlink",
"type": "network",
"serial": null,
"icon": "dlink.svg"
}
]
}
}
}

View File

@@ -0,0 +1,2 @@
1.3.6.1.2.1.1.1.0|4|WS6-DGS-1210-52/F1 6.10.007
1.3.6.1.2.1.1.2.0|6|.1.3.6.1.4.1.171.10.153.7.1

View File

@@ -1 +1,2 @@
1.3.6.1.2.1.1.1.0|4|Dlink DES- 1.3.6.1.2.1.1.1.0|4|Dlink DES-
1.3.6.1.2.1.1.2.0|6|.1.3.6.1.4.1.171.10.63.10

View File

@@ -0,0 +1,2 @@
1.3.6.1.2.1.1.1.0|4|WS6-DGS-1210-52MP/F1 6.10.007
1.3.6.1.2.1.1.2.0|6|.1.3.6.1.4.1.171.10.153.10.1

View File

@@ -1,2 +1,2 @@
1.3.6.1.2.1.1.1.0|4|DGS-1100-18 Gigabit Ethernet Switch 1.3.6.1.2.1.1.1.0|4|DGS-1100-18 Gigabit Ethernet Switch
1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.171 1.3.6.1.2.1.1.2.0|6|.1.3.6.1.4.1.171.10.134.1

View File

@@ -1 +1,2 @@
1.3.6.1.2.1.1.1.0|4|D-Link Access Point 1.3.6.1.2.1.1.1.0|4|D-Link Access Point
1.3.6.1.2.1.1.2.0|6|.1.3.6.1.4.1.171.10.37.30