[DOC] Fix URL to UNH lab wiki
[integration.git] / docs / docs_Testing_5G_PNF_Software_Upgrade_With_Schema_Update.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
3
4 .. _docs_testing_5g_pnf_software_upgrade_with_schema_update:
5
6
7 :orphan:
8
9 Testing xNF Software Upgrade in association to schema updates
10 -------------------------------------------------------------
11
12 Description
13 ~~~~~~~~~~~
14 This procedure only describes the test instruction to upgrade schema of a service instance with at least one PNF resource based on a new onboarding package.
15
16 This procedure can be used to upgrade a service instance with more than one PNF resource.
17
18 A. Pre-conditions
19 ~~~~~~~~~~~~~~~~~
20 * A service template with at least one PNF resource has been created in SDC and distributed to run time
21
22 * At least one service instance has been instantiated, including PNF registration and configuration, in run time
23
24 * This service instance is in health condition
25
26 * A new PNF onboarding package, which contains a new software version and new artifacts, is ready for onboarding
27
28 * This procedure does not support addition of new PNF resource or deletion of existing PNF resource in the service template.
29
30
31 B. Update and re-distribute the service template:
32 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33     The service template must be updated with updated schema information for the PNF resources, and then redistributed to run time.
34
35     1. Update an existing PNF resource artifact and attach the same to an existing service template.
36
37         - url to portal: https://portal.api.simpledemo.onap.org:30225/ONAPPORTAL/login.htm
38
39         - password for users: demo123456!
40
41         - Login as cs0008, go to "ONBOARD", where all the available VSPs and Services are listed.
42
43
44     2. Follow below mentioned procedure to update VSP and Service.
45
46         - `Update VF/PNF <https://docs.onap.org/en/latest/guides/onap-user/design/resource-onboarding/index.html#doc-guide-user-des-res-onb-upd-vsp>`_
47
48         - `Update Service <https://docs.onap.org/en/latest/guides/onap-user/design/service-design/index.html#update-service-optional>`_
49
50
51 C. Trigger PNF service level software upgrade with schema update:
52 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
53
54     Schema update procedure can be triggered manually by invoking appropriate rest end points through the postman client.
55
56     3. Get the service level workflow uuid by fetching all the available workflows from SO:
57
58         - GET http://REPO_IP:SO_PORT/onap/so/infra/workflowSpecifications/v1/workflows
59
60         - From the response, fetch the workflow uuid against the workflow name “ServiceLevelUpgrade”.
61
62         .. image:: files/softwareUpgrade/workflowList.png
63
64
65     4. Select one service instance which need to be upgraded
66
67         - Retrieve all services instance from AAI using:
68
69         - GET https://REPO_IP:AAI_PORT/business/customers/customer/{global-customer-id}/service-subscriptions/service-subscription/{service-type}/service-instances
70
71         - Select one service instance from the service instance list received from above query.
72
73
74     5. Get all Service-Model-Version from AAI Using Service-Model-InVariant-UUId:
75
76         - Use the Service-Model-InVariant-UUId from the selected service instance (previous step) as model-invariant-id in this query.
77
78         - GET https://REPO_IP:AAI_PORT/aai/v21/service-design-and-creation/models/model/${model-invariant-id}/model-vers
79
80         - Select one model version Id from the model version list received from above querying. The selected model version Id will be used as the target service model version at upgrade procedure.
81
82         .. image:: files/softwareUpgrade/serviceModelVersions.png
83
84
85     6. Invoke the service level upgrade workflow to update the schema of xNF resources.
86
87         - Invoke the service level workflow by passing the older version service model id and the service level workflow uuid for “Service Level workflow” fetched in the previous steps.
88
89         - In the body of the POST request, json input needs to be supplied that contains info on the model version to which we are going to trigger the update. (2.0)
90
91         - POST http://REPO_IP:SO_PORT/onap/so/infra/instanceManagement/v1/serviceInstances/${serviceInstanceId}/workflows/${serviceLevel_workflow_uuid}
92
93         - Attaching below a sample request json :
94
95 {
96
97   "requestDetails": {
98
99     "subscriberInfo": {
100
101       "globalSubscriberId": "807c7a02-249c-4db8-9fa9-bee973fe08ce"
102
103     },
104
105     "modelInfo": {
106
107       "modelVersion": "2.0",
108
109       "modelVersionId": "8351245d-50da-4695-8756-3a22618377f7",
110
111       "modelInvariantId": "fe41489e-1563-46a3-b90a-1db629e4375b",
112
113       "modelName": "Service_with_pnfs",
114
115       "modelType": "service"
116
117     },
118
119     "requestInfo": {
120
121       "suppressRollback": false,
122
123       "requestorId": "demo",
124
125       "instanceName": "PNF 2",
126
127       "source": "VID"
128
129     },
130
131     "requestParameters": {
132
133       "subscriptionServiceType": "pNF",
134
135       "userParams": [
136
137         {
138
139           "name": "targetSoftwareVersion",
140
141           "value": "pnf_sw_version-4.0.0"
142
143         }
144
145       ],
146
147       "aLaCarte": false,
148
149       "payload": "{\"k1\": \"v1\"}"
150
151     },
152
153     "project": {
154
155       "projectName": "ServiceLevelUpgrade"
156
157     },
158
159     "owningEntity": {
160
161       "owningEntityId": "67f2e84c-734d-4e90-a1e4-d2ffa2e75849",
162
163       "owningEntityName": "OE-Test"
164
165     }
166
167   }
168
169 }
170
171 Note down the request id for the schema update request that can be used in the subsequent steps to track the progress.
172
173
174     7. Verify the service level upgrade workflow status
175
176         - GET http://REPO_IP:SO_PORT/onap/so/infra/orchestrationRequests/v7/${requestID}
177
178         - Verify the response status code and message for the request id fetched in the previous step.
179
180         - For successful upgrade completion, the response code must be “200” with appropriate success message.
181
182
183     8. Verify PNF Configuration for Service Level Upgrade from AAI
184
185         - GET https://REPO_IP:AAI_PORT/aai/v16/network/pnfs/pnf/{PNF_NAME}
186
187         - Verify the software version of the pnf resource updated in AAI.
188
189         .. image:: files/softwareUpgrade/verifyPNF.png