From 85dda672f8d9a3bed20ca36852fa6e94c378f5b4 Mon Sep 17 00:00:00 2001 From: Norm Traxler Date: Fri, 1 Feb 2019 16:56:25 +0000 Subject: Ctx Builder l3-network support Issue-ID: SDNC-475 Network Discovery Ctx Builder to support l3-network attribute mapping to common model. Fix jenkins JUnit failures Change-Id: I64ded411a74ffb037df17a047c16e210d41c4992 Signed-off-by: Norm Traxler --- config/jolt/vserverSpec.json | 61 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 config/jolt/vserverSpec.json (limited to 'config/jolt/vserverSpec.json') diff --git a/config/jolt/vserverSpec.json b/config/jolt/vserverSpec.json new file mode 100644 index 0000000..00659cd --- /dev/null +++ b/config/jolt/vserverSpec.json @@ -0,0 +1,61 @@ +[ + // This section converts the json from network discovery micro-service + // to org.onap.pomba.audit.common.model.VM + + { + "operation": "shift", + "spec": { + "resources": { + "*": { + "id": "uuid", + "name": "name", + "dataQuality": "dataQuality", + "attributeList": { + "*": { + // filter the Network Discovery attributes that we want to keep, to a temporary list: + "name": { + "inMaintenance": { + "@2": "tempList[]" + }, + "hostname": { + "@2": "tempList[]" + }, + "imageId": { + "@2": "tempList[]" + } + } + } + } + } + } + } + } + , + { + // Convert the attribute names to common model names. + "operation": "shift", + "spec": { + "tempList": { + "*": { + "name" : { + "inMaintenance": { + "#lockedBoolean": "attributeList[#4].name" + }, + "hostname": { + "#hostName": "attributeList[#4].name" + }, + "imageId": { + "#imageId": "attributeList[#4].name" + } + }, + "*" : { + "@" : "attributeList[#3].&" + } + } + }, + "*": { + "@" : "&" + } + } + } +] -- cgit 1.2.3-korg