Update AAI endpoints to /aai/v21
[ccsdk/cds.git] / components / model-catalog / blueprint-model / uat-blueprints / PNF_CDS_RESTCONF / Tests / uat.yaml
1 %YAML 1.1
2 ---
3 processes:
4   - name: config-assign
5     request:
6       commonHeader: &commonHeader
7         originatorId: sdnc
8         requestId: "123456-1000"
9         subRequestId: sub-123456-1000
10       actionIdentifiers: &assign-ai
11         blueprintName: PNF_CDS_RESTCONF
12         blueprintVersion: "1.0.0"
13         actionName: config-assign
14         mode: sync
15       payload:
16         config-assign-request:
17           resolution-key: &resKey "RES-KEY 61"
18           config-assign-properties:
19             service-instance-id: siid_1234
20             pnf-id: &pnfId pnf-id-2019-07-12
21             service-model-uuid: service-model-uuid
22             pnf-customization-uuid: pnf-customization-uuid
23     expectedResponse:
24       commonHeader: *commonHeader
25       actionIdentifiers: *assign-ai
26       status:
27         code: 200
28         eventType: EVENT_COMPONENT_EXECUTED
29         errorMessage: null
30         message: success
31       payload:
32         config-assign-response: {}
33   - name: config-deploy
34     request:
35       commonHeader: *commonHeader
36       actionIdentifiers: &deploy-ai
37         actionName: config-deploy
38         blueprintName: PNF_CDS_RESTCONF
39         blueprintVersion: "1.0.0"
40         mode: sync
41       payload:
42         config-deploy-request:
43           resolution-key: *resKey
44           config-deploy-properties:
45             service-instance-id: siid_1234
46             pnf-id: *pnfId
47             service-model-uuid: service-model-uuid
48             pnf-customization-uuid: pnf-customization-uuid
49     expectedResponse:
50       commonHeader: *commonHeader
51       actionIdentifiers: *deploy-ai
52       payload:
53         config-deploy-response: {}
54       status:
55         code: 200
56         errorMessage: null
57         eventType: EVENT_COMPONENT_EXECUTED
58         message: success
59   - name: preCheck
60     request:
61       commonHeader: &swugCommonHeader
62         originatorId: sdnc
63         requestId: "123456-1000"
64         subRequestId: sub-123456-1000
65       actionIdentifiers: &preCheck-ai
66         blueprintName: PNF_CDS_RESTCONF
67         blueprintVersion: "1.0.0"
68         actionName: preCheck
69         mode: sync
70       payload:
71         preCheck-request:
72           resolution-key: &resKey "RES-KEY 61"
73           preCheck-properties: &actionProps
74             service-instance-id: siid_1234
75             pnf-id: &pnfId pnf-id-2019-07-12
76             target-software-version: "2.0.2"
77             service-model-uuid: service-model-uuid
78             pnf-customization-uuid: pnf-customization-uuid
79     expectedResponse:
80       commonHeader: *swugCommonHeader
81       actionIdentifiers: *preCheck-ai
82       status:
83         code: 200
84         eventType: EVENT_COMPONENT_EXECUTED
85         errorMessage: null
86         message: success
87       payload:
88         preCheck-response: {}
89   - name: downloadNESw
90     request:
91       commonHeader: *swugCommonHeader
92       actionIdentifiers: &download-ai
93         blueprintName: PNF_CDS_RESTCONF
94         blueprintVersion: "1.0.0"
95         actionName: downloadNESw
96         mode: sync
97       payload:
98         downloadNESw-request:
99           resolution-key: *resKey
100           downloadNESw-properties: *actionProps
101     expectedResponse:
102       commonHeader: *swugCommonHeader
103       actionIdentifiers: *download-ai
104       status:
105         code: 200
106         eventType: EVENT_COMPONENT_EXECUTED
107         errorMessage: null
108         message: success
109       payload:
110         downloadNESw-response: {}
111   - name: activateNESw
112     request:
113       commonHeader: *swugCommonHeader
114       actionIdentifiers: &activate-ai
115         blueprintName: PNF_CDS_RESTCONF
116         blueprintVersion: "1.0.0"
117         actionName: activateNESw
118         mode: sync
119       payload:
120         activateNESw-request:
121           resolution-key: *resKey
122           activateNESw-properties: *actionProps
123     expectedResponse:
124       commonHeader: *swugCommonHeader
125       actionIdentifiers: *activate-ai
126       status:
127         code: 200
128         eventType: EVENT_COMPONENT_EXECUTED
129         errorMessage: null
130         message: success
131       payload:
132         activateNESw-response: {}
133   - name: postCheck
134     request:
135       commonHeader: *swugCommonHeader
136       actionIdentifiers: &postCheck-ai
137         blueprintName: PNF_CDS_RESTCONF
138         blueprintVersion: "1.0.0"
139         actionName: postCheck
140         mode: sync
141       payload:
142         postCheck-request:
143           resolution-key: *resKey
144           postCheck-properties: *actionProps
145     expectedResponse:
146       commonHeader: *swugCommonHeader
147       actionIdentifiers: *postCheck-ai
148       status:
149         code: 200
150         eventType: EVENT_COMPONENT_EXECUTED
151         errorMessage: null
152         message: success
153       payload:
154         postCheck-response: {}
155 external-services:
156   - selector: aai-data
157     expectations:
158       - request:
159           method: GET
160           path: [ /aai/v21/network/pnfs/pnf, *pnfId]
161           headers:
162             Accept: application/json
163         response:
164           headers:
165             Content-Type: application/json
166           body:
167             ipaddress-v4-oam: &pnfAddress 13.13.13.13
168             ipaddress-v6-oam: 1::13
169   - selector: sdnc
170     expectations:
171       - request:
172           method: PUT
173           path: &configUri [ /restconf/config, &nodeIdentifier [network-topology:network-topology/topology/topology-netconf/node, *pnfId]]
174           headers:
175             Content-Type: application/json
176           body:
177             node:
178               - node-id: *pnfId
179                 netconf-node-topology:protocol: { name: TLS }
180                 netconf-node-topology:host: *pnfAddress
181                 netconf-node-topology:key-based:
182                   username: netconf
183                   key-id: ODL_private_key_0
184                 netconf-node-topology:port: 6513
185                 netconf-node-topology:tcp-only: false
186                 netconf-node-topology:max-connection-attempts: 5
187         response:
188           status: 201
189       - request:
190           method: GET
191           path: [ /restconf/operational, *nodeIdentifier]
192         response:
193           body:
194             node: [ { netconf-node-topology:connection-status: connected }]
195       - request:
196           method: GET
197           path: [*configUri, &configletResourcePath yang-ext:mount/mynetconf:netconflist]
198         response:
199           body: {}
200       - request:
201           method: PATCH
202           path: [*configUri, *configletResourcePath]
203           headers:
204             Content-Type: application/yang.patch+json
205           body:
206             ietf-restconf:yang-patch:
207               patch-id: patch-1
208               edit:
209                 - edit-id: edit1
210                   operation: merge
211                   target: /
212                   value: { netconflist: { netconf: [ { netconf-id: "10", netconf-param: "1000" }]}}
213                 - edit-id: edit2
214                   operation: merge
215                   target: /
216                   value: { netconflist: { netconf: [ { netconf-id: "20", netconf-param: "2000" }]}}
217                 - edit-id: edit3
218                   operation: merge
219                   target: /
220                   value: { netconflist: { netconf: [ { netconf-id: "30", netconf-param: "3000" }]}}
221         response:
222           body:
223             ietf-yang-patch:yang-patch-status:
224               patch-id: patch-1
225               ok: [
226                 null
227               ]
228       ### External expectations for Software Upgrade
229       - request:
230           method: GET
231           path: &ConfigSwUgUri [*configUri, &configletResourcePath yang-ext:mount/pnf-sw-upgrade:software-upgrade]
232           headers:
233             Accept: application/json
234         responses:
235           - headers:
236               Content-Type: application/json
237             body:
238               software-upgrade:
239                 upgrade-package:
240                   - id: 2.0.1
241                     current-status: INITIALIZED
242                     user-label: trial software update
243                     uri: sftp:127.0.0.1/test_software_1.img
244                     software-version: 2.0.1
245                     user: test_user
246                     password: test_password
247           - headers:
248               Content-Type: application/json
249             body:
250               software-upgrade:
251                 upgrade-package:
252                   - id: 2.0.1
253                     current-status: INITIALIZED
254                     user-label: trial software update
255                     uri: sftp:127.0.0.1/test_software_1.img
256                     software-version: 2.0.1
257                     user: test_user
258                     password: test_password
259           - headers:
260               Content-Type: application/json
261             body:
262               software-upgrade:
263                 upgrade-package:
264                   - id: 2.0.1
265                     current-status: INITIALIZED
266                     user-label: trial software update
267                     uri: sftp:127.0.0.1/test_software_1.img
268                     software-version: 2.0.1
269                     user: test_user
270                     password: test_password
271                   - id: 2.0.2
272                     current-status: DOWNLOAD_COMPLETED
273                     state-change-time: '2020-02-20T13:03:21Z'
274                     software-version: 2.0.2
275                     user-label: trial software update
276                     uri: sftp:127.0.0.1/test_software_1.img
277                     user: test_user
278                     password: test_password
279           - headers:
280               Content-Type: application/json
281             body:
282               software-upgrade:
283                 upgrade-package:
284                   - id: 2.0.1
285                     current-status: INITIALIZED
286                     user-label: trial software update
287                     uri: sftp:127.0.0.1/test_software_1.img
288                     software-version: 2.0.1
289                     user: test_user
290                     password: test_password
291                   - id: 2.0.2
292                     current-status: ACTIVATION_COMPLETED
293                     state-change-time: '2020-02-20T13:03:21Z'
294                     software-version: 2.0.2
295                     user-label: trial software update
296                     uri: sftp:127.0.0.1/test_software_1.img
297                     user: test_user
298                     password: test_password
299       - request:
300           method: PATCH
301           path: *ConfigSwUgUri
302           headers:
303             Content-Type: application/yang.patch+json
304           body:
305             ietf-restconf:yang-patch:
306               patch-id: patch-1
307               edit:
308                 - edit-id: edit1
309                   operation: merge
310                   target: "/"
311         response:
312           headers:
313             Content-Type: application/yang.patch-status+json
314           body:
315             { ietf-yang-patch:yang-patch-status: {patch-id: patch-1, ok: [ ] } }
316         times: 2
317       - request:
318           method: GET
319           path: [*ConfigSwUgUri, upgrade-package/2.0.2]
320           headers:
321             Accept: application/json
322         responses:
323           - headers:
324               Content-Type: application/json
325             body:
326               upgrade-package:
327                 - id: 2.0.2
328                   current-status: DOWNLOAD_IN_PROGRESS
329                   state-change-time: '2020-02-20T12:17:34.984Z'
330                   software-version: 2.0.2
331           - headers:
332               Content-Type: application/json
333             body:
334               upgrade-package:
335                 - id: 2.0.2
336                   current-status: DOWNLOAD_IN_PROGRESS
337                   state-change-time: '2020-02-20T12:52:30Z'
338                   software-version: 2.0.2
339           - headers:
340               Content-Type: application/json
341             body:
342               upgrade-package:
343                 - id: 2.0.2
344                   current-status: DOWNLOAD_COMPLETED
345                   state-change-time: '2020-02-20T13:03:21Z'
346                   software-version: 2.0.2
347           - headers:
348               Content-Type: application/json
349             body:
350               upgrade-package:
351                 - id: 2.0.2
352                   current-status: ACTIVATION_IN_PROGRESS
353                   state-change-time: '2020-02-20T13:05:08Z'
354                   software-version: 2.0.2
355           - headers:
356               Content-Type: application/json
357             body:
358               upgrade-package:
359                 - id: 2.0.2
360                   current-status: ACTIVATION_IN_PROGRESS
361                   state-change-time: '2020-02-20T12:52:30Z'
362                   software-version: 2.0.2
363           - headers:
364               Content-Type: application/json
365             body:
366               upgrade-package:
367                 - id: 2.0.2
368                   current-status: ACTIVATION_COMPLETED
369                   state-change-time: '2020-02-20T13:07:12Z'
370                   software-version: 2.0.2
371       - request:
372           method: DELETE
373           path: *configUri
374         times: 5