Testing Steps | NOTE: Befor testing this case, reset the EMS Simulator to initial status.
Test Command |
---|
curl -s -u "InfraPortalClient:password1$" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-ONAP-RequestID: 2cd4a080-88c0-4de3-9255-1560468f5df9" -H "X-ONAP-PartnerName: SO-REST" -H "X-RequestorID: so-rest" -X POST http://so.onap:30277/onap/so/infra/instanceManagement/v1/serviceInstances/25c651cb-4ddb-4755-9aea-42e36ea34442/pnfs/5gDU0001/workflows/245a0bca-3816-45c6-9270-1de25d27fc56 -d @PNFSoftwareUpgrade-sdnc.json | python -m json.tool |
Contents of PNFSoftwareUpgrade-sdnc.json |
---|
{ "requestDetails": { "modelInfo": { "modelUuid": "296d49aa-236a-4920-a395-5620df09e765" }, "requestInfo": { "instanceName": "TestPnfSwUp01" }, "requestParameters": { "userParams": [ { "name": "pnfName", "value": "5gDU0001" }, { "name": "targetSoftwareVersion", "value": "v2" } ], "payload": "{\"ipaddressV4Oam\": \"192.168.35.83\", \"oldSwVersion\": \"v1\", \"preCheckRuleName\": \"r101\", \"preCheckAdditionalData\": \"{}\", \"preCheckPlaybook\": \"ansible_huawei_precheck\", \"swToBeDownloaded\": [{\"swLocation\": \"http://192.168.35.96:10080/ran_du_pkg1-v2.zip\", \"swFileSize\": 353, \"swFileCompression\": \"ZIP\", \"swFileFormat\": \"binary\"}], \"downloadNESwPlaybook\": \"ansible_huawei_downloadnesw\", \"activateNESwPlaybook\": \"ansible_huawei_activatenesw\", \"postCheckRuleName\": \"r102\", \"postCheckAdditionalData\": \"{}\", \"postCheckPlaybook\": \"ansible_huawei_postcheck\"}" } } } |
Response of SO |
---|
{ "requestReferences": { "requestId": "2cd4a080-88c0-4de3-9255-1560468f5df9", "instanceId": "5gDU0001", "requestSelfLink": "http://so.onap:30277/orchestrationRequests/v1/2cd4a080-88c0-4de3-9255-1560468f5df9" } } |
Retrieve the status of the workflow: Test Command |
---|
curl -s -u "InfraPortalClient:password1$" -H "Accept: application/json" -X GET http://so.onap:30277/onap/so/infra/orchestrationRequests/v7/2cd4a080-88c0-4de3-9255-1560468f5df9 | python -m json.tool |
Status of the workflow |
---|
{ "request": { "requestId": "2cd4a080-88c0-4de3-9255-1560468f5df9", "startTime": "Sun, 22 Mar 2020 12:42:05 GMT", "requestScope": "pnf", "requestType": "forCustomWorkflow", "requestDetails": { "modelInfo": { "modelId": "296d49aa-236a-4920-a395-5620df09e765", "modelUuid": "296d49aa-236a-4920-a395-5620df09e765" }, "requestInfo": { "source": null, "instanceName": "TestPnfSwUp01", "suppressRollback": false }, "requestParameters": { "userParams": [ { "name": "pnfName", "value": "5gDU0001" }, { "name": "targetSoftwareVersion", "value": "v2" } ], "payload": "{\"ipaddressV4Oam\": \"192.168.35.83\", \"oldSwVersion\": \"v1\", \"preCheckRuleName\": \"r101\", \"preCheckAdditionalData\": \"{}\", \"preCheckPlaybook\": \"ansible_huawei_precheck\", \"swToBeDownloaded\": [{\"swLocation\": \"http://192.168.35.96:10080/ran_du_pkg1-v2.zip\", \"swFileSize\": 353, \"swFileCompression\": \"ZIP\", \"swFileFormat\": \"binary\"}], \"downloadNESwPlaybook\": \"ansible_huawei_downloadnesw\", \"activateNESwPlaybook\": \"ansible_huawei_activatenesw\", \"postCheckRuleName\": \"r102\", \"postCheckAdditionalData\": \"{}\", \"postCheckPlaybook\": \"ansible_huawei_postcheck\"}" } }, "instanceReferences": { "serviceInstanceId": "25c651cb-4ddb-4755-9aea-42e36ea34442" }, "requestStatus": { "requestState": "IN_PROGRESS", "timestamp": "Sun, 22 Mar 2020 12:42:05 GMT" } } } |
While the requestStatus is "IN_PROGRESS", then wait a minute to retrieve the status of workflow again and agiain, until the requestStatus is "COMPLETED": Status of the workflow |
---|
{ "request": { "requestId": "2cd4a080-88c0-4de3-9255-1560468f5df9", "startTime": "Sun, 22 Mar 2020 12:42:05 GMT", "requestScope": "pnf", "requestType": "forCustomWorkflow", "requestDetails": { "modelInfo": { "modelId": "296d49aa-236a-4920-a395-5620df09e765", "modelUuid": "296d49aa-236a-4920-a395-5620df09e765" }, "requestInfo": { "source": null, "instanceName": "TestPnfSwUp01", "suppressRollback": false }, "requestParameters": { "userParams": [ { "name": "pnfName", "value": "5gDU0001" }, { "name": "targetSoftwareVersion", "value": "v2" } ], "payload": "{\"ipaddressV4Oam\": \"192.168.35.83\", \"oldSwVersion\": \"v1\", \"preCheckRuleName\": \"r101\", \"preCheckAdditionalData\": \"{}\", \"preCheckPlaybook\": \"ansible_huawei_precheck\", \"swToBeDownloaded\": [{\"swLocation\": \"http://192.168.35.96:10080/ran_du_pkg1-v2.zip\", \"swFileSize\": 353, \"swFileCompression\": \"ZIP\", \"swFileFormat\": \"binary\"}], \"downloadNESwPlaybook\": \"ansible_huawei_downloadnesw\", \"activateNESwPlaybook\": \"ansible_huawei_activatenesw\", \"postCheckRuleName\": \"r102\", \"postCheckAdditionalData\": \"{}\", \" |
|