diff options
author | Hesam Rahimi <hesam.rahimi@huawei.com> | 2022-05-02 23:12:38 -0400 |
---|---|---|
committer | Hesam Rahimi <hesam.rahimi@huawei.com> | 2022-05-02 23:12:38 -0400 |
commit | c681b93fba0db2aa43b81b904050eb37c749dbc2 (patch) | |
tree | 349f7165c2dee5e9d4d2699ba58a7d72452f619a | |
parent | 7bd484302cdc29bc758cd9285ea191c17138bbcd (diff) |
For CCVPN Cloud leased-Line usecase, make sure to
'update' (instead of 'save') the metadata when
a service-instance already has a metadata entry.
Issue-ID: SDNC-1694
Signed-off-by: Hesam Rahimi <hesam.rahimi@huawei.com>
Change-Id: I17184c718eb01a0d51d58ad1a26359bbfd7f77f5
Former-commit-id: ecf71c7c4ee719fd96661de7b67ca5760fdd960a
2 files changed, 107 insertions, 81 deletions
diff --git a/platform-logic/generic-resource-api/src/main/json/cloud_leased_line/GENERIC-RESOURCE-API_cll-vnf-topology-operation-cll-callbackdg-notification.json b/platform-logic/generic-resource-api/src/main/json/cloud_leased_line/GENERIC-RESOURCE-API_cll-vnf-topology-operation-cll-callbackdg-notification.json index a670133a..0b9dc468 100644 --- a/platform-logic/generic-resource-api/src/main/json/cloud_leased_line/GENERIC-RESOURCE-API_cll-vnf-topology-operation-cll-callbackdg-notification.json +++ b/platform-logic/generic-resource-api/src/main/json/cloud_leased_line/GENERIC-RESOURCE-API_cll-vnf-topology-operation-cll-callbackdg-notification.json @@ -1,20 +1,20 @@ [
{
- "id": "8a5b20c9.2d6958",
+ "id": "66bcdf00.2e7598",
"type": "dgstart",
"name": "DGSTART",
"outputs": 1,
- "x": 261.566650390625,
- "y": 139.56666564941406,
- "z": "2d18ff94.88c5f",
+ "x": 225.56666564941406,
+ "y": 172.56666564941406,
+ "z": "702f315e.0e6118",
"wires": [
[
- "bdb245f1.4da368"
+ "1931c127.546b77"
]
]
},
{
- "id": "bdb245f1.4da368",
+ "id": "1931c127.546b77",
"type": "service-logic",
"name": "GENERIC-RESOURCE-API 777",
"module": "GENERIC-RESOURCE-API",
@@ -22,218 +22,233 @@ "comments": "",
"xml": "<service-logic xmlns='http://www.onap.org/sdnc/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='GENERIC-RESOURCE-API' version='777'>",
"outputs": 1,
- "x": 545.8523406982422,
- "y": 200.8047742843628,
- "z": "2d18ff94.88c5f",
+ "x": 509.85235595703125,
+ "y": 233.8047742843628,
+ "z": "702f315e.0e6118",
"wires": [
[
- "4eb0b947.e83b78"
+ "32c6346d.17563c"
]
]
},
{
- "id": "4eb0b947.e83b78",
+ "id": "32c6346d.17563c",
"type": "method",
"name": "method cll-vnf-topology-operation-cll-callbackdg-notification",
"xml": "<method rpc='cll-vnf-topology-operation-cll-callbackdg-notification' mode='sync'>\n",
"comments": "",
"outputs": 1,
- "x": 532.9952392578125,
- "y": 276.5666961669922,
- "z": "2d18ff94.88c5f",
+ "x": 496.99525451660156,
+ "y": 309.5666961669922,
+ "z": "702f315e.0e6118",
"wires": [
[
- "416b6213.27c614"
+ "662431e4.540678"
]
]
},
{
- "id": "96fcdbbe.b24fe",
+ "id": "ede64b53.a82078",
"type": "block",
"name": "block : atomic",
"xml": "<block atomic=\"true\">",
"atomic": "true",
"outputs": 1,
- "x": 1120.8046875,
- "y": 501.23333740234375,
- "z": "2d18ff94.88c5f",
+ "x": 1084.804702758789,
+ "y": 534.2333374023438,
+ "z": "702f315e.0e6118",
"wires": [
[
- "fe25bf06.e1202",
- "e39f74e0.3b6dd",
- "621e169.bbf1768",
- "ff3bf0b0.2c575",
- "bbfd60be.b270e",
- "5d29e3cc.fdd34c"
+ "e0268079.472468",
+ "1d2e8e93.37bae1",
+ "d0b86e41.d1cbb",
+ "7ba895bd.b38004",
+ "76c5d339.d79f1c",
+ "287359c3.7ae70e",
+ "bd65da89.d8b3b"
]
]
},
{
- "id": "b5bac117.85774",
+ "id": "81556bc1.ac55b8",
"type": "execute",
"name": "execute properties",
"xml": "<execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >\n <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' />\n <parameter name='contextPrefix' value='prop' />",
"comments": "",
"outputs": 1,
- "x": 1112.566650390625,
- "y": 277.56666564941406,
- "z": "2d18ff94.88c5f",
+ "x": 1076.566665649414,
+ "y": 310.56666564941406,
+ "z": "702f315e.0e6118",
"wires": [
[]
]
},
{
- "id": "fe25bf06.e1202",
+ "id": "e0268079.472468",
"type": "set",
"name": "set received notification parameters",
"xml": "<set>\n<!--<parameter name='rcvdNotif' value='`$notifvalue`' />-->\n<parameter name='rcvd-etht-svc-end-point' value='`$push-change-update.datastore-changes.payload.parameter-value[0].etht-svc-end-point`' />\n<parameter name='rcvd-subscription-id' value='`$push-change-update.subscription-id`' />\n<parameter name='rcvd-bandwidth-value' value='`$push-change-update.datastore-changes.payload.parameter-value[0].value`' />\n<parameter name='rcvd-service-instance-id' value='`$push-change-update.datastore-changes.payload.parameter-value[0].value-description`' />",
"comments": "",
- "x": 1441.566650390625,
- "y": 459.566650390625,
- "z": "2d18ff94.88c5f",
+ "x": 1405.566665649414,
+ "y": 492.566650390625,
+ "z": "702f315e.0e6118",
"wires": []
},
{
- "id": "d60d98ea.d791b8",
+ "id": "bd270d5c.62422",
"type": "record",
"name": "record",
"xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\" />\n<parameter name=\"level\" value=\"info\" />\n<parameter name=\"field1\" value=\"CallBack DG For SSE CONNECTION is called\"/>\n<!--<parameter name=\"field2\" value=\"`$rcvdNotif`\"/>-->",
"comments": "",
"outputs": 1,
- "x": 1076.5667114257812,
- "y": 221.56666564941406,
- "z": "2d18ff94.88c5f",
+ "x": 1040.5667266845703,
+ "y": 254.56666564941406,
+ "z": "702f315e.0e6118",
"wires": [
[]
]
},
{
- "id": "5d29e3cc.fdd34c",
+ "id": "287359c3.7ae70e",
"type": "save",
"name": "save:metadata to AAI",
- "xml": "<update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource=\"service-instance:metadata\"\n key=\"service-instance.service-instance-id = $rcvd-service-instance-id\n AND customer.global-customer-id = 'IBNCustomer' \n AND service-subscription.service-type = 'IBN'\" force=\"true\" pfx=\"tmp.AnAI-data\">\n <parameter name=\"metadata.metadatum[0].metaname\" value=\"`$rcvd-etht-svc-end-point`\" />\n <parameter name=\"metadata.metadatum[0].metaval\" value=\"`$rcvd-bandwidth-value`\" />\n\n \n",
+ "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource=\"service-instance:metadata\"\n key=\"service-instance.service-instance-id = $rcvd-service-instance-id\n AND customer.global-customer-id = 'IBNCustomer' \n AND service-subscription.service-type = 'IBN'\" force=\"true\" pfx=\"tmp.AnAI-data\">\n <parameter name=\"metadata.metadatum[0].metaname\" value=\"`$rcvd-etht-svc-end-point`\" />\n <parameter name=\"metadata.metadatum[0].metaval\" value=\"`$rcvd-bandwidth-value`\" />\n\n \n",
"comments": "",
"outputs": 1,
- "x": 1398.566650390625,
- "y": 522.566650390625,
- "z": "2d18ff94.88c5f",
+ "x": 1343.566650390625,
+ "y": 702.566650390625,
+ "z": "702f315e.0e6118",
"wires": [
[]
]
},
{
- "id": "ff3bf0b0.2c575",
+ "id": "7ba895bd.b38004",
"type": "set",
"name": "set parameters",
"xml": "<set>\n<parameter name='eventIdUuid' value=\"`'BandwidthChanged_' + $eventId-uuid`\" />\n<parameter name='eventNameUuid' value='`$eventName-uuid`' />\n<parameter name='cclId' value='`$rcvd-service-instance-id`' />\n<parameter name='uniId' value='`$rcvd-etht-svc-end-point`' />\n<parameter name='bandwidthValue' value='`$rcvd-bandwidth-value`' />\n",
"comments": "",
- "x": 1377.566650390625,
- "y": 769.5666198730469,
- "z": "2d18ff94.88c5f",
+ "x": 1334.566650390625,
+ "y": 1030.5666198730469,
+ "z": "702f315e.0e6118",
"wires": []
},
{
- "id": "bbfd60be.b270e",
+ "id": "76c5d339.d79f1c",
"type": "execute",
"name": "execute RestApiCallNode call VES",
"xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"templateFileName\" value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.cll-call-ves.templatefile`\" />\n<!--<parameter name=\"restapiUrl\" value=\"`$prop.dcaeAddrAndPort + '/eventListener/v7'`\" />-->\n<parameter name=\"restapiUrl\" value=\"https://dcae-ves-collector:8443/eventListener/v7\" />\n<parameter name=\"restapiUser\" value=\"sample1\" />\n<parameter name=\"restapiPassword\" value=\"sample1\" />\n<parameter name=\"format\" value=\"json\"/>\n<parameter name=\"httpMethod\" value=\"post\"/>\n<parameter name='dirPath' value=\"/opt/onap/sdnc/restconfapi/yang\" />\n<parameter name=\"responsePrefix\" value=\"ves-result\"/>\n<parameter name=\"trustStoreFileName\" value=\"/opt/onap/sdnc/data/stores/truststore.onap.client.jks\"/>\n<parameter name=\"trustStorePassword\" value=\"adminadmin\"/>\n<!--<parameter name=\"keyStoreFileName\" value=\"/opt/onap/sdnc/data/stores/sdnc.p12\"/>-->\n<!--<parameter name=\"keyStorePassword\" value=\"adminadmin\"/>-->\n<parameter name=\"disableHostVerification\" value=\"true\"/>\n<parameter name=\"ssl\" value=\"false\"/>\n\n",
"comments": "",
"outputs": 1,
- "x": 1435.566650390625,
- "y": 812.5666198730469,
- "z": "2d18ff94.88c5f",
+ "x": 1392.566650390625,
+ "y": 1073.5666198730469,
+ "z": "702f315e.0e6118",
"wires": [
[]
]
},
{
- "id": "e39f74e0.3b6dd",
+ "id": "1d2e8e93.37bae1",
"type": "execute",
"name": "execute UUID generator for eventId",
"xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='generateUUID' >\n<parameter name=\"ctx-destination\" value=\"eventId-uuid\"/>\n",
"comments": "",
"outputs": 1,
- "x": 1439.566650390625,
- "y": 677.5666198730469,
- "z": "2d18ff94.88c5f",
+ "x": 1396.566650390625,
+ "y": 938.5666198730469,
+ "z": "702f315e.0e6118",
"wires": [
[]
]
},
{
- "id": "621e169.bbf1768",
+ "id": "d0b86e41.d1cbb",
"type": "execute",
"name": "execute UUID generator for eventName",
"xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='generateUUID' >\n<parameter name=\"ctx-destination\" value=\"eventName-uuid\"/>\n",
"comments": "",
"outputs": 1,
- "x": 1452.566650390625,
- "y": 719.5666198730469,
- "z": "2d18ff94.88c5f",
+ "x": 1409.566650390625,
+ "y": 980.5666198730469,
+ "z": "702f315e.0e6118",
"wires": [
[]
]
},
{
- "id": "b2f5ba8c.666eb8",
+ "id": "4bdb06f5.bcb39",
"type": "comment",
"name": "Calling VES and passing notification parameters",
"info": "",
"comments": "",
- "x": 1466.566650390625,
- "y": 622.5666198730469,
- "z": "2d18ff94.88c5f",
+ "x": 1423.566650390625,
+ "y": 883.5666198730469,
+ "z": "702f315e.0e6118",
"wires": []
},
{
- "id": "6d59e09e.bb9828",
+ "id": "dd541dae.d802a",
"type": "switchNode",
"name": "switch change type == upadte",
"xml": "<switch test=\"`$push-change-update.datastore-changes.type == 'update' `\">\n\n\n",
"comments": "",
"outputs": 1,
- "x": 1137.566650390625,
- "y": 352.566650390625,
- "z": "2d18ff94.88c5f",
+ "x": 1101.566665649414,
+ "y": 385.566650390625,
+ "z": "702f315e.0e6118",
"wires": [
[
- "967e790f.f55248"
+ "b52a1b9.b64ba68"
]
]
},
{
- "id": "967e790f.f55248",
+ "id": "b52a1b9.b64ba68",
"type": "outcome",
"name": "true",
"xml": "<outcome value='true'>\n",
"comments": "",
"outputs": 1,
- "x": 1352.566650390625,
- "y": 350.566650390625,
- "z": "2d18ff94.88c5f",
+ "x": 1316.566665649414,
+ "y": 383.566650390625,
+ "z": "702f315e.0e6118",
"wires": [
[
- "96fcdbbe.b24fe"
+ "ede64b53.a82078"
]
]
},
{
- "id": "416b6213.27c614",
+ "id": "662431e4.540678",
"type": "block",
"name": "block",
"xml": "<block>",
"atomic": "false",
"comments": "",
"outputs": 1,
- "x": 867.566650390625,
- "y": 277.566650390625,
- "z": "2d18ff94.88c5f",
+ "x": 831.5666656494141,
+ "y": 310.566650390625,
+ "z": "702f315e.0e6118",
"wires": [
[
- "d60d98ea.d791b8",
- "b5bac117.85774",
- "6d59e09e.bb9828"
+ "bd270d5c.62422",
+ "81556bc1.ac55b8",
+ "dd541dae.d802a"
]
]
+ },
+ {
+ "id": "bd65da89.d8b3b",
+ "type": "save",
+ "name": "update:metadata to AAI",
+ "xml": "<update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource=\"service-instance\"\n key=\"service-instance.service-instance-id = $rcvd-service-instance-id\n AND customer.global-customer-id = 'IBNCustomer' \n AND service-subscription.service-type = 'IBN'\n AND metadatum.metaname = $rcvd-etht-svc-end-point\" force=\"true\" pfx=\"tmp.AnAI-data\">\n <parameter name=\"metaname\" value=\"`$rcvd-etht-svc-end-point`\" />\n <parameter name=\"metaval\" value=\"`$rcvd-bandwidth-value`\" />\n\n \n<!--AND metadatum.metaname = $rcvd-etht-svc-end-point-->\n\n<!--<parameter name=\"metadata.metadatum[0].metaname\" value=\"`$rcvd-etht-svc-end-point`\" />-->\n<!-- <parameter name=\"metadata.metadatum[0].metaval\" value=\"`$rcvd-bandwidth-value`\" />-->",
+ "comments": "",
+ "outputs": 1,
+ "x": 1352.566650390625,
+ "y": 757.566650390625,
+ "z": "702f315e.0e6118",
+ "wires": [
+ []
+ ]
}
]
\ No newline at end of file diff --git a/platform-logic/generic-resource-api/src/main/xml/cloud_leased_line/GENERIC-RESOURCE-API_cll-vnf-topology-operation-cll-callbackdg-notification.xml b/platform-logic/generic-resource-api/src/main/xml/cloud_leased_line/GENERIC-RESOURCE-API_cll-vnf-topology-operation-cll-callbackdg-notification.xml index ff1ce989..2d554635 100644 --- a/platform-logic/generic-resource-api/src/main/xml/cloud_leased_line/GENERIC-RESOURCE-API_cll-vnf-topology-operation-cll-callbackdg-notification.xml +++ b/platform-logic/generic-resource-api/src/main/xml/cloud_leased_line/GENERIC-RESOURCE-API_cll-vnf-topology-operation-cll-callbackdg-notification.xml @@ -23,12 +23,23 @@ <parameter name='rcvd-bandwidth-value' value='`$push-change-update.datastore-changes.payload.parameter-value[0].value`' /> <parameter name='rcvd-service-instance-id' value='`$push-change-update.datastore-changes.payload.parameter-value[0].value-description`' /> </set> - <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource="service-instance:metadata" - key="service-instance.service-instance-id = $rcvd-service-instance-id + <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource="service-instance:metadata" + key="service-instance.service-instance-id = $rcvd-service-instance-id AND customer.global-customer-id = 'IBNCustomer' AND service-subscription.service-type = 'IBN'" force="true" pfx="tmp.AnAI-data"> <parameter name="metadata.metadatum[0].metaname" value="`$rcvd-etht-svc-end-point`" /> <parameter name="metadata.metadatum[0].metaval" value="`$rcvd-bandwidth-value`" /> + </save> + <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource="service-instance" + key="service-instance.service-instance-id = $rcvd-service-instance-id + AND customer.global-customer-id = 'IBNCustomer' + AND service-subscription.service-type = 'IBN' + AND metadatum.metaname = $rcvd-etht-svc-end-point" force="true" pfx="tmp.AnAI-data"> + <parameter name="metaname" value="`$rcvd-etht-svc-end-point`" /> + <parameter name="metaval" value="`$rcvd-bandwidth-value`" /> + <!--AND metadatum.metaname = $rcvd-etht-svc-end-point--> + <!--<parameter name="metadata.metadatum[0].metaname" value="`$rcvd-etht-svc-end-point`" />--> + <!-- <parameter name="metadata.metadatum[0].metaval" value="`$rcvd-bandwidth-value`" />--> </update> <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='generateUUID' > <parameter name="ctx-destination" value="eventId-uuid"/> |