diff options
author | Tait,Trevor(rt0435) <rtait@amdocs.com> | 2019-02-19 14:54:54 -0500 |
---|---|---|
committer | Tait,Trevor(rt0435) <rtait@amdocs.com> | 2019-02-20 13:56:41 -0500 |
commit | a63304affd6cb323fedcf76c2961c9cb983a7597 (patch) | |
tree | 89821b037fcf9eb86480806c9b7824839befd775 /config/jolt | |
parent | 85dda672f8d9a3bed20ca36852fa6e94c378f5b4 (diff) |
ND Context Builder Updates for port/p-interface
Issue-ID: LOG-977
Change-Id: I321036e0f51297092b9c88ff668c4e09c89b36a0
Signed-off-by: Tait,Trevor(rt0435) <rtait@amdocs.com>
Diffstat (limited to 'config/jolt')
-rw-r--r-- | config/jolt/p-interfaceSpec.json | 55 | ||||
-rw-r--r-- | config/jolt/pserverToVmSpec.json | 47 | ||||
-rw-r--r-- | config/jolt/sdToModelContextSpec.json | 32 | ||||
-rw-r--r-- | config/jolt/sdToNdResourcesSpec.json | 158 |
4 files changed, 217 insertions, 75 deletions
diff --git a/config/jolt/p-interfaceSpec.json b/config/jolt/p-interfaceSpec.json new file mode 100644 index 0000000..c7d5542 --- /dev/null +++ b/config/jolt/p-interfaceSpec.json @@ -0,0 +1,55 @@ +[ + // This section converts the json from network discovery micro-service + // to org.onap.pomba.audit.common.model.Network + + { + "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": { + "mac_address": { + "@2": "tempList[]" + }, + "description": { + "@2": "tempList[]" + } + } + } + } + } + } + } + } + , + { + // Convert the attribute names to common model names. + "operation": "shift", + "spec": { + "tempList": { + "*": { + "name": { + "mac_address": { + "#macAddress": "attributeList[#4].name" + }, + "description": { + "#description": "attributeList[#4].name" + } + }, + "*": { + "@": "attributeList[#3].&" + } + } + }, + "*": { + "@": "&" + } + } + } +] diff --git a/config/jolt/pserverToVmSpec.json b/config/jolt/pserverToVmSpec.json new file mode 100644 index 0000000..28896ed --- /dev/null +++ b/config/jolt/pserverToVmSpec.json @@ -0,0 +1,47 @@ +[ + // Use https://jolt-demo.appspot.com/#inception to develop/test + // any changes to this file + { + // This section extracts pservers from generic-vnf from service-decompostion + // and maps them to their associated vservers (VM) + // to org.onap.pomba.common.datatypes.ModelContext + "operation": "shift", + "spec": { + "generic-vnfs": { + "*": { + "pservers": { + "*": { + "pserver-id": "pServer[&1].uuid", + "p-interfaces": { + "p-interface": { + "*": { + "equipment-identifier": "pServer[&4].pInterfaceList[&1].uuid" + } + } + }, + "relationship-list": { + "relationship": { + "*": { + "related-to": { + "vserver": { + "@(2,relationship-data)": { + "*": { + "relationship-key": { + "vserver.vserver-id": { + "@(2,relationship-value)": "pServer[&10].vserver-id" + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } +] diff --git a/config/jolt/sdToModelContextSpec.json b/config/jolt/sdToModelContextSpec.json index 77a71f1..d9b56c0 100644 --- a/config/jolt/sdToModelContextSpec.json +++ b/config/jolt/sdToModelContextSpec.json @@ -12,11 +12,23 @@ "network-id": "networkList[&1].uuid" } }, + "pnfs": { + "*": { + "pnf-id": "pnfList[&1].uuid", + "p-interfaces": { + "p-interface": { + "*": { + "equipment-identifier": "pnfList[&4].pInterfaceList[&1].uuid" + } + } + } + } + }, "generic-vnfs": { - "*": { + "*": { "vservers": { "*": { - "vserver-id": "vnfList[&3].vfModuleList[0].vmList[&1].uuid" + "vserver-id": "vnfList[&3].vfModuleList[0].vmList[&1].uuid" } }, "l3-networks": { @@ -25,15 +37,15 @@ } }, "vf-modules": { - "vf-module": { - "*": { - "l3-networks" : { - "*": { - "network-id": "vnfList[&6].vfModuleList[0].networkList[&1].uuid" - } + "vf-module": { + "*": { + "l3-networks": { + "*": { + "network-id": "vnfList[&6].vfModuleList[0].networkList[&1].uuid" + } } - } - } + } + } }, "vnfcs": { "*": { diff --git a/config/jolt/sdToNdResourcesSpec.json b/config/jolt/sdToNdResourcesSpec.json index bce2d68..d0031f9 100644 --- a/config/jolt/sdToNdResourcesSpec.json +++ b/config/jolt/sdToNdResourcesSpec.json @@ -1,65 +1,93 @@ -[
- // Use https://jolt-demo.appspot.com/#inception to develop/test
- // any changes to this file
- {
- // This section converts the updated json from service-decomposition
- // to org.onap.pomba.contextbuilder.networkdiscovery.model.NdResources
- "operation": "shift",
- "spec": {
- "l3-networks": {
- "*": {
- "network-id": {
- "@": "tempResourceId",
- "#l3-network": "tempResourceType"
- }
- }
- },
- "generic-vnfs": {
- "*": {
- "vservers": {
- "*": {
- "vserver-id": {
- "@": "tempResourceId",
- "#vserver": "tempResourceType"
-
- }
- }},
- "vf-modules": {
- "vf-module": {
- "*": {
- "l3-networks": {
- "*": {
- "network-id": {
- "@": "tempResourceId",
- "#l3-network": "tempResourceType"
- }
- }
- }
- }
- }
- },
- "l3-networks": {
- "*": {
- "network-id": {
- "@": "tempResourceId",
- "#l3-network": "tempResourceType"
- }
- }
- }
- }
- }
- }
- },
- {
- "operation": "shift",
- "spec": {
- "tempResourceType": {
- "*": {
- "@": "ndResources[&].resourceType",
- "@(2,tempResourceId[&])": "ndResources[&].resourceId"
- }
- }
- }
- }
-
-]
+[ + // Use https://jolt-demo.appspot.com/#inception to develop/test + // any changes to this file + { + // This section converts the updated json from service-decomposition + // to org.onap.pomba.contextbuilder.networkdiscovery.model.NdResources + "operation": "shift", + "spec": { + "l3-networks": { + "*": { + "network-id": { + "@": "tempResourceId", + "#l3-network": "tempResourceType" + } + } + }, + "pnfs": { + "*": { + "p-interfaces": { + "p-interface": { + "*": { + "equipment-identifier": { + "@": "tempResourceId", + "#port": "tempResourceType" + } + } + } + } + } + }, + "generic-vnfs": { + "*": { + "vservers": { + "*": { + "vserver-id": { + "@": "tempResourceId", + "#vserver": "tempResourceType" + } + } + }, + "vf-modules": { + "vf-module": { + "*": { + "l3-networks": { + "*": { + "network-id": { + "@": "tempResourceId", + "#l3-network": "tempResourceType" + } + } + } + } + } + }, + "l3-networks": { + "*": { + "network-id": { + "@": "tempResourceId", + "#l3-network": "tempResourceType" + } + } + }, + "pservers": { + "*": { + "p-interfaces": { + "p-interface": { + "*": { + "equipment-identifier": { + "@": "tempResourceId", + "#port": "tempResourceType" + } + } + } + } + } + } + } + } + } + }, + { + "operation": "shift", + "spec": { + "tempResourceType": { + "*": { + "@": "ndResources[&].resourceType", + "@(2,tempResourceId[&])": "ndResources[&].resourceId" + } + } + } + } + +] |