5G - PNF SW Upgrade (Casablanca carry-over items)

5G - PNF SW Upgrade (Casablanca carry-over items)

This is a continuation of the use case started in Casablanca: 5G - PNF Software Update

 

Background (R3 Casablanca)

In Casablanca,  the UC leveraged the Ansible adaptor of ONAP controller to implement three S/W upgrade related operations for 5G PNFs. As an important feature the new workflow supports an External Controller (EC) in the execution of these operations. All these operations  have shared the same LCM APIs with VNF S/W upgrade with PNF specific parameters passed in the API payloads. The corresponding DGs of LCM APIs are updated. The operations are:

  • /operations/LCM:upgrade-pre-check

  • /operations/LCM:upgrade-software

  • /operations/LCM:upgrade-post-check

Dublin Scope

For Dublin, the target of this UC includes:

  • 3GPP Software Management API alignment

    • South-bound of SDNC: Extend upgrade-software operation by leveraging sub-operations from 3GPP (like download/install/activate).

    • North-bound of SDNC: Rollback/fallback API support for 5G PNF

  • Workflow support for PNF in-place SW upgrade in SO (stretch goal)

 

Presentations and Discussion Slides:

Related Meeting Links

Development Status

Proposed Dublin scope presented Dec 20, 2018 to the 5G UC meeting.

Project

PTL/Contancts

JIRA

Description

Status

Project

PTL/Contancts

JIRA

Description

Status

APPC

SDNC

CCSDK

@Takamune Cho

@Dan Timoney

 

  1. Support vendor-specific mapping of upgrade APIs to NETCONF requests in addition to other options.

  2. Support of roll-back API for PNF, New DG needed. Impact to SO building blocks and SDNC.

  3. LCM API payload  and playbook enhancements for S/W upgrade for alignment with 3GPP S/W management APIs in ansible playbooks

  4. PNF S/W upgrade workflow design and test (Stretch goal)

 

VF-C

@Yan Yang

@Xiang Li[CMCC]

 

No Impact

 

SO

VID

@Seshu Kumar Mudiganti

@ittay

 

  1. Provide re-usable workflows and building blocks for PNF SW upgrade

  2. Trigger upgrade workflow from GUI

 

Integration

@Yang Xu

 

No impact

 

External Controller

@Enbo Wang

@wangyaoguang

 

Support for 3GPP API calls for sw download, install and activate.

 

Project Impacts

Description

JIRA Links

SDNC/CCSDK

Add SDNC LCM action - rollback

SDNC-664: Add SDNC LCM action - upgrade rollback Closed 

Complete rollback LCM action for PNF S/W upgrade

SDNC-669: complete rollback LCM action for PNF S/W upgradeClosed

Create a DG for PNF S/W upgrade

SDNC-670: create a DG for PNF S/W rollback rpcClosed

Provide corresponding Ansible playbook for rollback operation

SDNC-671: provide corresponding ansible playbook for rollback operationClosed

Extend PNF upgrade-software operation by leveraging sub-operations from 3GPP (like downloadNESw/installNESw/activateNESw)

SDNC-677: Extend PNF upgrade-software operation by leveraging sub-operations from 3GPP (like download/install/activate)Closed

External   Controller

Support swFallback/downloadNESw/installNESw/activateNESw operations

NA

Requirements Impact

CCSDK → Changes in lcm.yang file

SDN-C → (1) New ansible playbooks, (2) New DG for rollback

EC → New substeps such as sw download, install and activate

API Changes

  • Yang model changes to current LCM:rollback action in CCSDK (mandatory fields in rollback action will be optional to make the LCM:rollback action more generic, optional output payload field is added)

  • Definition of rollback input and output payloads for 5G PNF specific rollback

  • Possible payload changes into existing API /operations/LCM:upgrade-software

  • sw download, install and activate APIs in southbound of SDNC (to EC) as part of Ansible playbook for LCM:upgrade-software API.

API Details

(1) Provided by SDN-C/CCSDK:

LCM API Abbre.

HTTP Method

URI

Yang Model Section

Request Example

Response Example

LCM API Abbre.

HTTP Method

URI

Yang Model Section

Request Example

Response Example

rollback

Post

/operations/LCM:rollback

400: Success

precheck*

/operations/LCM:upgrade-pre-check

400: Success

postcheck*

/operations/LCM:upgrade-post-check

400: Success

upgrade-software*

/operations/LCM:upgrade-software

400: Success

*: These lcm APIs inherit from R3.

The grammar of filter parameter of rollback API is JsonPath.

New optional parameters of payload for request of upgrade-software API:

  • swToBeDownloaded: Used to substitute the targetSwVersion parameter for aligning with 3GPP operation.

  • neIdentifier: Used to substitute the pnfId parameter for aligning with 3GPP operation.

  • swToBeInstalled: Used to manually specify the software to be installed for aligning with 3GPP operation.

  • swVersionToBeActivated: Used to manually specify the software version to be activated for aligning with 3GPP operation.

(2) Provided by External Controller.

 

Test Cases and Status

Master Integration Test Page: Dublin Release Integration Testing Status

#

Test Case Description

Test Status

#

Test Case Description

Test Status

1 PreCheck test

Ensure LCM:upgrade-pre-check can be executed (north-bound of SDNC)

PASS

2 SwUpgrade test

Ensure LCM:upgrade-software can be executed (north-bound of SDNC)

PASS

3 PostCheck test

Ensure LCM:upgrade-post-check can be executed (north-bound of SDNC)

PASS

4 SwRollback test

Ensure LCM:rollback can be executed (north-bound of SDNC)

PASS

5 SwDownload

Ensure software download API can be executed (south-bound of SDNC to EC)

PASS

6 SwInstall

Ensure software install API can be executed (south-bound of SDNC to EC)

PASS

7 SwActivate

Ensure software activate API can be executed (south-bound of SDNC to EC)

PASS

Test Details

Preparation

1.  Modify the file /opt/onap/sdnc/data/properties/lcm-dg.properties in sdnc container as follows:

-lcm.pnf.upgrade-pre-check.playbookname=ansible_precheck_pnf
-lcm.pnf.upgrade-post-check.playbookname=ansible_postcheck_pnf
-lcm.pnf.upgrade-software.playbookname=ansible_upgradesw_pnf
-lcm.pnf.rollback.playbookname=ansible_rollback_pnf
+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
+lcm.pnf.rollback.playbookname=ansible_huawei_rollback

And then restart the sdnc container.

2.  Add the following line in the file in /opt/ansible-server/Playbooks/Ansible_inventory in ansible-server container:

192.168.35.83 ansible_connection=ssh ansible_ssh_user=ubuntu ansible_ssh_private_key_file=/home/ansible/.ssh/ssh_key_file

Where ssh_key_file is private key of SSH user ubuntu at host 192.168.35.83.

Host 192.168.35.83 is the EMS Simulator.

3. Add topics SDNC-LCM-READ  and SDNC-LCM-WRITE to DMaaP if they don't exist.

Login Message Router container, and run the following commands:

cd /opt/kafka/bin

./kafka-topics.sh --zookeeper message-router-zookeeper:2181 --create --topic SDNC-LCM-READ --partitions 1 --replication-factor 1 --if-not-exists

./kafka-topics.sh --zookeeper message-router-zookeeper:2181 --create --topic SDNC-LCM-WRITE --partitions 1 --replication-factor 1 --if-not-exists

 

Test Result 1: Using DMaaP Listener

Test Case ID

UpgradePreCheck1

Test Case ID

UpgradePreCheck1

Test Case Name

Verify UpgradePreCheck API of SDNC

Release

Dublin

Pre-conditions

Initial State

Testing Steps

1. Go to terminal 1:

Run command:

curl -s -X GET http://mr.api.simpledemo.onap.org:3904/events/SDNC-LCM-WRITE/pnftesters/test01?timeout=90000 | python -m json.tool

2. Go to terminal 2:

Run command:

curl -H "Content-Type: application/json" -X POST http://mr.api.simpledemo.onap.org:3904/events/SDNC-LCM-READ -d @upgrade-pre-check-input.json

The content of file upgrade-pre-check-input.json is as follows:

{
"version": "1.0",
"cambria.partition": "MSO",
"correlation-id": "7ba9941f-08d8-4e7f-94a3-0ac8409a8ca9",
"rpc-name": "upgrade-pre-check",
"type": "request",
"body": {
"input": {
"action": "UpgradePreCheck",
"action-identifiers": {
"vnf-id": "5gDU0001"
},
"common-header": {
"api-ver": "2.00",
"flags": {
"force": "FALSE",
"mode": "NORMAL",
"ttl": 65000
},
"originator-id": "MSO",
"request-id": "d0f40a8b-f5bf-4289-b043-4e01cd0a9c32",
"sub-request-id": "d0f40a8b-f5bf-4289-b043-4e01cd0a9c32",
"timestamp": "2019-03-15T10:17:29.155Z"
},
"payload": "{\"pnf-flag\":\"true\", \"pnf-name\": \"5gDU0001\",\"pnfId\": \"5gDU0001\", \"ipaddress-v4-oam\": \"192.168.35.83\",\"oldSwVersion\": \"v1\", \"targetSwVersion\": \"v2\", \"ruleName\": \"r001\", \"Id\": \"10\", \"additionalData\":\"{}\"}"
}
}
}

3. Back to terminal 1, and wait a minute to get the output:

[
"{\"cambria.partition\":\"MSO\",\"correlation-id\":\"d0f40a8b-f5bf-4289-b043-4e01cd0a9c32-d0f40a8b-f5bf-4289-b043-4e01cd0a9c32\",\"type\":\"response\",\"body\":{\"output\":{\"payload\":\"{\\\"result\\\": \\\"Success\\\"}\",\"common-header\":{\"flags\":{\"mode\":\"NORMAL\",\"force\":\"FALSE\",\"ttl\":\"65000\"},\"api-ver\":\"2.00\",\"originator-id\":\"MSO\",\"sub-request-id\":\"d0f40a8b-f5bf-4289-b043-4e01cd0a9c32\",\"request-id\":\"d0f40a8b-f5bf-4289-b043-4e01cd0a9c32\",\"timestamp\":\"2019-03-15T10:17:29.155Z\"},\"status\":{\"code\":\"400\",\"message\":\"Ansible Request f8235f64-cf28-4e05-9b23-6b6df56db7ec finished with Result = success, Message = FINISHED\"}}},\"version\":\"1.0\",\"rpc-name\":\"upgrade-pre-check\"}"
]

Conclusion (Pass /Fail)

PASS

 

Test Case ID

UpgradeSoftware1

Test Case ID

UpgradeSoftware1

Test Case Name

Verify UpgradeSoftware API of SDNC

Release

Dublin

Pre-conditions

PreChecked

Testing Steps

1. Go to terminal 1:

Run command:

curl -s -X GET http://mr.api.simpledemo.onap.org:3904/events/SDNC-LCM-WRITE/pnftesters/test01?timeout=90000 | python -m json.tool

2. Go to terminal 2:

Run command:

curl -H "Content-Type: application/json" -X POST http://mr.api.simpledemo.onap.org:3904/events/SDNC-LCM-READ -d @upgrade-software-input.json

The content of file upgrade-software-input.json is as follows:

{
"version": "1.0",
"cambria.partition": "MSO",
"correlation-id": "7ba9941f-08d8-4e7f-94a3-0ac8409a8ca9",
"rpc-name": "upgrade-software",
"type": "request",
"body": {
"input": {
"action": "UpgradeSoftware",
"action-identifiers": {
"vnf-id": "5gDU0001"
},
"common-header": {
"api-ver": "2.00",
"flags": {
"force": "FALSE",
"mode": "NORMAL",
"ttl": 65000
},
"originator-id": "MSO",
"request-id": "d0f40a8b-f5bf-4289-b043-4e01cd0a9c32",
"sub-request-id": "d0f40a8b-f5bf-4289-b043-4e01cd0a9c32",
"timestamp": "2019-03-15T10:17:29.155Z"
},
"payload": "{\"pnf-flag\":\"true\", \"pnfId\": \"5gDU0001\", \"ipaddress-v4-oam\": \"192.168.35.83\", \"targetSwVersion\": \"\\\\'[{\\\\\\\"swLocation\\\\\\\": \\\\\\\"http://192.168.35.96:10080/ran_du_pkg1-v2.zip\\\\\\\", \\\\\\\"swFileSize\\\\\\\": 353, \\\\\\\"swFileCompression\\\\\\\": \\\\\\\"ZIP\\\\\\\", \\\\\\\"swFileFormat\\\\\\\": \\\\\\\"zip\\\\\\\"}, {\\\\\\\"swLocation\\\\\\\": \\\\\\\"http://192.168.35.96:10080/ran_du_pkg2-v2.zip\\\\\\\", \\\\\\\"swFileSize\\\\\\\": 353, \\\\\\\"swFileCompression\\\\\\\": \\\\\\\"ZIP\\\\\\\", \\\\\\\"swFileFormat\\\\\\\": \\\\\\\"zip\\\\\\\"}]\\\\'\"}"
}
}
}

3. Back to terminal 1, and wait a minute to get the output:

[
"{\"cambria.partition\":\"MSO\",\"correlation-id\":\"d0f40a8b-f5bf-4289-b043-4e01cd0a9c32-d0f40a8b-f5bf-4289-b043-4e01cd0a9c32\",\"type\":\"response\",\"body\":{\"output\":{\"payload\":\"{\\\"result\\\": \\\"Success\\\"}\",\"common-header\":{\"flags\":{\"mode\":\"NORMAL\",\"force\":\"FALSE\",\"ttl\":\"65000\"},\"api-ver\":\"2.00\",\"originator-id\":\"MSO\",\"sub-request-id\":\"d0f40a8b-f5bf-4289-b043-4e01cd0a9c32\",\"request-id\":\"d0f40a8b-f5bf-4289-b043-4e01cd0a9c32\",\"timestamp\":\"2019-03-15T10:17:29.155Z\"},\"status\":{\"code\":\"400\",\"message\":\"Ansible Request bf84dd42-162c-470d-b9a2-f81025edf281 finished with Result = success, Message = FINISHED\"}}},\"version\":\"1.0\",\"rpc-name\":\"upgrade-software\"}"
]

Conclusion (Pass /Fail)

PASS

 

Test Case ID

UpgradePostCheck1

Test Case ID

UpgradePostCheck1

Test Case Name

Verify UpgradePostCheck API of SDNC

Release

Dublin

Pre-conditions

Upgraded

Testing Steps

1. Go to terminal 1:

Run command:

curl -s -X GET http://mr.api.simpledemo.onap.org:3904/events/SDNC-LCM-WRITE/pnftesters/test01?timeout=90000 | python -m json.tool

2. Go to terminal 2:

Run command:

curl -H "Content-Type: application/json" -X POST http://mr.api.simpledemo.onap.org:3904/events/SDNC-LCM-READ -d @upgrade-post-check-input.json

The content of file upgrade-post-check-input.json is as follows:

{
"version": "1.0",
"cambria.partition": "MSO",
"correlation-id": "7ba9941f-08d8-4e7f-94a3-0ac8409a8ca9",
"rpc-name": "upgrade-post-check",
"type": "request",
"body": {
"input": {
"action": "UpgradePostCheck",
"action-identifiers": {
"vnf-id": "5gDU0001"
},
"common-header": {
"api-ver": "2.00",
"flags": {
"force": "FALSE",
"mode": "NORMAL",
"ttl": 65000
},
"originator-id": "MSO",
"request-id": "d0f40a8b-f5bf-4289-b043-4e01cd0a9c32",
"sub-request-id": "d0f40a8b-f5bf-4289-b043-4e01cd0a9c32",
"timestamp": "2019-03-15T10:17:29.155Z"
},
"payload": "{\"pnf-flag\":\"true\", \"pnf-name\": \"5gDU0001\",\"pnfId\": \"5gDU0001\", \"ipaddress-v4-oam\": \"192.168.35.83\",\"oldSwVersion\": \"v1\", \"targetSwVersion\": \"v2\", \"ruleName\": \"r102\", \"Id\": \"10\", \"additionalData\":\"{}\"}"}}
}

3. Back to terminal 1, and wait a minute to get the output:

[
"{\"cambria.partition\":\"MSO\",\"correlation-id\":\"d0f40a8b-f5bf-4289-b043-4e01cd0a9c32-d0f40a8b-f5bf-4289-b043-4e01cd0a9c32\",\"type\":\"response\",\"body\":{\"output\":{\"payload\":\"{\\\"result\\\": \\\"Success\\\"}\",\"common-header\":{\"flags\":{\"mode\":\"NORMAL\",\"force\":\"FALSE\",\"ttl\":\"65000\"},\"api-ver\":\"2.00\",\"originator-id\":\"MSO\",\"sub-request-id\":\"d0f40a8b-f5bf-4289-b043-4e01cd0a9c32\",\"request-id\":\"d0f40a8b-f5bf-4289-b043-4e01cd0a9c32\",\"timestamp\":\"2019-03-15T10:17:29.155Z\"},\"status\":{\"code\":\"400\",\"message\":\"Ansible Request 0ad2c327-f849-4e8e-aba8-50a9e9c1995a finished with Result = success, Message = FINISHED\"}}},\"version\":\"1.0\",\"rpc-name\":\"upgrade-post-check\"}"
]

Conclusion (Pass /Fail)

PASS

 

Test Case ID

Rollback1

Test Case ID

Rollback1

Test Case Name

Comments