diff options
-rw-r--r-- | config/jolt/p-interfaceSpec.json | 36 | ||||
-rw-r--r-- | src/test/resources/junit/networkDiscoveryResponsePInterface.json | 10 |
2 files changed, 35 insertions, 11 deletions
diff --git a/config/jolt/p-interfaceSpec.json b/config/jolt/p-interfaceSpec.json index c7d5542..596b2ba 100644 --- a/config/jolt/p-interfaceSpec.json +++ b/config/jolt/p-interfaceSpec.json @@ -14,7 +14,10 @@ "*": { // filter the Network Discovery attributes that we want to keep, to a temporary list: "name": { - "mac_address": { + "adminStateUp": { + "@2": "tempList[]" + }, + "macAddress": { "@2": "tempList[]" }, "description": { @@ -26,8 +29,7 @@ } } } - } - , + }, { // Convert the attribute names to common model names. "operation": "shift", @@ -35,15 +37,28 @@ "tempList": { "*": { "name": { - "mac_address": { - "#macAddress": "attributeList[#4].name" + "adminStateUp": { + "#lockedBoolean": "attributeList[&3].name", + "@(2,value)": { + "true": { + "#false": "attributeList[&5].value" + }, + "false": { + "#true": "attributeList[&5].value" + } + }, + "@(2,dataQuality)": "attributeList[&3].dataQuality" + }, + "macAddress": { + "#macAddress": "attributeList[&3].name", + "@(2,value)": "attributeList[&3].value", + "@(2,dataQuality)": "attributeList[&3].dataQuality" }, "description": { - "#description": "attributeList[#4].name" + "#description": "attributeList[&3].name", + "@(2,value)": "attributeList[&3].value", + "@(2,dataQuality)": "attributeList[&3].dataQuality" } - }, - "*": { - "@": "attributeList[#3].&" } } }, @@ -51,5 +66,6 @@ "@": "&" } } - } + } + ] diff --git a/src/test/resources/junit/networkDiscoveryResponsePInterface.json b/src/test/resources/junit/networkDiscoveryResponsePInterface.json index 0b5f34a..ab56cf2 100644 --- a/src/test/resources/junit/networkDiscoveryResponsePInterface.json +++ b/src/test/resources/junit/networkDiscoveryResponsePInterface.json @@ -14,7 +14,15 @@ }, "attributeList": [ { - "name": "mac_address", + "name": "adminStateUp", + "value": "true", + "dataQuality": { + "status": "ok", + "errorText": null + } + }, + { + "name": "macAddress", "value": "127.0.0.1", "dataQuality": { "status": "ok", |