aboutsummaryrefslogtreecommitdiffstats
path: root/config/jolt
diff options
context:
space:
mode:
Diffstat (limited to 'config/jolt')
-rw-r--r--config/jolt/l3-networkSpec.json49
-rw-r--r--config/jolt/sdToModelContextSpec.json24
-rw-r--r--config/jolt/sdToNdResourcesSpec.json22
-rw-r--r--config/jolt/vserverSpec.json61
4 files changed, 152 insertions, 4 deletions
diff --git a/config/jolt/l3-networkSpec.json b/config/jolt/l3-networkSpec.json
new file mode 100644
index 0000000..8924920
--- /dev/null
+++ b/config/jolt/l3-networkSpec.json
@@ -0,0 +1,49 @@
+[
+ // 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": {
+ "sharedNetwork": {
+ "@2": "tempList[]"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ ,
+ {
+ // Convert the attribute names to common model names.
+ "operation": "shift",
+ "spec": {
+ "tempList": {
+ "*": {
+ "name" : {
+ "sharedNetwork": {
+ "#sharedNetworkBoolean": "attributeList[#4].name"
+ }
+ },
+ "*" : {
+ "@" : "attributeList[#3].&"
+ }
+ }
+ },
+ "*": {
+ "@" : "&"
+ }
+ }
+ }
+]
diff --git a/config/jolt/sdToModelContextSpec.json b/config/jolt/sdToModelContextSpec.json
index 88201a7..77a71f1 100644
--- a/config/jolt/sdToModelContextSpec.json
+++ b/config/jolt/sdToModelContextSpec.json
@@ -7,8 +7,13 @@
"operation": "shift",
"spec": {
"service-instance-id": "service.uuid",
- "generic-vnfs": {
+ "l3-networks": {
"*": {
+ "network-id": "networkList[&1].uuid"
+ }
+ },
+ "generic-vnfs": {
+ "*": {
"vservers": {
"*": {
"vserver-id": "vnfList[&3].vfModuleList[0].vmList[&1].uuid"
@@ -16,9 +21,20 @@
},
"l3-networks": {
"*": {
- "network-id": "vnfList[&3].vfModuleList[0].networkList[&1].uuid"
+ "network-id": "vnfList[&3].networkList[&1].uuid"
}
},
+ "vf-modules": {
+ "vf-module": {
+ "*": {
+ "l3-networks" : {
+ "*": {
+ "network-id": "vnfList[&6].vfModuleList[0].networkList[&1].uuid"
+ }
+ }
+ }
+ }
+ },
"vnfcs": {
"*": {
"vnfc-id": "vnfList[&3].vnfcList[&1].uuid"
@@ -27,5 +43,5 @@
}
}
}
- }
- ]
+ }
+]
diff --git a/config/jolt/sdToNdResourcesSpec.json b/config/jolt/sdToNdResourcesSpec.json
index c7d7496..bce2d68 100644
--- a/config/jolt/sdToNdResourcesSpec.json
+++ b/config/jolt/sdToNdResourcesSpec.json
@@ -6,6 +6,14 @@
// to org.onap.pomba.contextbuilder.networkdiscovery.model.NdResources
"operation": "shift",
"spec": {
+ "l3-networks": {
+ "*": {
+ "network-id": {
+ "@": "tempResourceId",
+ "#l3-network": "tempResourceType"
+ }
+ }
+ },
"generic-vnfs": {
"*": {
"vservers": {
@@ -16,6 +24,20 @@
}
}},
+ "vf-modules": {
+ "vf-module": {
+ "*": {
+ "l3-networks": {
+ "*": {
+ "network-id": {
+ "@": "tempResourceId",
+ "#l3-network": "tempResourceType"
+ }
+ }
+ }
+ }
+ }
+ },
"l3-networks": {
"*": {
"network-id": {
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].&"
+ }
+ }
+ },
+ "*": {
+ "@" : "&"
+ }
+ }
+ }
+]