aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTait,Trevor(rt0435) <rtait@amdocs.com>2019-02-22 12:23:01 -0500
committerTait,Trevor(rt0435) <rtait@amdocs.com>2019-02-22 12:23:16 -0500
commit60a97cb7282a4974df86454c29914f82f6601b39 (patch)
tree704c79c88890e4397878c80ebdcdef98127a827e
parenta63304affd6cb323fedcf76c2961c9cb983a7597 (diff)
ND Context Builder Updates for port/p-interface
Fix p-interfaceSpec to convert adminStateUp to lockedBoolean Issue-ID: LOG-977 Change-Id: Ib733996b46591e4cf3a72e91665ab83817071596 Signed-off-by: Tait,Trevor(rt0435) <rtait@amdocs.com>
-rw-r--r--config/jolt/p-interfaceSpec.json36
-rw-r--r--src/test/resources/junit/networkDiscoveryResponsePInterface.json10
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",