Pre-conditions | Testing Steps | Test Command |
---|
curl -s -u "InfraPortalClient:password1$" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-ONAP-RequestID: a903813b-b9d7-446f-a9dd-1bfb7c8d4228" -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 request body |
---|
{ "requestDetails": { "modelInfo": { "modelUuid": "296d49aa-236a-4920-a395-5620df09e765" }, "requestInfo": { "instanceName": "453b15b7-55c2-4f82-b80d-0218abf2b573" }, "requestParameters": { "userParams": [ { "name": "pnfName", "value": "5gDU0001" }, { "name": "targetSoftwareVersion", "value": "v2" } ], "payload": "{\"ipaddressV4Oam\": \"ems-swm\", \"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\"}" } } } |
Conclusion (Pass/Fail)H "X-ONAP-RequestID: 2cd4a080-88c0-4de3-9255-1560468f5df9" -H "X-ONAP-PartnerName: SO-REST" -H "X-RequestorID: so-rest" -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\": \"{}\", \"postCheckPlaybook\": \"ansible_huawei_postcheck\"}" } }, "instanceReferences": { "serviceInstanceId": "25c651cb-4ddb-4755-9aea-42e36ea34442" }, "requestStatus": { "requestState": "COMPLETED", "statusMessage": "STATUS: PNF has been upgraded successfully.", "percentProgress": 100, "timestamp": "Sun, 22 Mar 2020 12:43:06 GMT" } } } |
While the requestStatus is "COMPLETED", then retrieve the Sw Version of PNF 5gDU0001 in AAI: Command |
---|
curl -s -k -u "AAI:AAI" -H "X-FromAppId: aairest" -H "X-TransactionId: 1001" -H "Content-Type: application/json" -H "Accept: application/json" -X GET https://aai.onap:30233/aai/v19/network/pnfs/pnf/5gDU0001 | python -m json.tool |
Response of retrieving AAI: |
---|
{ "pnf-name": "5gDU0001", "pnf-id": "5gDU0001", "ipaddress-v4-oam": "192.168.35.83", "sw-version": "v2", "in-maint": false, "resource-version": "1584880971237" } |
The Sw Version of PNF 5gDU0001 in AAI is upgrade to "v2".
|