View file |
---|
name | 5G - PNF Software Update.mp4 |
---|
height | 250 |
---|
|
Test Steps:
1. Set up SDNC sdnc_ansible_container:
- Prepare External Controller simulator ssh key file, put it under the contianer /opt/onap/ccsdk directory. You can download ssh key file from https://jira.onap.org/browse/CCSDK-464, and set permission to 0400.
- Replace /opt/onap/ccsdk/Playbooks/Ansible_Inventory, with the file of the same name under https://jira.onap.org/browse/CCSDK-464. Open the file and change ansible_ssh_private_key_file=ssh_key_file to ansible_ssh_private_key_file=/opt/onap/ccsdk/ssh_key_file
2. Set up SDNC sdnc_controller_container. Open /opt/onap/sdnc/data/properties/lcm-dg.properties and make the following changes:
lcm.pnf.upgrade-pre-check.playbookname=ansible_huawei_precheck
lcm.pnf.upgrade-post-check.playbookname=ansible_huawei_postcheck
lcm.pnf.upgrade-software.playbookname=ansible_huawei_upgrade
3. Login SDNC UI and do e2e tests of 3 LCM NB API
...
Test Cases Definitions
Test ID | Test Name | Test Description | Expected Results |
---|
T001 | upgrade-pre-check API | Use SDNC LCM API to POST /operations/LCM:upgrade-pre-check |
...
with the following request body: |
...
...
...
"timestamp": "2018-10-10T09:40:04.244Z", |
|
...
...
"originator-id": "664be3d2-6c12-4f4b-a3e7-c349acced203", |
|
...
"request-id":"664be3d2-6c12-4f4b-a3e7-c349acced203", |
|
...
...
...
...
...
...
...
"action": "UpgradePreCheck", |
|
...
...
...
...
"payload": "{\"pnf-flag\":\"true\", \"pnf-name\": \"5gDU0001\",\"pnfId\": \"5gDU0001\", \"ipaddress-v4-oam\": \"139.159.228.37\",\"oldSwVersion\": \"v1\", \"targetSwVersion\": \"v2\", \"ruleName\": \"r001\", \"Id\": \"10\", \"additionalData\":\"{}\"}"}} |
|
...
| Response status 400 |
T002 | upgrade-software API | Use SDNC LCM API to POST /operations/LCM:upgrade-software |
...
with the following request body: |
...
...
...
"timestamp": "2018-10-10T09:40:04.244Z", |
|
...
...
"originator-id": "664be3d2-6c12-4f4b-a3e7-c349acced203", |
|
...
"request-id":"664be3d2-6c12-4f4b-a3e7-c349acced203", |
|
...
...
...
...
...
...
...
"action": "UpgradeSoftware", |
|
...
...
...
...
"payload": "{\"pnf-flag\":\"true\", \"pnf-name\": \"5gDU0001\",\"pnfId\": \"5gDU0001\", \"ipaddress-v4-oam\": \"139.159.228.37\",\"oldSwVersion\": \"v1\", \"targetSwVersion\": \"v2\", \"Id\": \"10\", \"additionalData\":\"{}\"}"}} |
|
...
| Response status 400 |
T003 | upgrade-post-check API | Use SDNC LCM API to POST /operations/LCM:upgrade- |
...
software with the following request body: |
...
...
...
"timestamp": "2018-10-10T09:40:04.244Z", |
|
...
...
"originator-id": "664be3d2-6c12-4f4b-a3e7-c349acced203", |
|
...
"request-id":"664be3d2-6c12-4f4b-a3e7-c349acced203", |
|
...
...
...
...
...
...
...
"action": "UpgradePostCheck", |
|
...
...
...
...
"payload": "{\"pnf-flag\":\"true\", \"pnf-name\": \"5gDU0001\",\"pnfId\": \"5gDU0001\", \"ipaddress-v4-oam\": \"139.159.228.37\",\"oldSwVersion\": \"v1\", \"targetSwVersion\": \"v2\", \"ruleName\": \"r102\", \"Id\": \"10\", \"additionalData\":\"{}\"}"}}
|
| Response status 400 |
Test Case Recording
View file |
---|
name | 5G PNF Software Upgrade.mp4 |
---|
height | 250 |
---|
|
Test Setup
In the above 3 tests, if Response status code is 400, then it passes.this test setup, we just use Rancher node as external controller simulator and onap_dev as private key.
1. Set up SDNC sdnc-ansible-server container:
- Put onap_dev key file under the contianer /opt/onap/ccsdk directory and rename the file to ssh_key_file, and make sure file permission is 0400.
Replace /opt/onap/ccsdk/Playbooks/Ansible_inventory, with the file of the same name under https://jira.onap.org/browse/CCSDK-464. Open the file and change ansible_ssh_private_key_file=ssh_key_file to ansible_ssh_private_key_file=/opt/onap/ccsdk/ssh_key_file, and set external controller access info as following
Code Block |
---|
[host]
10.12.6.19 ansible_connection=ssh ansible_ssh_user=root ansible_ssh_private_key_file=/opt/onap/ccsdk/ssh_key_file |
Bump huawei playbook versions from 0.00 to 0.01 so they can be picked up by ansible server
Code Block |
---|
root@dev-sdnc-sdnc-ansible-server-8b58d86f5-vm6lj:/opt/onap/ccsdk/Playbooks# ls -alrt *huawei*
-rw-rw-r-- 1 root root 557 Nov 21 18:25 ansible_huawei_precheck@0.01.yml
-rw-rw-r-- 1 root root 550 Nov 21 18:25 ansible_huawei_upgrade@0.01.yml
-rw-rw-r-- 1 root root 559 Nov 21 18:25 ansible_huawei_postcheck@0.01.yml |
2. Set up SDNC controller sdnc container. To change file /opt/onap/sdnc/data/properties/lcm-dg.properties in the container, you need to edit pod properties with kubectl configmap dev-sdnc-sdnc-properties and make the following changes, or simply edit the resource file in sdnc charts and make all; make onap, then use helm to redeploy sdnc.
Code Block |
---|
lcm.pnf.upgrade-pre-check.playbookname=ansible_huawei_precheck
lcm.pnf.upgrade-post-check.playbookname=ansible_huawei_postcheck
lcm.pnf.upgrade-software.playbookname=ansible_huawei_upgrade |
3. On Rancher node, create swm directory under /root. Add 3 empty files in swm directory and make them executable as the following:
Code Block |
---|
root@sb00-rancher:~/swm# ls -l
total 0
-rwxr-xr-x 1 root root 0 Nov 29 17:16 upgrade-post-check.sh
-rwxr-xr-x 1 root root 0 Nov 29 17:16 upgrade-pre-check.sh
-rwxr-xr-x 1 root root 0 Nov 29 17:17 upgrade-software.sh |
4. Login SDNC API swagger page and run the tests of 3 LCM NB APIs as defined in test case definitions section.
- Login http://sdnc_ext_ip:30202/apidoc/explorer/index.html, credential: admin/Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U.
Test Status
Note: In integration lab testing, used the Rancher node as external controller simulator and ONAP onap_dev as the private key.
Test ID | Test Name | Test Status | Test Result | Pass/Fail |
---|
T001 | upgrade-pre-check API | Status |
---|
colour | Green |
---|
title | COMPLETED |
---|
|
| Response body has status code 400 | Pass |
T002 | upgrade-software API | Status |
---|
colour | Green |
---|
title | COMPLETED |
---|
|
| Response body has status code 400 | Pass |
T003 | upgrade-post-check API | Status |
---|
colour | Green |
---|
title | COMPLETED |
---|
|
| Response body has status code 400 | Pass |