From ec5cd29ea780bde46fe6e47b72ccf87004c0c04d Mon Sep 17 00:00:00 2001 From: Toberd Date: Wed, 2 Jun 2021 15:14:15 +0200 Subject: [PATCH] Added identify properties to timos --- config/device-classes/generic/timos.yaml | 27 +++++++++++++++++++- config/device-classes/generic/timos/sas.yaml | 21 ++++++++++++++- 2 files changed, 46 insertions(+), 2 deletions(-) diff --git a/config/device-classes/generic/timos.yaml b/config/device-classes/generic/timos.yaml index 7b175bb..bf56472 100644 --- a/config/device-classes/generic/timos.yaml +++ b/config/device-classes/generic/timos.yaml @@ -6,4 +6,29 @@ match: type: SysObjectID values: - ".1.3.6.1.4.1.6527" - logical_operator: OR \ No newline at end of file + logical_operator: OR + +identify: + properties: + serial_number: + - detection: snmpget + oid: ".1.3.6.1.4.1.6527.3.1.2.2.1.8.1.5.1.50331649" + vendor: + - detection: constant + value: "Nokia" + os_version: + - detection: snmpget + oid: ".1.3.6.1.4.1.6527.3.1.2.2.1.8.1.21.1.134217729" + operators: + - type: modify + modify_method: regexSubmatch + regex: '^TiMOS-([^, ]+)' + format: "$1" + model: + - detection: snmpget + oid: ".1.3.6.1.4.1.6527.3.1.2.2.1.8.1.21.1.134217729" + operators: + - type: modify + modify_method: regexSubmatch + regex: '^(([^, ]+) ){3}([\D,\d]+) Copyright' + format: "$3" \ No newline at end of file diff --git a/config/device-classes/generic/timos/sas.yaml b/config/device-classes/generic/timos/sas.yaml index 199871b..fd1a07f 100644 --- a/config/device-classes/generic/timos/sas.yaml +++ b/config/device-classes/generic/timos/sas.yaml @@ -6,4 +6,23 @@ match: type: SysObjectID values: - ".1.3.6.1.4.1.6527.6.2" - logical_operator: OR \ No newline at end of file + logical_operator: OR + +identify: + properties: + model: + - detection: snmpget + oid: ".1.3.6.1.4.1.6527.3.1.2.2.1.8.1.21.1.134217729" + operators: + - type: modify + modify_method: regexSubmatch + regex: '([\D,\d ])+ Nokia ([^, ]+) ' + format: "$2" + model_series: + - detection: snmpget + oid: ".1.3.6.1.4.1.6527.3.1.2.2.1.8.1.21.1.134217729" + operators: + - type: modify + modify_method: regexSubmatch + regex: '([\D,\d ])+ ([^, ]+) Copyright' + format: "$2" \ No newline at end of file