diff options
author | Alexis de Talhouët <adetalhouet89@gmail.com> | 2019-05-17 09:15:49 -0400 |
---|---|---|
committer | Alexis de Talhouët <adetalhouet89@gmail.com> | 2019-05-17 17:48:51 +0000 |
commit | eeeaab5e03c72410c9607e00e90ddb09d6ec8a94 (patch) | |
tree | d1b2ff41561f34004ec4bc6406f74dd9ecebe5aa /platform-logic | |
parent | 56dbfc16ccc332a2f86fa93b83f3c79682edb69f (diff) |
Use CDS HTTP instead of gRPC
Change-Id: Id15af2a55b40a535836f8170973faf290ae88b18
Issue-ID: SDNC-768
Signed-off-by: Alexis de Talhouët <adetalhouet89@gmail.com>
Former-commit-id: 88efc22be9444a9a217d5e2ac87c9278d6e855d4
Diffstat (limited to 'platform-logic')
7 files changed, 51 insertions, 56 deletions
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_self-serve-pnf-ra-assignment.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_self-serve-pnf-ra-assignment.json index d2164e72..b483f84d 100644 --- a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_self-serve-pnf-ra-assignment.json +++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_self-serve-pnf-ra-assignment.json @@ -379,7 +379,7 @@ "id": "e221b302.f0199",
"type": "execute",
"name": "execute BlueprintProcessingClient",
- "xml": "<execute plugin='org.onap.ccsdk.sli.adaptors.grpc.cds.BlueprintProcessingClient' method='sendRequest'>\n <parameter name='blueprint_name' value='`$tmp.sdnc-model-name`' />\n <parameter name='blueprint_version' value='`$tmp.sdnc-model-version`' />\n <parameter name='action' value='`$action-name`' />\n <parameter name='mode' value='sync' />\n <parameter name='force' value='false' />\n <parameter name='ttl' value='0' />\n <parameter name='prefix' value='`$responsePrefix`' />\n <parameter name='payload' value=\"`'{\n "resource-assignment-request": {\n "template-prefix": [\n "' + $tmp.sdnc-artifact-name + '"\n ],\n "resource-assignment-properties": \n ' + $tmp.json-payload + '\n }\n}'`\"/>",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\r\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/cds-processor-payload.json'`\" />\r\n <parameter name='restapiUrl' value=\"`$prop.cds.url + '/api/v1/execution-service/process'`\" />\r\n <parameter name='restapiUser' value='`$prop.cds.user`' />\r\n <parameter name='restapiPassword' value='`$prop.cds.pwd`' />\r\n <parameter name='format' value='json' />\r\n <parameter name='httpMethod' value='POST' />\r\n <parameter name=\"responsePrefix\" value=\"`$responsePrefix`\" />",
"comments": "",
"outputs": 1,
"x": 463.33331298828125,
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_self-serve-vfmodule-ra-assignment.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_self-serve-vfmodule-ra-assignment.json index 9f86a0e4..5d4d6e05 100644 --- a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_self-serve-vfmodule-ra-assignment.json +++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_self-serve-vfmodule-ra-assignment.json @@ -252,7 +252,7 @@ "id": "7f7fcb9e.5c0444", "type": "set", "name": "set configAssignment JsonString", - "xml": "<set>\n\t<parameter name=\"tmp.config-name-value-payload4\" value=\"`$tmp.config-name-value-other-payload + '"service-instance-id":"' + $vf-module-topology-operation-input.service-information.service-instance-id + '",'`\"/>\n\t<parameter name=\"tmp.config-name-value-payload5\" value=\"`$tmp.config-name-value-payload4 + '"vnf-id":"' + $vf-module-topology-operation-input.vnf-information.vnf-id + '",'`\"/>\n\t<parameter name=\"tmp.config-name-value-payload6\" value=\"`$tmp.config-name-value-payload5 + '"vf-module-model-customization-uuid":"' + $vf-module-topology-operation-input.vf-module-information.onap-model-information.model-customization-uuid + '",'`\"/>\n\t<parameter name=\"tmp.config-name-value-payload7\" value=\"`$tmp.config-name-value-payload6 + '"vnf-model-customization-uuid":"' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-information.onap-model-information.model-customization-uuid + '",'`\"/>\n\t<parameter name=\"tmp.config-name-value-payload8\" value=\"`$tmp.config-name-value-payload7 + '"vf-module-id":"' + $vf-module-topology-operation-input.vf-module-information.vf-module-id + '",'`\"/>\n\t<parameter name=\"tmp.config-name-value-payload9\" value=\"`$tmp.config-name-value-payload8 + '"aic-cloud-region":"' + $vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region + '"'`\"/>\n\t<parameter name=\"tmp.config-name-value-payload91\" value=\"`'{' + $tmp.config-name-value-payload9 + '}'`\" />\n\t\n", + "xml": "<set>\n\t<parameter name=\"tmp.config-name-value-payload4\" value=\"`$tmp.config-name-value-other-payload + '"service-instance-id":"' + $vf-module-topology-operation-input.service-information.service-instance-id + '",'`\"/>\n\t<parameter name=\"tmp.config-name-value-payload5\" value=\"`$tmp.config-name-value-payload4 + '"vnf-id":"' + $vf-module-topology-operation-input.vnf-information.vnf-id + '",'`\"/>\n\t<parameter name=\"tmp.config-name-value-payload6\" value=\"`$tmp.config-name-value-payload5 + '"vf-module-model-customization-uuid":"' + $vf-module-topology-operation-input.vf-module-information.onap-model-information.model-customization-uuid + '",'`\"/>\n\t<parameter name=\"tmp.config-name-value-payload7\" value=\"`$tmp.config-name-value-payload6 + '"vnf-model-customization-uuid":"' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-information.onap-model-information.model-customization-uuid + '",'`\"/>\n\t<parameter name=\"tmp.config-name-value-payload8\" value=\"`$tmp.config-name-value-payload7 + '"vf-module-id":"' + $vf-module-topology-operation-input.vf-module-information.vf-module-id + '",'`\"/>\n\t<parameter name=\"tmp.config-name-value-payload9\" value=\"`$tmp.config-name-value-payload8 + '"aic-cloud-region":"' + $vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region + '"'`\"/>\n\t<parameter name=\"tmp.json-payload\" value=\"`'{' + $tmp.config-name-value-payload9 + '}'`\" />\n\t\n", "comments": "", "x": 371, "y": 708, @@ -263,7 +263,7 @@ "id": "eb354f8e.b9f91", "type": "execute", "name": "execute BlueprintProcessingClient", - "xml": "<execute plugin='org.onap.ccsdk.sli.adaptors.grpc.cds.BlueprintProcessingClient' method='sendRequest' >\n <parameter name='blueprint_name' value='`$tmp.sdnc-model-name`' />\n <parameter name='blueprint_version' value='`$tmp.sdnc-model-version`' />\n <parameter name='action' value='`$action-name`' />\n <parameter name='mode' value='sync' />\n <parameter name='force' value='false' />\n <parameter name='ttl' value='0' />\n <parameter name='prefix' value='`$responsePrefix`' />\n <parameter name='payload' value=\"`'{\n "resource-assignment-request": {\n "template-prefix": [\n "' + $tmp.vf-module-label + '"\n ],\n "resource-assignment-properties": \n ' + $tmp.config-name-value-payload91 + '\n }\n}'`\"/>", + "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\r\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/cds-processor-payload.json'`\" />\r\n <parameter name='restapiUrl' value=\"`$prop.cds.url + '/api/v1/execution-service/process'`\" />\r\n <parameter name='restapiUser' value='`$prop.cds.user`' />\r\n <parameter name='restapiPassword' value='`$prop.cds.pwd`' />\r\n <parameter name='format' value='json' />\r\n <parameter name='httpMethod' value='POST' />\r\n <parameter name=\"responsePrefix\" value=\"`$responsePrefix`\" />", "comments": "", "outputs": 1, "x": 385.33331298828125, diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_self-serve-vnf-ra-assignment.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_self-serve-vnf-ra-assignment.json index 97111877..4bede874 100644 --- a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_self-serve-vnf-ra-assignment.json +++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_self-serve-vnf-ra-assignment.json @@ -379,7 +379,7 @@ "id": "91dde7fd.fe86a", "type": "execute", "name": "execute BlueprintProcessingClient", - "xml": "<execute plugin='org.onap.ccsdk.sli.adaptors.grpc.cds.BlueprintProcessingClient' method='sendRequest'>\n <parameter name='blueprint_name' value='`$tmp.sdnc-model-name`' />\n <parameter name='blueprint_version' value='`$tmp.sdnc-model-version`' />\n <parameter name='action' value='`$action-name`' />\n <parameter name='mode' value='sync' />\n <parameter name='force' value='false' />\n <parameter name='ttl' value='0' />\n <parameter name='prefix' value='`$responsePrefix`' />\n <parameter name='payload' value=\"`'{\n "resource-assignment-request": {\n "template-prefix": [\n "' + $tmp.sdnc-artifact-name + '"\n ],\n "resource-assignment-properties": \n ' + $tmp.json-payload + '\n }\n}'`\"/>", + "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\r\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/cds-processor-payload.json'`\" />\r\n <parameter name='restapiUrl' value=\"`$prop.cds.url + '/api/v1/execution-service/process'`\" />\r\n <parameter name='restapiUser' value='`$prop.cds.user`' />\r\n <parameter name='restapiPassword' value='`$prop.cds.pwd`' />\r\n <parameter name='format' value='json' />\r\n <parameter name='httpMethod' value='POST' />\r\n <parameter name=\"responsePrefix\" value=\"`$responsePrefix`\" />", "comments": "", "outputs": 1, "x": 449.33331298828125, diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-pnf-ra-assignment.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-pnf-ra-assignment.xml index fb782ada..cbc78c8a 100644 --- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-pnf-ra-assignment.xml +++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-pnf-ra-assignment.xml @@ -100,23 +100,14 @@ <parameter name="logger" value="message-log"/>
<parameter name="field1" value="BEFORE BlueprintProcessingClient"/>
</record>
- <execute plugin='org.onap.ccsdk.sli.adaptors.grpc.cds.BlueprintProcessingClient' method='sendRequest'>
- <parameter name='blueprint_name' value='`$tmp.sdnc-model-name`' />
- <parameter name='blueprint_version' value='`$tmp.sdnc-model-version`' />
- <parameter name='action' value='`$action-name`' />
- <parameter name='mode' value='sync' />
- <parameter name='force' value='false' />
- <parameter name='ttl' value='0' />
- <parameter name='prefix' value='`$responsePrefix`' />
- <parameter name='payload' value="`'{
- "resource-assignment-request": {
- "template-prefix": [
- "' + $tmp.sdnc-artifact-name + '"
- ],
- "resource-assignment-properties":
- ' + $tmp.json-payload + '
- }
-}'`"/>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name='templateFileName' value="`$prop.restapi.templateDir + '/cds-processor-payload.json'`" />
+ <parameter name='restapiUrl' value="`$prop.cds.url + '/api/v1/execution-service/process'`" />
+ <parameter name='restapiUser' value='`$prop.cds.user`' />
+ <parameter name='restapiPassword' value='`$prop.cds.pwd`' />
+ <parameter name='format' value='json' />
+ <parameter name='httpMethod' value='POST' />
+ <parameter name="responsePrefix" value="`$responsePrefix`" />
<outcome value='failure'>
<return status='failure'>
<parameter name='ack-final' value='Y'/>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vfmodule-ra-assignment.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vfmodule-ra-assignment.xml index 1553f977..5b30bba8 100644 --- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vfmodule-ra-assignment.xml +++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vfmodule-ra-assignment.xml @@ -119,29 +119,20 @@ <parameter name="tmp.config-name-value-payload7" value="`$tmp.config-name-value-payload6 + '"vnf-model-customization-uuid":"' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-information.onap-model-information.model-customization-uuid + '",'`"/>
<parameter name="tmp.config-name-value-payload8" value="`$tmp.config-name-value-payload7 + '"vf-module-id":"' + $vf-module-topology-operation-input.vf-module-information.vf-module-id + '",'`"/>
<parameter name="tmp.config-name-value-payload9" value="`$tmp.config-name-value-payload8 + '"aic-cloud-region":"' + $vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region + '"'`"/>
- <parameter name="tmp.config-name-value-payload91" value="`'{' + $tmp.config-name-value-payload9 + '}'`" />
+ <parameter name="tmp.json-payload" value="`'{' + $tmp.config-name-value-payload9 + '}'`" />
</set>
<record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
<parameter name="logger" value="message-log"/>
<parameter name="field1" value="BEFORE BlueprintProcessingClient"/>
</record>
- <execute plugin='org.onap.ccsdk.sli.adaptors.grpc.cds.BlueprintProcessingClient' method='sendRequest' >
- <parameter name='blueprint_name' value='`$tmp.sdnc-model-name`' />
- <parameter name='blueprint_version' value='`$tmp.sdnc-model-version`' />
- <parameter name='action' value='`$action-name`' />
- <parameter name='mode' value='sync' />
- <parameter name='force' value='false' />
- <parameter name='ttl' value='0' />
- <parameter name='prefix' value='`$responsePrefix`' />
- <parameter name='payload' value="`'{
- "resource-assignment-request": {
- "template-prefix": [
- "' + $tmp.vf-module-label + '"
- ],
- "resource-assignment-properties":
- ' + $tmp.config-name-value-payload91 + '
- }
-}'`"/>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name='templateFileName' value="`$prop.restapi.templateDir + '/cds-processor-payload.json'`" />
+ <parameter name='restapiUrl' value="`$prop.cds.url + '/api/v1/execution-service/process'`" />
+ <parameter name='restapiUser' value='`$prop.cds.user`' />
+ <parameter name='restapiPassword' value='`$prop.cds.pwd`' />
+ <parameter name='format' value='json' />
+ <parameter name='httpMethod' value='POST' />
+ <parameter name="responsePrefix" value="`$responsePrefix`" />
<outcome value='failure'>
<return status='failure'>
<parameter name='ack-final' value='Y'/>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vnf-ra-assignment.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vnf-ra-assignment.xml index 2834e11f..c65b7c03 100644 --- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vnf-ra-assignment.xml +++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vnf-ra-assignment.xml @@ -100,23 +100,14 @@ <parameter name="logger" value="message-log"/>
<parameter name="field1" value="BEFORE BlueprintProcessingClient"/>
</record>
- <execute plugin='org.onap.ccsdk.sli.adaptors.grpc.cds.BlueprintProcessingClient' method='sendRequest'>
- <parameter name='blueprint_name' value='`$tmp.sdnc-model-name`' />
- <parameter name='blueprint_version' value='`$tmp.sdnc-model-version`' />
- <parameter name='action' value='`$action-name`' />
- <parameter name='mode' value='sync' />
- <parameter name='force' value='false' />
- <parameter name='ttl' value='0' />
- <parameter name='prefix' value='`$responsePrefix`' />
- <parameter name='payload' value="`'{
- "resource-assignment-request": {
- "template-prefix": [
- "' + $tmp.sdnc-artifact-name + '"
- ],
- "resource-assignment-properties":
- ' + $tmp.json-payload + '
- }
-}'`"/>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name='templateFileName' value="`$prop.restapi.templateDir + '/cds-processor-payload.json'`" />
+ <parameter name='restapiUrl' value="`$prop.cds.url + '/api/v1/execution-service/process'`" />
+ <parameter name='restapiUser' value='`$prop.cds.user`' />
+ <parameter name='restapiPassword' value='`$prop.cds.pwd`' />
+ <parameter name='format' value='json' />
+ <parameter name='httpMethod' value='POST' />
+ <parameter name="responsePrefix" value="`$responsePrefix`" />
<outcome value='failure'>
<return status='failure'>
<parameter name='ack-final' value='Y'/>
diff --git a/platform-logic/restapi-templates/src/main/json/cds-processor-payload.json b/platform-logic/restapi-templates/src/main/json/cds-processor-payload.json new file mode 100644 index 00000000..13aa57c1 --- /dev/null +++ b/platform-logic/restapi-templates/src/main/json/cds-processor-payload.json @@ -0,0 +1,22 @@ +{ + "commonHeader": { + "originatorId": "SDNC_DG", + "requestId": ${request-id}, + "subRequestId": ${resource-id} + }, + "actionIdentifiers": { + "blueprintName": ${tmp.sdnc-model-name}, + "blueprintVersion": ${tmp.sdnc-model-version}, + "actionName": ${action-name}, + "mode": "sync" + }, + "payload": { + "resource-assignment-request": { + "template-prefix": [ + ${tmp.sdnc-artifact-name} + ], + "resource-assignment-properties": + ${tmp.json-payload} + } + } +}
\ No newline at end of file |