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