aboutsummaryrefslogtreecommitdiffstats
path: root/platform-logic/datachange
diff options
context:
space:
mode:
authorshashikanth.vh <shashikanth.vh@huawei.com>2018-11-15 17:48:12 +0530
committerShashikanth VH <shashikanth.vh@huawei.com>2018-11-18 01:31:41 +0000
commitd1e6d41cce7c5a894536b2b88da760236b60a17d (patch)
treed9ff08b2f5ba2f6008b0e3c9d9b0bf62568f5566 /platform-logic/datachange
parent3df4ba7c88cf330cd358b2cc1a21cd31405fcbb7 (diff)
removed vnf-id validation check in DG
1.vnf-information.vnf-id validation check should not be mandatory in validate-vnf-input DG, its removed. 2. added execute node to read generic-resource-api-dg.properties in esr-thirdparty-sdnc-discovery DG. Change-Id: Iea920004cdd548e16b4223cf57008fc00dbb1cb2 Issue-ID: SDNC-523 Signed-off-by: shashikanth.vh <shashikanth.vh@huawei.com> Former-commit-id: 4f1d05b32513c4bbca760233948541cfb983cfb3
Diffstat (limited to 'platform-logic/datachange')
-rw-r--r--platform-logic/datachange/src/main/json/DataChange_esr-thirdparty-sdnc-discovery.json341
-rw-r--r--platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-discovery.xml183
2 files changed, 334 insertions, 190 deletions
diff --git a/platform-logic/datachange/src/main/json/DataChange_esr-thirdparty-sdnc-discovery.json b/platform-logic/datachange/src/main/json/DataChange_esr-thirdparty-sdnc-discovery.json
index ef453318..513289da 100644
--- a/platform-logic/datachange/src/main/json/DataChange_esr-thirdparty-sdnc-discovery.json
+++ b/platform-logic/datachange/src/main/json/DataChange_esr-thirdparty-sdnc-discovery.json
@@ -1,246 +1,249 @@
[
{
- "id": "3492b641.0dfbba",
+ "id": "1473da35.b14246",
"type": "other",
"name": "update",
"xml": "<outcome value='Update'>\n",
"comments": "",
"outputs": 1,
- "x": 673,
+ "x": 630.0000991821289,
"y": 276.6667003631592,
- "z": "cbb28df7.1359",
+ "z": "8cb5d046.a5aaf",
"wires": [
[
- "f2d65f4a.d687"
+ "9e41086f.f40978"
]
]
},
{
- "id": "668a1af1.719b34",
+ "id": "63d9b444.fbeb4c",
"type": "other",
"name": "delete",
"xml": "<outcome value='delete'>\n",
"comments": "",
"outputs": 1,
- "x": 709.2221145629883,
+ "x": 666.2222137451172,
"y": 478.33349609375,
- "z": "cbb28df7.1359",
+ "z": "8cb5d046.a5aaf",
"wires": [
[
- "3b8ddbef.903fa4"
+ "cf4516fc.415338"
]
]
},
{
- "id": "3b8ddbef.903fa4",
+ "id": "cf4516fc.415338",
"type": "block",
"name": "block : atomic",
"xml": "<block atomic=\"true\">",
"atomic": "true",
"outputs": 1,
- "x": 859.6667594909668,
+ "x": 816.6668586730957,
"y": 473.3335485458374,
- "z": "cbb28df7.1359",
+ "z": "8cb5d046.a5aaf",
"wires": [
[]
]
},
{
- "id": "c0cbee48.6a5f9",
+ "id": "aa391e7d.06c04",
"type": "comment",
"name": "TODO: Delete topology from AAI",
"info": "",
"comments": "",
- "x": 817.3334274291992,
+ "x": 774.3335266113281,
"y": 429.0001735687256,
- "z": "cbb28df7.1359",
+ "z": "8cb5d046.a5aaf",
"wires": []
},
{
- "id": "d3c03070.16287",
+ "id": "7e2d4ad0.53ea04",
"type": "switchNode",
"name": "switch aai-event-trigger",
"xml": "<switch test=\"`$data-change-notification-input.aai-event-trigger`\">\n",
"comments": "",
"outputs": 1,
- "x": 465.5555648803711,
+ "x": 422.5556640625,
"y": 345.2222261428833,
- "z": "cbb28df7.1359",
+ "z": "8cb5d046.a5aaf",
"wires": [
[
- "3492b641.0dfbba",
- "668a1af1.719b34"
+ "1473da35.b14246",
+ "63d9b444.fbeb4c"
]
]
},
{
- "id": "6bfaf616.869108",
+ "id": "4718051e.d2c46c",
"type": "block",
"name": "block : atomic",
"xml": "<block atomic=\"true\">",
"atomic": "true",
"outputs": 1,
- "x": 1267.333755493164,
+ "x": 1224.333854675293,
"y": 270.1112537384033,
- "z": "cbb28df7.1359",
+ "z": "8cb5d046.a5aaf",
"wires": [
[
- "c706e157.72486",
- "4130ca8.c1efa34"
+ "d85bb5b1.82c4d8",
+ "e3be6aaa.e1c308",
+ "3b1c8725.0fcfb8"
]
]
},
{
- "id": "f4c114b8.d66028",
+ "id": "e3be6aaa.e1c308",
"type": "execute",
"name": "execute RestApiCallNode Get token",
"xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"templateFileName\" value=\"`$prop.restapi.templateDir + '/actokentemplate.json'`\" />\n<parameter name=\"restapiUrl\" value=\"`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/v2/tokens'`\" />\n<parameter name=\"format\" value=\"json\"/>\n<parameter name=\"httpMethod\" value=\"post\"/>\n<parameter name=\"responsePrefix\" value=\"token-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\"/>",
"comments": "",
"outputs": 1,
- "x": 1523.993263244629,
+ "x": 1480.9933624267578,
"y": 132.0305051803589,
- "z": "cbb28df7.1359",
+ "z": "8cb5d046.a5aaf",
"wires": [
[
- "fafa0167.57f14",
- "c8836a7f.1ba7f8"
+ "6a112654.2ffd58",
+ "b242d748.545378"
]
]
},
{
- "id": "fafa0167.57f14",
+ "id": "6a112654.2ffd58",
"type": "success",
"name": "success",
"xml": "<outcome value='success'>\n",
"comments": "",
"outputs": 1,
- "x": 1758.993263244629,
+ "x": 1715.9933624267578,
"y": 110.03050518035889,
- "z": "cbb28df7.1359",
+ "z": "8cb5d046.a5aaf",
"wires": [
[
- "bd59ffd7.cdf9"
+ "e5b3fd51.2397c"
]
]
},
{
- "id": "c8836a7f.1ba7f8",
+ "id": "b242d748.545378",
"type": "failure",
"name": "failure",
"xml": "<outcome value='failure'>\n",
"comments": "",
"outputs": 1,
- "x": 1751.243263244629,
+ "x": 1708.2433624267578,
"y": 163.67338848114014,
- "z": "cbb28df7.1359",
+ "z": "8cb5d046.a5aaf",
"wires": [
[
- "8505bfec.1c327"
+ "71cf21cf.2814e"
]
]
},
{
- "id": "bd59ffd7.cdf9",
+ "id": "e5b3fd51.2397c",
"type": "set",
"name": "set token-id",
"xml": "<set>\n<parameter name='prop.sdncRestApi.token_id' value='`$token-result.data.token_id`' />\n",
"comments": "",
- "x": 1912.993263244629,
- "y": 111.03050518035889,
- "z": "cbb28df7.1359",
+ "x": 1875.9934921264648,
+ "y": 104.03051090240479,
+ "z": "8cb5d046.a5aaf",
"wires": []
},
{
- "id": "c706e157.72486",
+ "id": "d910de32.e62ae",
"type": "execute",
"name": "execute RestApiCallNode Get Topology",
"xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"restapiUrl\" value=\"`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/ietf-network:networks'`\" />\n<parameter name=\"restapiUser\" value=\"`$prop.sdncRestApi.thirdpartySdnc.user`\" />\n<parameter name=\"restapiPassword\" value=\"`$prop.sdncRestApi.thirdpartySdnc.password`\" />\n<parameter name=\"format\" value=\"json\"/>\n<parameter name=\"httpMethod\" value=\"get\"/>\n<parameter name=\"responsePrefix\" value=\"topology\"/>\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='customHttpHeaders' value=\"`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`\" />",
"comments": "",
"outputs": 1,
- "x": 1527.3266906738281,
- "y": 225.73424291610718,
- "z": "cbb28df7.1359",
+ "x": 1929.3267669677734,
+ "y": 293.2342710494995,
+ "z": "8cb5d046.a5aaf",
"wires": [
[
- "87479d00.dc1c9",
- "c2d07026.26d52"
+ "3dc2b196.085a9e",
+ "c53d2802.f6ecf8"
]
]
},
{
- "id": "87479d00.dc1c9",
+ "id": "3dc2b196.085a9e",
"type": "success",
"name": "success",
"xml": "<outcome value='success'>\n",
"comments": "",
"outputs": 1,
- "x": 1785.882022857666,
- "y": 203.73422479629517,
- "z": "cbb28df7.1359",
+ "x": 2244.8823013305664,
+ "y": 322.2342777252197,
+ "z": "8cb5d046.a5aaf",
"wires": [
[
- "3aa58504.f6229a"
+ "94766aa2.652398"
]
]
},
{
- "id": "3aa58504.f6229a",
+ "id": "94766aa2.652398",
"type": "block",
"name": "block : atomic",
"xml": "<block atomic=\"true\">",
"atomic": "true",
"comments": "",
"outputs": 1,
- "x": 1961.4375534057617,
- "y": 201.40094709396362,
- "z": "cbb28df7.1359",
+ "x": 2428.437847137451,
+ "y": 316.90099835395813,
+ "z": "8cb5d046.a5aaf",
"wires": [
- []
+ [
+ "c3e460ec.ed97f"
+ ]
]
},
{
- "id": "dca7d6ac.f501f8",
+ "id": "5ca06a0d.d6b0d4",
"type": "returnFailure",
"name": "return failure",
"xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error executing Create vpn rest api\" />\n",
"comments": "",
- "x": 1969.6598281860352,
- "y": 275.6230607032776,
- "z": "cbb28df7.1359",
+ "x": 2389.6601524353027,
+ "y": 225.12310695648193,
+ "z": "8cb5d046.a5aaf",
"wires": []
},
{
- "id": "c2d07026.26d52",
+ "id": "c53d2802.f6ecf8",
"type": "failure",
"name": "failure",
"xml": "<outcome value='failure'>\n",
"comments": "",
"outputs": 1,
- "x": 1791.3265075683594,
- "y": 274.845290184021,
- "z": "cbb28df7.1359",
+ "x": 2243.3268852233887,
+ "y": 226.34534358978271,
+ "z": "8cb5d046.a5aaf",
"wires": [
[
- "dca7d6ac.f501f8"
+ "5ca06a0d.d6b0d4"
]
]
},
{
- "id": "7cae77af.f5b818",
+ "id": "3177a11f.85bf9e",
"type": "dgstart",
"name": "DGSTART",
"outputs": 1,
- "x": 105.9999008178711,
- "y": 85,
- "z": "cbb28df7.1359",
+ "x": 91,
+ "y": 62.50000333786011,
+ "z": "8cb5d046.a5aaf",
"wires": [
[
- "b697d007.11e41"
+ "774441cb.70134"
]
]
},
{
- "id": "b697d007.11e41",
+ "id": "774441cb.70134",
"type": "service-logic",
"name": "DataChange ${project.version}",
"module": "DataChange",
@@ -248,208 +251,288 @@
"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='DataChange' version='${project.version}'>",
"outputs": 1,
- "x": 244.11102676391602,
+ "x": 201.11112594604492,
"y": 126.44446134567261,
- "z": "cbb28df7.1359",
+ "z": "8cb5d046.a5aaf",
"wires": [
[
- "49de6de0.6f78a4"
+ "5969d7b2.611c88"
]
]
},
{
- "id": "49de6de0.6f78a4",
+ "id": "5969d7b2.611c88",
"type": "method",
"name": "method esr-thirdparty-sdnc-discovery",
"xml": "<method rpc='esr-thirdparty-sdnc-discovery' mode='sync'>\n",
"comments": "",
"outputs": 1,
- "x": 340.5555877685547,
+ "x": 297.5556869506836,
"y": 237.22224235534668,
- "z": "cbb28df7.1359",
+ "z": "8cb5d046.a5aaf",
"wires": [
[
- "5f1e0612.f09808"
+ "70441765.9b30e8"
]
]
},
{
- "id": "5f1e0612.f09808",
+ "id": "70441765.9b30e8",
"type": "block",
"name": "block : atomic",
"xml": "<block atomic=\"true\">\n",
"atomic": "false",
"comments": "",
"outputs": 1,
- "x": 248.77781677246094,
+ "x": 205.77791595458984,
"y": 346.11122035980225,
- "z": "cbb28df7.1359",
+ "z": "8cb5d046.a5aaf",
"wires": [
[
- "d3c03070.16287"
+ "7e2d4ad0.53ea04"
]
]
},
{
- "id": "4130ca8.c1efa34",
+ "id": "c3e460ec.ed97f",
"type": "for",
"name": "for each Network",
"xml": "<for index='nidx' start='0' end='`$topology.networks.network_length`' >\n",
"comments": "",
"outputs": 1,
- "x": 1459.481460571289,
- "y": 353.2221817970276,
- "z": "cbb28df7.1359",
+ "x": 2202.4818229675293,
+ "y": 443.72221183776855,
+ "z": "8cb5d046.a5aaf",
"wires": [
[
- "5ae402a2.fe5ffc"
+ "e5b6573.9876aa8"
]
]
},
{
- "id": "5ae402a2.fe5ffc",
+ "id": "e5b6573.9876aa8",
"type": "block",
"name": "block",
"xml": "<block>\n",
"atomic": "false",
"comments": "",
"outputs": 1,
- "x": 1649.4814224243164,
- "y": 360.9999747276306,
- "z": "cbb28df7.1359",
+ "x": 2392.4817848205566,
+ "y": 451.5000047683716,
+ "z": "8cb5d046.a5aaf",
"wires": [
[
- "7d9ae4c3.21708c",
- "f67aa4a3.311fc8"
+ "80a22745.8dc678",
+ "de6cf312.86823"
]
]
},
{
- "id": "7d9ae4c3.21708c",
+ "id": "80a22745.8dc678",
"type": "call",
"name": "call update-network-to-aai",
"xml": "<call module='DataChange' rpc='update-network-to-aai' mode='sync' >\n",
"comments": "",
"outputs": 1,
- "x": 1902.8148441314697,
- "y": 424.33334493637085,
- "z": "cbb28df7.1359",
+ "x": 2645.81520652771,
+ "y": 514.8333749771118,
+ "z": "8cb5d046.a5aaf",
"wires": [
[]
]
},
{
- "id": "f67aa4a3.311fc8",
+ "id": "de6cf312.86823",
"type": "set",
"name": "set network",
"xml": "<set>\n<parameter name='network.' value='`$topology.networks.network[$nidx].`' />\n",
"comments": "",
- "x": 1855.036964416504,
- "y": 342.11108922958374,
- "z": "cbb28df7.1359",
+ "x": 2598.037326812744,
+ "y": 432.6111192703247,
+ "z": "8cb5d046.a5aaf",
"wires": []
},
{
- "id": "8505bfec.1c327",
+ "id": "71cf21cf.2814e",
"type": "block",
"name": "block",
"xml": "<block>\n",
"atomic": "false",
"comments": "",
"outputs": 1,
- "x": 1912.8146591186523,
+ "x": 1869.8147583007812,
"y": 158.77776765823364,
- "z": "cbb28df7.1359",
+ "z": "8cb5d046.a5aaf",
"wires": [
[]
]
},
{
- "id": "27eaeed1.46c512",
+ "id": "f641d4a3.15fe58",
"type": "comment",
"name": "Do Nothing",
"info": "",
"comments": "",
- "x": 2048.3702328999834,
+ "x": 2005.3703320821123,
"y": 157.66664340760974,
- "z": "cbb28df7.1359",
+ "z": "8cb5d046.a5aaf",
"wires": []
},
{
- "id": "416dcc31.e9a444",
+ "id": "50cc0089.8c5b9",
"type": "switchNode",
"name": "switch type",
"xml": "<switch test=\"`$prop.sdncRestApi.type`\">\n",
"comments": "",
"outputs": 1,
- "x": 948.0001487731934,
+ "x": 905.0002479553223,
"y": 279.00003147125244,
- "z": "cbb28df7.1359",
+ "z": "8cb5d046.a5aaf",
"wires": [
[
- "7de88c94.fa0ca4",
- "8ee217f7.3b1bd8"
+ "5f892fdd.7662a",
+ "1ec39cc9.6f7b33"
]
]
},
{
- "id": "f2d65f4a.d687",
+ "id": "9e41086f.f40978",
"type": "block",
"name": "block",
"xml": "<block>\n",
"atomic": "false",
"comments": "",
"outputs": 1,
- "x": 802.9999847412109,
+ "x": 760.0000839233398,
"y": 277.00002002716064,
- "z": "cbb28df7.1359",
+ "z": "8cb5d046.a5aaf",
"wires": [
[
- "416dcc31.e9a444"
+ "50cc0089.8c5b9"
]
]
},
{
- "id": "7de88c94.fa0ca4",
+ "id": "5f892fdd.7662a",
"type": "other",
"name": "SOTN",
"xml": "<outcome value='SOTN'>\n",
"comments": "",
"outputs": 1,
- "x": 1101.9999313354492,
+ "x": 1059.0000305175781,
"y": 235.00000190734863,
- "z": "cbb28df7.1359",
+ "z": "8cb5d046.a5aaf",
"wires": [
[
- "6bfaf616.869108"
+ "4718051e.d2c46c"
]
]
},
{
- "id": "8ee217f7.3b1bd8",
+ "id": "1ec39cc9.6f7b33",
"type": "other",
"name": "other",
"xml": "<outcome value='Other'>\n",
"comments": "",
"outputs": 1,
- "x": 1098.9999313354492,
+ "x": 1056.0000305175781,
"y": 359.00000953674316,
- "z": "cbb28df7.1359",
+ "z": "8cb5d046.a5aaf",
"wires": [
[
- "c0794a5f.727638"
+ "57bc8339.f1a98c"
]
]
},
{
- "id": "c0794a5f.727638",
+ "id": "57bc8339.f1a98c",
"type": "returnFailure",
"name": "return failure",
"xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'Unsupported type = ' + $prop.sdncRestApi.type`\" />\n\n",
"comments": "",
- "x": 1247.7726364135742,
+ "x": 1204.7727355957031,
"y": 358.43917751312256,
- "z": "cbb28df7.1359",
+ "z": "8cb5d046.a5aaf",
"wires": []
+ },
+ {
+ "id": "d85bb5b1.82c4d8",
+ "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' />\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1421.03125,
+ "y": 50.03125,
+ "z": "8cb5d046.a5aaf",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "3b1c8725.0fcfb8",
+ "type": "switchNode",
+ "name": "switch prop.sdncRestApi.token_id",
+ "xml": "<switch test=\"`$prop.sdncRestApi.token_id`\">\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1474.5310821533203,
+ "y": 270.000036239624,
+ "z": "8cb5d046.a5aaf",
+ "wires": [
+ [
+ "51700151.3682f",
+ "56c8ba7a.de2b04"
+ ]
+ ]
+ },
+ {
+ "id": "51700151.3682f",
+ "type": "other",
+ "name": "Null",
+ "xml": "<outcome value=''>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1690.5312004089355,
+ "y": 242.00001335144043,
+ "z": "8cb5d046.a5aaf",
+ "wires": [
+ [
+ "f5ddce51.60077"
+ ]
+ ]
+ },
+ {
+ "id": "56c8ba7a.de2b04",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1689.5311393737793,
+ "y": 291.5000228881836,
+ "z": "8cb5d046.a5aaf",
+ "wires": [
+ [
+ "d910de32.e62ae"
+ ]
+ ]
+ },
+ {
+ "id": "f5ddce51.60077",
+ "type": "execute",
+ "name": "execute RestApiCallNode Get Topology",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"restapiUrl\" value=\"`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/ietf-network:networks'`\" />\n<parameter name=\"restapiUser\" value=\"`$prop.sdncRestApi.thirdpartySdnc.user`\" />\n<parameter name=\"restapiPassword\" value=\"`$prop.sdncRestApi.thirdpartySdnc.password`\" />\n<parameter name=\"format\" value=\"json\"/>\n<parameter name=\"httpMethod\" value=\"get\"/>\n<parameter name=\"responsePrefix\" value=\"topology\"/>\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",
+ "comments": "",
+ "outputs": 1,
+ "x": 1925.0311584472656,
+ "y": 239.03126525878906,
+ "z": "8cb5d046.a5aaf",
+ "wires": [
+ [
+ "c53d2802.f6ecf8",
+ "3dc2b196.085a9e"
+ ]
+ ]
}
-]
+] \ No newline at end of file
diff --git a/platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-discovery.xml b/platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-discovery.xml
index dcab41bd..0d47536e 100644
--- a/platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-discovery.xml
+++ b/platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-discovery.xml
@@ -1,61 +1,122 @@
-<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='DataChange' version='${project.version}'>
- <method rpc='esr-thirdparty-sdnc-discovery' mode='sync'>
- <block atomic="true">
- <switch test="`$data-change-notification-input.aai-event-trigger`">
- <outcome value='Update'>
- <block>
- <switch test="`$prop.sdncRestApi.type`">
- <outcome value='SOTN'>
- <block atomic="true">
- <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
- <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/ietf-network:networks'`" />
- <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.user`" />
- <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.password`" />
- <parameter name="format" value="json"/>
- <parameter name="httpMethod" value="get"/>
- <parameter name="responsePrefix" value="topology"/>
- <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.onap.client.jks"/>
- <parameter name="trustStorePassword" value="adminadmin"/>
- <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/>
- <parameter name="keyStorePassword" value="adminadmin"/>
- <parameter name='customHttpHeaders' value="`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`" />
- <outcome value='success'>
- <block atomic="true"></block>
- </outcome>
- <outcome value='failure'>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error executing Create vpn rest api" />
- </return>
- </outcome>
- </execute>
- <for index='nidx' start='0' end='`$topology.networks.network_length`' >
- <block>
- <set>
- <parameter name='network.' value='`$topology.networks.network[$nidx].`' />
- </set>
- <call module='DataChange' rpc='update-network-to-aai' mode='sync' ></call>
- </block>
- </for>
- </block>
- </outcome>
- <outcome value='Other'>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'Unsupported type = ' + $prop.sdncRestApi.type`" />
- </return>
- </outcome>
- </switch>
- </block>
- </outcome>
- <outcome value='delete'>
- <block atomic="true"></block>
- </outcome>
- </switch>
- </block>
- </method>
-</service-logic>
+<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='DataChange' version='${project.version}'>
+ <method rpc='esr-thirdparty-sdnc-discovery' mode='sync'>
+ <block atomic="true">
+ <switch test="`$data-change-notification-input.aai-event-trigger`">
+ <outcome value='Update'>
+ <block>
+ <switch test="`$prop.sdncRestApi.type`">
+ <outcome value='SOTN'>
+ <block atomic="true">
+ <execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >
+ <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' />
+ <parameter name='contextPrefix' value='prop' />
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/actokentemplate.json'`" />
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/v2/tokens'`" />
+ <parameter name="format" value="json"/>
+ <parameter name="httpMethod" value="post"/>
+ <parameter name="responsePrefix" value="token-result"/>
+ <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.onap.client.jks"/>
+ <parameter name="trustStorePassword" value="adminadmin"/>
+ <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/>
+ <parameter name="keyStorePassword" value="adminadmin"/>
+ <outcome value='success'>
+ <set>
+ <parameter name='prop.sdncRestApi.token_id' value='`$token-result.data.token_id`' />
+ </set>
+ </outcome>
+ <outcome value='failure'>
+ <block></block>
+ </outcome>
+ </execute>
+ <switch test="`$prop.sdncRestApi.token_id`">
+ <outcome value=''>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/ietf-network:networks'`" />
+ <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.user`" />
+ <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.password`" />
+ <parameter name="format" value="json"/>
+ <parameter name="httpMethod" value="get"/>
+ <parameter name="responsePrefix" value="topology"/>
+ <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.onap.client.jks"/>
+ <parameter name="trustStorePassword" value="adminadmin"/>
+ <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/>
+ <parameter name="keyStorePassword" value="adminadmin"/>
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error executing Create vpn rest api" />
+ </return>
+ </outcome>
+ <outcome value='success'>
+ <block atomic="true">
+ <for index='nidx' start='0' end='`$topology.networks.network_length`' >
+ <block>
+ <set>
+ <parameter name='network.' value='`$topology.networks.network[$nidx].`' />
+ </set>
+ <call module='DataChange' rpc='update-network-to-aai' mode='sync' ></call>
+ </block>
+ </for>
+ </block>
+ </outcome>
+ </execute>
+ </outcome>
+ <outcome value='Other'>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/ietf-network:networks'`" />
+ <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.user`" />
+ <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.password`" />
+ <parameter name="format" value="json"/>
+ <parameter name="httpMethod" value="get"/>
+ <parameter name="responsePrefix" value="topology"/>
+ <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.onap.client.jks"/>
+ <parameter name="trustStorePassword" value="adminadmin"/>
+ <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/>
+ <parameter name="keyStorePassword" value="adminadmin"/>
+ <parameter name='customHttpHeaders' value="`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`" />
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error executing Create vpn rest api" />
+ </return>
+ </outcome>
+ <outcome value='success'>
+ <block atomic="true">
+ <for index='nidx' start='0' end='`$topology.networks.network_length`' >
+ <block>
+ <set>
+ <parameter name='network.' value='`$topology.networks.network[$nidx].`' />
+ </set>
+ <call module='DataChange' rpc='update-network-to-aai' mode='sync' ></call>
+ </block>
+ </for>
+ </block>
+ </outcome>
+ </execute>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='Other'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Unsupported type = ' + $prop.sdncRestApi.type`" />
+ </return>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='delete'>
+ <block atomic="true"></block>
+ </outcome>
+ </switch>
+ </block>
+ </method>
+</service-logic> \ No newline at end of file