fix tests. Mock n2vc.k8s connectors
[osm/LCM.git] / osm_lcm / tests / test_db_descriptors.py
1 #
2 # Licensed under the Apache License, Version 2.0 (the "License"); you may
3 # not use this file except in compliance with the License. You may obtain
4 # a copy of the License at
5 #
6 # http://www.apache.org/licenses/LICENSE-2.0
7 #
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
10 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
11 # License for the specific language governing permissions and limitations
12 # under the License.
13 #
14 # For those usages not covered by the Apache License, Version 2.0 please
15 # contact: esousa@whitestack.com or alfonso.tiernosepulveda@telefonica.com
16 ##
17 db_nsds_text = """
18 ---
19 - _admin:
20 created: 1566823353.971486
21 modified: 1566823353.971486
22 onboardingState: ONBOARDED
23 operationalState: ENABLED
24 projects_read:
25 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
26 projects_write:
27 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
28 storage:
29 descriptor: hackfest_3charmed_nsd/hackfest_3charmed_nsd.yaml
30 folder: 8c2f8b95-bb1b-47ee-8001-36dc090678da
31 fs: local
32 path: /app/storage/
33 pkg-dir: hackfest_3charmed_nsd
34 zipfile: package.tar.gz
35 usageState: NOT_IN_USE
36 userDefinedData: {}
37 _id: 8c2f8b95-bb1b-47ee-8001-36dc090678da
38 constituent-vnfd:
39 - member-vnf-index: '1'
40 vnfd-id-ref: hackfest3charmed-vnf
41 - member-vnf-index: '2'
42 vnfd-id-ref: hackfest3charmed-vnf
43 description: NS with 2 VNFs hackfest3charmed-vnf connected by datanet and mgmtnet
44 VLs
45 id: hackfest3charmed-ns
46 logo: osm.png
47 name: hackfest3charmed-ns
48 short-name: hackfest3charmed-ns
49 version: '1.0'
50 vld:
51 - id: mgmt
52 mgmt-network: true
53 name: mgmt
54 short-name: mgmt
55 type: ELAN
56 vim-network-name: mgmt
57 vnfd-connection-point-ref:
58 - member-vnf-index-ref: '1'
59 vnfd-connection-point-ref: vnf-mgmt
60 vnfd-id-ref: hackfest3charmed-vnf
61 - member-vnf-index-ref: '2'
62 vnfd-connection-point-ref: vnf-mgmt
63 vnfd-id-ref: hackfest3charmed-vnf
64 - id: datanet
65 name: datanet
66 short-name: datanet
67 type: ELAN
68 vnfd-connection-point-ref:
69 - member-vnf-index-ref: '1'
70 vnfd-connection-point-ref: vnf-data
71 vnfd-id-ref: hackfest3charmed-vnf
72 - member-vnf-index-ref: '2'
73 vnfd-connection-point-ref: vnf-data
74 vnfd-id-ref: hackfest3charmed-vnf
75 - _admin:
76 created: 1575031728.9257665
77 modified: 1575031728.9257665
78 onboardingState: ONBOARDED
79 operationalState: ENABLED
80 projects_read:
81 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
82 projects_write:
83 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
84 storage:
85 descriptor: multikdu_ns/multikdu_nsd.yaml
86 folder: d0f63683-9032-4c6f-8928-ffd4674b9f69
87 fs: local
88 path: /app/storage/
89 pkg-dir: multikdu_ns
90 zipfile: multikdu_ns.tar.gz
91 usageState: NOT_IN_USE
92 userDefinedData: {}
93 _id: d0f63683-9032-4c6f-8928-ffd4674b9f69
94 constituent-vnfd:
95 - member-vnf-index: multikdu
96 vnfd-id-ref: multikdu_knf
97 description: NS consisting of a single KNF multikdu_knf connected to mgmt network
98 id: multikdu_ns
99 logo: osm.png
100 name: multikdu_ns
101 short-name: multikdu_ns
102 vendor: OSM
103 version: '1.0'
104 vld:
105 - id: mgmtnet
106 mgmt-network: true
107 name: mgmtnet
108 type: ELAN
109 vim-network-name: mgmt
110 vnfd-connection-point-ref:
111 - member-vnf-index-ref: multikdu
112 vnfd-connection-point-ref: mgmt
113 vnfd-id-ref: multikdu_knf
114 """
115
116 db_nslcmops_text = """
117 ---
118 - _admin:
119 created: 1566823354.4148262
120 modified: 1566823354.4148262
121 projects_read:
122 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
123 projects_write:
124 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
125 worker: 86434c2948e2
126 operations:
127 - member_vnf_index: '1'
128 primitive: touch
129 primitive_params: /home/ubuntu/last-touch-1
130 operationState: COMPLETED
131 detailed-status: Done
132 - member_vnf_index: '1'
133 primitive: touch
134 primitive_params: /home/ubuntu/last-touch-2
135 operationState: COMPLETED
136 detailed-status: Done
137 - member_vnf_index: '2'
138 primitive: touch
139 primitive_params: /home/ubuntu/last-touch-3
140 operationState: FAILED
141 detailed-status: Unknown error
142 _id: a639fac7-e0bb-4225-8ecb-c1f8efcc125e
143 detailed-status: 'FAILED executing proxy charm initial primitives for member_vnf_index=1
144 vdu_id=None: charm error executing primitive verify-ssh-credentials for member_vnf_index=1
145 vdu_id=None: ''timeout after 600 seconds'''
146 id: a639fac7-e0bb-4225-8ecb-c1f8efcc125e
147 isAutomaticInvocation: false
148 isCancelPending: false
149 lcmOperationType: instantiate
150 links:
151 nsInstance: /osm/nslcm/v1/ns_instances/f48163a6-c807-47bc-9682-f72caef5af85
152 self: /osm/nslcm/v1/ns_lcm_op_occs/a639fac7-e0bb-4225-8ecb-c1f8efcc125e
153 nsInstanceId: f48163a6-c807-47bc-9682-f72caef5af85
154 operationParams:
155 additionalParamsForVnf:
156 - additionalParams:
157 touch_filename: /home/ubuntu/first-touch-1
158 touch_filename2: /home/ubuntu/second-touch-1
159 member-vnf-index: '1'
160 - additionalParams:
161 touch_filename: /home/ubuntu/first-touch-2
162 touch_filename2: /home/ubuntu/second-touch-2
163 member-vnf-index: '2'
164 lcmOperationType: instantiate
165 nsDescription: default description
166 nsInstanceId: f48163a6-c807-47bc-9682-f72caef5af85
167 nsName: ALF
168 nsdId: 8c2f8b95-bb1b-47ee-8001-36dc090678da
169 vimAccountId: ea958ba5-4e58-4405-bf42-6e3be15d4c3a
170 operationState: FAILED
171 startTime: 1566823354.414689
172 statusEnteredTime: 1566824534.5112448
173
174 - _admin:
175 created: 1600000000.0000000
176 modified: 1600000000.0000000
177 projects_read:
178 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
179 projects_write:
180 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
181 worker: 86434c2948e2
182 _id: a639fac7-e0bb-4225-ffff-c1f8efcc125e
183 detailed-status: None
184 lcmOperationType: terminate
185 nsInstanceId: f48163a6-c807-47bc-9682-f72caef5af85
186 operationParams: {}
187 operationState: PROCESSING
188 startTime: 1600000000.0000000
189 statusEnteredTime: 1600000000.0000000
190
191 - _admin:
192 created: 1575034637.044651
193 modified: 1575034637.044651
194 projects_read:
195 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
196 projects_write:
197 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
198 _id: cf3aa178-7640-4174-b921-2330e6f2aad6
199 detailed-status: done
200 id: cf3aa178-7640-4174-b921-2330e6f2aad6
201 isAutomaticInvocation: false
202 isCancelPending: false
203 lcmOperationType: instantiate
204 links:
205 nsInstance: /osm/nslcm/v1/ns_instances/0bcb701c-ee4d-41ab-8ee6-f4156f7f114d
206 self: /osm/nslcm/v1/ns_lcm_op_occs/cf3aa178-7640-4174-b921-2330e6f2aad6
207 nsInstanceId: 0bcb701c-ee4d-41ab-8ee6-f4156f7f114d
208 operationParams:
209 lcmOperationType: instantiate
210 nsDescription: default description
211 nsInstanceId: 0bcb701c-ee4d-41ab-8ee6-f4156f7f114d
212 nsName: multikdu
213 nsdId: d0f63683-9032-4c6f-8928-ffd4674b9f69
214 nsr_id: 0bcb701c-ee4d-41ab-8ee6-f4156f7f114d
215 vimAccountId: 74337dcb-ef54-41e7-bd2d-8c0d7fcd326f
216 vld:
217 - name: mgmtnet
218 vim-network-name: internal
219 operationState: COMPLETED
220 startTime: 1575034637.0445576
221 statusEnteredTime: 1575034663.8484545
222 """
223
224 db_nsrs_text = """
225 ---
226 - _admin:
227 created: 1566823354.3716335
228 deployed:
229 RO:
230 nsd_id: 876573b5-968d-40b9-b52b-91bf5c5844f7
231 nsr_id: c9fe9908-3180-430d-b633-fca2f68db008
232 nsr_status: ACTIVE
233 vnfd:
234 - id: 1ab2a418-9fe3-4358-bf17-411e5155535f
235 member-vnf-index: '1'
236 - id: 0de348e3-c201-4f6a-91cc-7f957e2d5504
237 member-vnf-index: '2'
238 VCA:
239 - application: alf-b-aa
240 detailed-status: Ready!
241 member-vnf-index: '1'
242 model: f48163a6-c807-47bc-9682-f72caef5af85
243 operational-status: active
244 primitive_id: null
245 ssh-public-key: ssh-rsa pub-key root@juju-145d3e-0
246 step: ssh-public-key-obtained
247 vdu_count_index: null
248 vdu_id: null
249 vdu_name: null
250 vnfd_id: hackfest3charmed-vnf
251 - application: alf-c-ab
252 detailed-status: Ready!
253 member-vnf-index: '2'
254 model: f48163a6-c807-47bc-9682-f72caef5af85
255 operational-status: active
256 primitive_id: null
257 ssh-public-key: ssh-rsa pub-key root@juju-145d3e-0
258 step: ssh-public-key-obtained
259 vdu_count_index: null
260 vdu_id: null
261 vdu_name: null
262 vnfd_id: hackfest3charmed-vnf
263 VCA-model-name: f48163a6-c807-47bc-9682-f72caef5af85
264 modified: 1566823354.3716335
265 nsState: INSTANTIATED
266 nslcmop: null
267 projects_read:
268 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
269 projects_write:
270 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
271 _id: f48163a6-c807-47bc-9682-f72caef5af85
272 additionalParamsForNs: null
273 admin-status: ENABLED
274 config-status: init
275 constituent-vnfr-ref:
276 - 88d90b0c-faff-4b9f-bccd-017f33985984
277 - 1ca3bb1a-b29b-49fe-bed6-5f3076d77434
278 create-time: 1566823354.36234
279 datacenter: ea958ba5-4e58-4405-bf42-6e3be15d4c3a
280 description: default description
281 detailed-status: 'ERROR executing proxy charm initial primitives for member_vnf_index=1
282 vdu_id=None: charm error executing primitive verify-ssh-credentials for member_vnf_index=1
283 vdu_id=None: ''timeout after 600 seconds'''
284 id: f48163a6-c807-47bc-9682-f72caef5af85
285 instantiate_params:
286 nsDescription: default description
287 nsName: ALF
288 nsdId: 8c2f8b95-bb1b-47ee-8001-36dc090678da
289 vimAccountId: ea958ba5-4e58-4405-bf42-6e3be15d4c3a
290 name: ALF
291 name-ref: ALF
292 ns-instance-config-ref: f48163a6-c807-47bc-9682-f72caef5af85
293 nsd:
294 _admin:
295 created: 1566823353.971486
296 modified: 1566823353.971486
297 onboardingState: ONBOARDED
298 operationalState: ENABLED
299 projects_read:
300 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
301 projects_write:
302 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
303 storage:
304 descriptor: hackfest_3charmed_nsd/hackfest_3charmed_nsd.yaml
305 folder: 8c2f8b95-bb1b-47ee-8001-36dc090678da
306 fs: local
307 path: /app/storage/
308 pkg-dir: hackfest_3charmed_nsd
309 zipfile: package.tar.gz
310 usageState: NOT_IN_USE
311 userDefinedData: {}
312 _id: 8c2f8b95-bb1b-47ee-8001-36dc090678da
313 constituent-vnfd:
314 - member-vnf-index: '1'
315 vnfd-id-ref: hackfest3charmed-vnf
316 - member-vnf-index: '2'
317 vnfd-id-ref: hackfest3charmed-vnf
318 description: NS with 2 VNFs hackfest3charmed-vnf connected by datanet and
319 mgmtnet VLs
320 id: hackfest3charmed-ns
321 logo: osm.png
322 name: hackfest3charmed-ns
323 short-name: hackfest3charmed-ns
324 version: '1.0'
325 vld:
326 - id: mgmt
327 mgmt-network: true
328 name: mgmt
329 short-name: mgmt
330 type: ELAN
331 vim-network-name: mgmt
332 vnfd-connection-point-ref:
333 - member-vnf-index-ref: '1'
334 vnfd-connection-point-ref: vnf-mgmt
335 vnfd-id-ref: hackfest3charmed-vnf
336 - member-vnf-index-ref: '2'
337 vnfd-connection-point-ref: vnf-mgmt
338 vnfd-id-ref: hackfest3charmed-vnf
339 - id: datanet
340 name: datanet
341 short-name: datanet
342 type: ELAN
343 vnfd-connection-point-ref:
344 - member-vnf-index-ref: '1'
345 vnfd-connection-point-ref: vnf-data
346 vnfd-id-ref: hackfest3charmed-vnf
347 - member-vnf-index-ref: '2'
348 vnfd-connection-point-ref: vnf-data
349 vnfd-id-ref: hackfest3charmed-vnf
350 nsd-id: 8c2f8b95-bb1b-47ee-8001-36dc090678da
351 nsd-name-ref: hackfest3charmed-ns
352 nsd-ref: hackfest3charmed-ns
353 operational-events: []
354 operational-status: failed
355 orchestration-progress: {}
356 resource-orchestrator: osmopenmano
357 short-name: ALF
358 ssh-authorized-key: null
359 vld:
360 - id: mgmt
361 name: null
362 status: ACTIVE
363 status-detailed: null
364 vim-id: f99ae780-0e2f-4985-af41-574eae6919c0
365 vim-network-name: mgmt
366 - id: datanet
367 name: ALF-datanet
368 status: ACTIVE
369 status-detailed: null
370 vim-id: c31364ba-f573-4ab6-bf1a-fed30ede39a8
371 vnfd-id:
372 - 7637bcf8-cf14-42dc-ad70-c66fcf1e6e77
373 - _admin:
374 created: 1575034637.011233
375 current-operation: null
376 deployed:
377 K8s:
378 - k8scluster-uuid: 73d96432-d692-40d2-8440-e0c73aee209c
379 kdu-instance: stable-mongodb-0086856106
380 kdu-model: stable/mongodb
381 kdu-name: mongo
382 vnfr-id: 5ac34899-a23a-4b3c-918a-cd77acadbea6
383 - k8scluster-uuid: 73d96432-d692-40d2-8440-e0c73aee209c
384 kdu-instance: stable-openldap-0092830263
385 kdu-model: stable/mongodb
386 kdu-name: mongo
387 vnfr-id: 5ac34899-a23a-4b3c-918a-cd77acadbea6
388 RO:
389 detailed-status: Deployed at VIM
390 nsd_id: b03a8de8-1898-4142-bc6d-3b0787df567d
391 nsr_id: b5ce3e00-8647-415d-afaa-d5a612cf3074
392 nsr_status: ACTIVE
393 operational-status: running
394 vnfd:
395 - id: b9493dae-a4c9-4b96-8965-329581efb0a1
396 member-vnf-index: multikdu
397 VCA: []
398 modified: 1575034637.011233
399 nsState: INSTANTIATED
400 nslcmop: null
401 operation-type: null
402 projects_read:
403 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
404 projects_write:
405 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
406 _id: 0bcb701c-ee4d-41ab-8ee6-f4156f7f114d
407 additionalParamsForNs: null
408 admin-status: ENABLED
409 config-status: configured
410 constituent-vnfr-ref:
411 - 5ac34899-a23a-4b3c-918a-cd77acadbea6
412 create-time: 1575034636.9990137
413 datacenter: ea958ba5-4e58-4405-bf42-6e3be15d4c3a
414 description: default description
415 detailed-status: done
416 id: 0bcb701c-ee4d-41ab-8ee6-f4156f7f114d
417 instantiate_params:
418 nsDescription: default description
419 nsName: multikdu
420 nsdId: d0f63683-9032-4c6f-8928-ffd4674b9f69
421 vimAccountId: 74337dcb-ef54-41e7-bd2d-8c0d7fcd326f
422 name: multikdu
423 name-ref: multikdu
424 ns-instance-config-ref: 0bcb701c-ee4d-41ab-8ee6-f4156f7f114d
425 nsd-id: d0f63683-9032-4c6f-8928-ffd4674b9f69
426 nsd-name-ref: multikdu_ns
427 nsd-ref: multikdu_ns
428 operational-events: []
429 operational-status: init
430 orchestration-progress: {}
431 resource-orchestrator: osmopenmano
432 short-name: multikdu
433 ssh-authorized-key: null
434 vld:
435 - id: mgmtnet
436 name: null
437 status: ACTIVE
438 status-detailed: null
439 vim-id: 9b6a2ac4-767e-4ec9-9497-8ba63084c77f
440 vim-network-name: mgmt
441 vnfd-id:
442 - 7ab0d10d-8ce2-4c68-aef6-cc5a437a9c62
443 """
444
445 ro_ns_text = """
446 datacenter_tenant_id: dc5c67fa-c7f2-11e9-b9c0-02420aff0004
447 description: null
448 name: ALF
449 classifications: []
450 sdn_nets: []
451 nets:
452 - created: false
453 datacenter_id: dc51ce6c-c7f2-11e9-b9c0-02420aff0004
454 datacenter_tenant_id: dc5c67fa-c7f2-11e9-b9c0-02420aff0004
455 error_msg: null
456 ns_net_osm_id: mgmt
457 related: c6bac394-fa27-4c43-bb34-42f621a9d343
458 sce_net_id: 8f215bab-c35e-41e6-a035-42bfaa07af9f
459 sdn_net_id: null
460 status: ACTIVE
461 uuid: c6bac394-fa27-4c43-bb34-42f621a9d343
462 vim_info: "{vim_info: null}"
463 vim_name: null
464 vim_net_id: f99ae780-0e2f-4985-af41-574eae6919c0
465 vnf_net_id: null
466 vnf_net_osm_id: null
467 - created: true
468 datacenter_id: dc51ce6c-c7f2-11e9-b9c0-02420aff0004
469 datacenter_tenant_id: dc5c67fa-c7f2-11e9-b9c0-02420aff0004
470 error_msg: null
471 ns_net_osm_id: datanet
472 related: 509d576c-120f-493a-99a1-5fea99dfe041
473 sce_net_id: 3d766bbc-33a8-41aa-a986-2f35e8d25c16
474 sdn_net_id: null
475 status: ACTIVE
476 uuid: 509d576c-120f-493a-99a1-5fea99dfe041
477 vim_info: "{vim_info: null}"
478 vim_name: ALF-datanet
479 vim_net_id: c31364ba-f573-4ab6-bf1a-fed30ede39a8
480 vnf_net_id: null
481 vnf_net_osm_id: null
482 - created: true
483 datacenter_id: dc51ce6c-c7f2-11e9-b9c0-02420aff0004
484 datacenter_tenant_id: dc5c67fa-c7f2-11e9-b9c0-02420aff0004
485 error_msg: null
486 ns_net_osm_id: null
487 related: 277fed09-3220-4bfd-9052-b96b21a32daf
488 sce_net_id: null
489 sdn_net_id: null
490 status: ACTIVE
491 uuid: 277fed09-3220-4bfd-9052-b96b21a32daf
492 vim_info: "{vim_info: null}"
493 vim_name: ALF-internal
494 vim_net_id: ff181e6d-2597-4244-b40b-bb0174bdfeb6
495 vnf_net_id: 62e62fae-c12b-4ebc-9a9b-30031c6c16fa
496 vnf_net_osm_id: internal
497 - created: true
498 datacenter_id: dc51ce6c-c7f2-11e9-b9c0-02420aff0004
499 datacenter_tenant_id: dc5c67fa-c7f2-11e9-b9c0-02420aff0004
500 error_msg: null
501 ns_net_osm_id: null
502 related: 92534d1a-e697-4372-a84d-aa0aa643b68a
503 sce_net_id: null
504 sdn_net_id: null
505 status: ACTIVE
506 uuid: 92534d1a-e697-4372-a84d-aa0aa643b68a
507 vim_info: "{vim_info: null}"
508 vim_name: ALF-internal
509 vim_net_id: 09655387-b639-421a-b5f6-72b26d685fb4
510 vnf_net_id: 13c6c77d-86a5-4914-832c-990d4ec7b54e
511 vnf_net_osm_id: internal
512 nsd_osm_id: f48163a6-c807-47bc-9682-f72caef5af85.2.hackfest3charmed-ns
513 scenario_id: 876573b5-968d-40b9-b52b-91bf5c5844f7
514 scenario_name: hackfest3charmed-ns
515 sfis: []
516 sfps: []
517 sfs: []
518 tenant_id: 0ea38bd0-2729-47a9-ae07-c6ce76115eb2
519 uuid: c9fe9908-3180-430d-b633-fca2f68db008
520 vnfs:
521 - datacenter_id: dc51ce6c-c7f2-11e9-b9c0-02420aff0004
522 datacenter_tenant_id: dc5c67fa-c7f2-11e9-b9c0-02420aff0004
523 ip_address: 10.205.1.46
524 member_vnf_index: '1'
525 mgmt_access: '{interface_id: 61549ee3-cd6c-4930-8b90-eaad97fe345b, required: ''False'',
526 vm_id: 6cf4a48f-3b6c-4395-8221-119fa37de24a}
527
528 '
529 sce_vnf_id: 83be04a8-c513-42ba-9908-22728f686d31
530 uuid: 94724042-7576-4fb0-82ec-6a7ab642741c
531 vms:
532 - created_at: '2019-08-26T12:50:38'
533 error_msg: null
534 interfaces:
535 - external_name: vnf-mgmt
536 instance_net_id: c6bac394-fa27-4c43-bb34-42f621a9d343
537 internal_name: mgmtVM-eth0
538 ip_address: 10.205.1.46
539 mac_address: fa:16:3e:b4:3e:b1
540 sdn_port_id: null
541 type: mgmt
542 vim_info: "{vim_info: null}"
543 vim_interface_id: 4d3cb8fd-7040-4169-a0ad-2486d2b006a1
544 - external_name: null
545 instance_net_id: 277fed09-3220-4bfd-9052-b96b21a32daf
546 internal_name: mgmtVM-eth1
547 ip_address: 192.168.54.2
548 mac_address: fa:16:3e:6e:7e:78
549 sdn_port_id: null
550 type: bridge
551 vim_info: "{vim_info: null}"
552 vim_interface_id: 54ed68e2-9802-4dfe-b68a-280b3fc6e02d
553 ip_address: 10.205.1.46
554 name: mgmtVM
555 related: d0b91293-a91d-4f08-b15f-0bf841216dfe
556 status: ACTIVE
557 uuid: d0b91293-a91d-4f08-b15f-0bf841216dfe
558 vdu_osm_id: mgmtVM
559 vim_info: "{vim_info: null}"
560 vim_name: ALF-1-mgmtVM-1
561 vim_vm_id: c2538499-4c30-41c0-acd5-80cb92f48061
562 - created_at: '2019-08-26T12:50:38'
563 error_msg: null
564 interfaces:
565 - external_name: null
566 instance_net_id: 277fed09-3220-4bfd-9052-b96b21a32daf
567 internal_name: dataVM-eth0
568 ip_address: 192.168.54.3
569 mac_address: fa:16:3e:d9:7a:5d
570 sdn_port_id: null
571 type: bridge
572 vim_info: "{vim_info: null}"
573 vim_interface_id: 1637f350-8840-4241-8ed0-4616bdcecfcf
574 - external_name: vnf-data
575 instance_net_id: 509d576c-120f-493a-99a1-5fea99dfe041
576 internal_name: dataVM-xe0
577 ip_address: 192.168.24.3
578 mac_address: fa:16:3e:d1:6c:0d
579 sdn_port_id: null
580 type: bridge
581 vim_info: "{vim_info: null}"
582 vim_interface_id: 54c73e83-7059-41fe-83a9-4c4ae997b481
583 name: dataVM
584 related: 5c08253d-8a35-474f-b0d3-c5297d174c13
585 status: ACTIVE
586 uuid: 5c08253d-8a35-474f-b0d3-c5297d174c13
587 vdu_osm_id: dataVM
588 vim_info: "{vim_info: null}"
589 vim_name: ALF-1-dataVM-1
590 vim_vm_id: 87973c3f-365d-4227-95c2-7a8abc74349c
591 - created_at: '2019-08-26T13:40:54'
592 error_msg: null
593 interfaces:
594 - external_name: null
595 instance_net_id: 277fed09-3220-4bfd-9052-b96b21a32daf
596 internal_name: dataVM-eth0
597 ip_address: 192.168.54.5
598 mac_address: fa:16:3e:e4:17:45
599 sdn_port_id: null
600 type: bridge
601 vim_info: "{vim_info: null}"
602 vim_interface_id: 7e246e40-8710-4c33-9c95-78fc3c02bc5b
603 - external_name: vnf-data
604 instance_net_id: 509d576c-120f-493a-99a1-5fea99dfe041
605 internal_name: dataVM-xe0
606 ip_address: 192.168.24.5
607 mac_address: fa:16:3e:29:6f:a6
608 sdn_port_id: null
609 type: bridge
610 vim_info: "{vim_info: null}"
611 vim_interface_id: ce81af7a-9adf-494b-950e-6581fd04ecc4
612 name: dataVM
613 related: 1ae5a0a2-c15a-49a4-a77c-2991d97f6dbe
614 status: ACTIVE
615 uuid: 1ae5a0a2-c15a-49a4-a77c-2991d97f6dbe
616 vdu_osm_id: dataVM
617 vim_info: "{vim_info: null}"
618 vim_name: ALF-1-dataVM-2
619 vim_vm_id: 4916533e-36c6-4861-9fe3-366a8fb0a5f8
620 vnf_id: 1ab2a418-9fe3-4358-bf17-411e5155535f
621 vnf_name: hackfest3charmed-vnf.1
622 vnfd_osm_id: f48163a6-c807-47bc-9682-f72caef5af85.0.1
623 - datacenter_id: dc51ce6c-c7f2-11e9-b9c0-02420aff0004
624 datacenter_tenant_id: dc5c67fa-c7f2-11e9-b9c0-02420aff0004
625 ip_address: 10.205.1.47
626 member_vnf_index: '2'
627 mgmt_access: '{interface_id: 538604c3-5c5e-41eb-8f84-c0239c7fabcd, required: ''False'',
628 vm_id: dd04d792-05c9-4ecc-bf28-f77384d00311}
629
630 '
631 sce_vnf_id: c4f3607a-08ff-4f75-893c-fce507e2f240
632 uuid: 00020403-e80f-4ef2-bb7e-b29669643035
633 vms:
634 - created_at: '2019-08-26T12:50:38'
635 error_msg: null
636 interfaces:
637 - external_name: vnf-mgmt
638 instance_net_id: c6bac394-fa27-4c43-bb34-42f621a9d343
639 internal_name: mgmtVM-eth0
640 ip_address: 10.205.1.47
641 mac_address: fa:16:3e:cb:9f:c7
642 sdn_port_id: null
643 type: mgmt
644 vim_info: "{vim_info: null}"
645 vim_interface_id: dcd6d2de-3c68-481c-883e-e9d38c671dc4
646 - external_name: null
647 instance_net_id: 92534d1a-e697-4372-a84d-aa0aa643b68a
648 internal_name: mgmtVM-eth1
649 ip_address: 192.168.231.1
650 mac_address: fa:16:3e:1a:89:24
651 sdn_port_id: null
652 type: bridge
653 vim_info: "{vim_info: null}"
654 vim_interface_id: 50e538e3-aba0-4652-93bb-20487f3f28e1
655 ip_address: 10.205.1.47
656 name: mgmtVM
657 related: 4543ab5d-578c-427c-9df2-affd17e21b66
658 status: ACTIVE
659 uuid: 4543ab5d-578c-427c-9df2-affd17e21b66
660 vdu_osm_id: mgmtVM
661 vim_info: "{vim_info: null}"
662 vim_name: ALF-2-mgmtVM-1
663 vim_vm_id: 248077b2-e3b8-4a37-8b72-575abb8ed912
664 - created_at: '2019-08-26T12:50:38'
665 error_msg: null
666 interfaces:
667 - external_name: null
668 instance_net_id: 92534d1a-e697-4372-a84d-aa0aa643b68a
669 internal_name: dataVM-eth0
670 ip_address: 192.168.231.3
671 mac_address: fa:16:3e:7e:ba:8c
672 sdn_port_id: null
673 type: bridge
674 vim_info: "{vim_info: null}"
675 vim_interface_id: 15274862-14ea-4527-b405-101cae8bc1a0
676 - external_name: vnf-data
677 instance_net_id: 509d576c-120f-493a-99a1-5fea99dfe041
678 internal_name: dataVM-xe0
679 ip_address: 192.168.24.4
680 mac_address: fa:16:3e:d2:e1:f5
681 sdn_port_id: null
682 type: bridge
683 vim_info: "{vim_info: null}"
684 vim_interface_id: 253ebe4e-38d5-46be-8777-dbb57510a2ec
685 name: dataVM
686 related: 6f03f16b-295a-47a1-9a69-2d069d574a33
687 status: ACTIVE
688 uuid: 6f03f16b-295a-47a1-9a69-2d069d574a33
689 vdu_osm_id: dataVM
690 vim_info: "{vim_info: null}"
691 vim_name: ALF-2-dataVM-1
692 vim_vm_id: a4ce4372-e0ad-4ae3-8f9f-1c969f32e77b
693 vnf_id: 0de348e3-c201-4f6a-91cc-7f957e2d5504
694 vnf_name: hackfest3charmed-vnf.2
695 vnfd_osm_id: f48163a6-c807-47bc-9682-f72caef5af85.1.2
696 """
697
698 ro_delete_action_text = """
699 actions:
700 - created_at: 1580140763.1099188
701 description: DELETE
702 instance_id: c9fe9908-3180-430d-b633-fca2f68db008
703 modified_at: 1580140763.253148
704 number_done: 1
705 number_failed: 0
706 number_tasks: 1
707 tenant_id: 0ea38bd0-2729-47a9-ae07-c6ce76115eb2
708 uuid: delete
709 vim_wim_actions:
710 - action: DELETE
711 created_at: 1580140763.1099188
712 datacenter_vim_id: dc5c67fa-c7f2-11e9-b9c0-02420aff0004
713 error_msg: null
714 extra: '{params: [9b6a2ac4-767e-4ec9-9497-8ba63084c77f, null]}'
715 instance_action_id: ACTION-1580140763.054037
716 item: instance_nets
717 item_id: 8cb06b72-c71d-4b58-b419-95025fa651d3
718 modified_at: 1580140763.1099188
719 related: 8cb06b72-c71d-4b58-b419-95025fa651d3
720 status: SUPERSEDED
721 task_index: 0
722 vim_id: null
723 wim_account_id: null
724 wim_internal_id: null
725 worker: null
726 """
727
728 db_vim_accounts_text = """
729 ---
730 - _admin:
731 created: 1566818150.3024442
732 current_operation: 0
733 deployed:
734 RO: dc51ce6c-c7f2-11e9-b9c0-02420aff0004
735 RO-account: dc5c67fa-c7f2-11e9-b9c0-02420aff0004
736 detailed-status: Done
737 modified: 1566818150.3024442
738 operationalState: ENABLED
739 operations:
740 - detailed-status: Done
741 lcmOperationType: create
742 operationParams: null
743 operationState: COMPLETED
744 startTime: 1566818150.3025382
745 statusEnteredTime: 1566818150.3025382
746 worker: 86434c2948e2
747 projects_read:
748 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
749 projects_write:
750 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
751 _id: ea958ba5-4e58-4405-bf42-6e3be15d4c3a
752 description: Openstack site 2, based on Mirantis, also called DSS9000-1, with
753 tenant tid
754 name: ost2-mrt-tid
755 schema_version: '1.1'
756 vim_password: 5g0yGX86qIhprX86YTMcpg==
757 vim_tenant_name: osm
758 vim_type: openstack
759 vim_url: http://10.95.87.162:5000/v2.0
760 vim_user: osm
761 """
762
763 db_k8sclusters_text = """
764 - _admin:
765 created: 1575031378.9268339
766 current_operation: 0
767 modified: 1575031378.9268339
768 operationalState: ENABLED
769 operations:
770 - detailed-status: ''
771 lcmOperationType: create
772 operationParams: null
773 operationState: ''
774 startTime: 1575031378.926895
775 statusEnteredTime: 1575031378.926895
776 worker: 36681ccf7f32
777 projects_read:
778 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
779 projects_write:
780 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
781 helm-chart:
782 id: 73d96432-d692-40d2-8440-e0c73aee209c
783 created: True
784 _id: e7169dab-f71a-4f1f-b82b-432605e8c4b3
785 credentials:
786 apiVersion: v1
787 users:
788 - name: admin
789 user:
790 password: qhpdogJXhBLG+JiYyyE0LeNsJXHkCSMy+sGVzlnJqes=
791 username: admin
792 description: Cluster3
793 k8s_version: '1.15'
794 name: cluster3
795 namespace: kube-system
796 nets:
797 net1: None
798 schema_version: '1.11'
799 vim_account: ea958ba5-4e58-4405-bf42-6e3be15d4c3a
800 """
801
802 db_vnfds_text = """
803 ---
804 - _admin:
805 created: 1566823352.7154346
806 modified: 1566823353.9295402
807 onboardingState: ONBOARDED
808 operationalState: ENABLED
809 projects_read:
810 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
811 projects_write:
812 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
813 storage:
814 descriptor: hackfest_3charmed_vnfd/hackfest_3charmed_vnfd.yaml
815 folder: 7637bcf8-cf14-42dc-ad70-c66fcf1e6e77
816 fs: local
817 path: /app/storage/
818 pkg-dir: hackfest_3charmed_vnfd
819 zipfile: package.tar.gz
820 type: vnfd
821 usageState: NOT_IN_USE
822 userDefinedData: {}
823 _id: 7637bcf8-cf14-42dc-ad70-c66fcf1e6e77
824 connection-point:
825 - id: vnf-mgmt
826 name: vnf-mgmt
827 short-name: vnf-mgmt
828 type: VPORT
829 - id: vnf-data
830 name: vnf-data
831 short-name: vnf-data
832 type: VPORT
833 description: A VNF consisting of 2 VDUs connected to an internal VL, and one VDU
834 with cloud-init
835 id: hackfest3charmed-vnf
836 internal-vld:
837 - id: internal
838 internal-connection-point:
839 - id-ref: mgmtVM-internal
840 - id-ref: dataVM-internal
841 name: internal
842 short-name: internal
843 type: ELAN
844 logo: osm.png
845 mgmt-interface:
846 cp: vnf-mgmt
847 monitoring-param:
848 - aggregation-type: AVERAGE
849 id: monitor1
850 name: monitor1
851 vdu-monitoring-param:
852 vdu-monitoring-param-ref: dataVM_cpu_util
853 vdu-ref: dataVM
854 name: hackfest3charmed-vnf
855 scaling-group-descriptor:
856 - max-instance-count: 10
857 name: scale_dataVM
858 scaling-config-action:
859 - trigger: post-scale-out
860 vnf-config-primitive-name-ref: touch
861 - trigger: pre-scale-in
862 vnf-config-primitive-name-ref: touch
863 scaling-policy:
864 - cooldown-time: 60
865 name: auto_cpu_util_above_threshold
866 scaling-criteria:
867 - name: cpu_util_above_threshold
868 scale-in-relational-operation: LE
869 scale-in-threshold: '15.0000000000'
870 scale-out-relational-operation: GE
871 scale-out-threshold: '60.0000000000'
872 vnf-monitoring-param-ref: monitor1
873 scaling-type: automatic
874 threshold-time: 0
875 vdu:
876 - count: 1
877 vdu-id-ref: dataVM
878 short-name: hackfest3charmed-vnf
879 vdu:
880 - count: '1'
881 cloud-init-file: cloud-config.txt
882 id: mgmtVM
883 image: hackfest3-mgmt
884 interface:
885 - external-connection-point-ref: vnf-mgmt
886 name: mgmtVM-eth0
887 position: 1
888 type: EXTERNAL
889 virtual-interface:
890 type: VIRTIO
891 - internal-connection-point-ref: mgmtVM-internal
892 name: mgmtVM-eth1
893 position: 2
894 type: INTERNAL
895 virtual-interface:
896 type: VIRTIO
897 internal-connection-point:
898 - id: mgmtVM-internal
899 name: mgmtVM-internal
900 short-name: mgmtVM-internal
901 type: VPORT
902 name: mgmtVM
903 vm-flavor:
904 memory-mb: '1024'
905 storage-gb: '10'
906 vcpu-count: 1
907 - count: '1'
908 id: dataVM
909 image: hackfest3-mgmt
910 interface:
911 - internal-connection-point-ref: dataVM-internal
912 name: dataVM-eth0
913 position: 1
914 type: INTERNAL
915 virtual-interface:
916 type: VIRTIO
917 - external-connection-point-ref: vnf-data
918 name: dataVM-xe0
919 position: 2
920 type: EXTERNAL
921 virtual-interface:
922 type: VIRTIO
923 internal-connection-point:
924 - id: dataVM-internal
925 name: dataVM-internal
926 short-name: dataVM-internal
927 type: VPORT
928 monitoring-param:
929 - id: dataVM_cpu_util
930 nfvi-metric: cpu_utilization
931 name: dataVM
932 vm-flavor:
933 memory-mb: '1024'
934 storage-gb: '10'
935 vcpu-count: 1
936 version: '1.0'
937 vnf-configuration:
938 config-access:
939 ssh-access:
940 required: True
941 default-user: ubuntu
942 config-primitive:
943 - name: touch
944 parameter:
945 - data-type: STRING
946 default-value: <touch_filename2>
947 name: filename
948 initial-config-primitive:
949 - name: config
950 parameter:
951 - name: ssh-hostname
952 value: <rw_mgmt_ip>
953 - name: ssh-username
954 value: ubuntu
955 - name: ssh-password
956 value: osm4u
957 seq: '1'
958 - name: touch
959 parameter:
960 - name: filename
961 value: <touch_filename>
962 seq: '2'
963 juju:
964 charm: simple
965 - _admin:
966 created: 1575031727.5383403
967 modified: 1575031727.5383403
968 onboardingState: ONBOARDED
969 operationalState: ENABLED
970 projects_read:
971 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
972 projects_write:
973 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
974 storage:
975 descriptor: multikdu_knf/multikdu_vnfd.yaml
976 folder: 7ab0d10d-8ce2-4c68-aef6-cc5a437a9c62
977 fs: local
978 path: /app/storage/
979 pkg-dir: multikdu_knf
980 zipfile: multikdu_knf.tar.gz
981 usageState: NOT_IN_USE
982 userDefinedData: {}
983 _id: 7ab0d10d-8ce2-4c68-aef6-cc5a437a9c62
984 connection-point:
985 - name: mgmt
986 description: KNF with two KDU using helm-charts
987 id: multikdu_knf
988 k8s-cluster:
989 nets:
990 - external-connection-point-ref: mgmt
991 id: mgmtnet
992 kdu:
993 - helm-chart: stable/openldap:1.2.1
994 name: ldap
995 - helm-chart: stable/mongodb
996 name: mongo
997 mgmt-interface:
998 cp: mgmt
999 name: multikdu_knf
1000 short-name: multikdu_knf
1001 vendor: Telefonica
1002 version: '1.0'
1003 """
1004
1005 db_vnfrs_text = """
1006 ---
1007 - _admin:
1008 created: 1566823354.3668208
1009 modified: 1566823354.3668208
1010 nsState: NOT_INSTANTIATED
1011 projects_read:
1012 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
1013 projects_write:
1014 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
1015 _id: 88d90b0c-faff-4b9f-bccd-017f33985984
1016 additionalParamsForVnf:
1017 touch_filename: /home/ubuntu/first-touch-1
1018 touch_filename2: /home/ubuntu/second-touch-1
1019 connection-point:
1020 - connection-point-id: vnf-mgmt
1021 id: vnf-mgmt
1022 name: vnf-mgmt
1023 - connection-point-id: vnf-data
1024 id: vnf-data
1025 name: vnf-data
1026 created-time: 1566823354.36234
1027 id: 88d90b0c-faff-4b9f-bccd-017f33985984
1028 ip-address: 10.205.1.46
1029 member-vnf-index-ref: '1'
1030 nsr-id-ref: f48163a6-c807-47bc-9682-f72caef5af85
1031 vdur:
1032 - _id: f0e7d7ce-2443-4dcb-ad0b-5ab9f3b13d37
1033 count-index: 0
1034 interfaces:
1035 - ip-address: 10.205.1.46
1036 mac-address: fa:16:3e:b4:3e:b1
1037 mgmt-vnf: true
1038 name: mgmtVM-eth0
1039 ns-vld-id: mgmt
1040 - ip-address: 192.168.54.2
1041 mac-address: fa:16:3e:6e:7e:78
1042 name: mgmtVM-eth1
1043 vnf-vld-id: internal
1044 internal-connection-point:
1045 - connection-point-id: mgmtVM-internal
1046 id: mgmtVM-internal
1047 name: mgmtVM-internal
1048 ip-address: 10.205.1.46
1049 name: ALF-1-mgmtVM-1
1050 status: ACTIVE
1051 status-detailed: null
1052 vdu-id-ref: mgmtVM
1053 vim-id: c2538499-4c30-41c0-acd5-80cb92f48061
1054 - _id: ab453219-2d9a-45c2-864d-2c0788385028
1055 count-index: 0
1056 interfaces:
1057 - ip-address: 192.168.54.3
1058 mac-address: fa:16:3e:d9:7a:5d
1059 name: dataVM-eth0
1060 vnf-vld-id: internal
1061 - ip-address: 192.168.24.3
1062 mac-address: fa:16:3e:d1:6c:0d
1063 name: dataVM-xe0
1064 ns-vld-id: datanet
1065 internal-connection-point:
1066 - connection-point-id: dataVM-internal
1067 id: dataVM-internal
1068 name: dataVM-internal
1069 ip-address: null
1070 name: ALF-1-dataVM-1
1071 status: ACTIVE
1072 status-detailed: null
1073 vdu-id-ref: dataVM
1074 vim-id: 87973c3f-365d-4227-95c2-7a8abc74349c
1075 vim-account-id: ea958ba5-4e58-4405-bf42-6e3be15d4c3a
1076 vld:
1077 - id: internal
1078 name: ALF-internal
1079 status: ACTIVE
1080 status-detailed: null
1081 vim-id: ff181e6d-2597-4244-b40b-bb0174bdfeb6
1082 vnfd-id: 7637bcf8-cf14-42dc-ad70-c66fcf1e6e77
1083 vnfd-ref: hackfest3charmed-vnf
1084 - _admin:
1085 created: 1566823354.3703845
1086 modified: 1566823354.3703845
1087 nsState: NOT_INSTANTIATED
1088 projects_read:
1089 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
1090 projects_write:
1091 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
1092 _id: 1ca3bb1a-b29b-49fe-bed6-5f3076d77434
1093 additionalParamsForVnf:
1094 touch_filename: /home/ubuntu/first-touch-2
1095 touch_filename2: /home/ubuntu/second-touch-2
1096 connection-point:
1097 - connection-point-id: vnf-mgmt
1098 id: vnf-mgmt
1099 name: vnf-mgmt
1100 - connection-point-id: vnf-data
1101 id: vnf-data
1102 name: vnf-data
1103 created-time: 1566823354.36234
1104 id: 1ca3bb1a-b29b-49fe-bed6-5f3076d77434
1105 ip-address: 10.205.1.47
1106 member-vnf-index-ref: '2'
1107 nsr-id-ref: f48163a6-c807-47bc-9682-f72caef5af85
1108 vdur:
1109 - _id: 190b4a2c-4f85-4cfe-9406-4cef7ffb1e67
1110 count-index: 0
1111 interfaces:
1112 - ip-address: 10.205.1.47
1113 mac-address: fa:16:3e:cb:9f:c7
1114 mgmt-vnf: true
1115 name: mgmtVM-eth0
1116 ns-vld-id: mgmt
1117 - ip-address: 192.168.231.1
1118 mac-address: fa:16:3e:1a:89:24
1119 name: mgmtVM-eth1
1120 vnf-vld-id: internal
1121 internal-connection-point:
1122 - connection-point-id: mgmtVM-internal
1123 id: mgmtVM-internal
1124 name: mgmtVM-internal
1125 ip-address: 10.205.1.47
1126 name: ALF-2-mgmtVM-1
1127 status: ACTIVE
1128 status-detailed: null
1129 vdu-id-ref: mgmtVM
1130 vim-id: 248077b2-e3b8-4a37-8b72-575abb8ed912
1131 - _id: 889b874d-e1c3-4e75-aa45-53a9b0ddabd9
1132 count-index: 0
1133 interfaces:
1134 - ip-address: 192.168.231.3
1135 mac-address: fa:16:3e:7e:ba:8c
1136 name: dataVM-eth0
1137 vnf-vld-id: internal
1138 - ip-address: 192.168.24.4
1139 mac-address: fa:16:3e:d2:e1:f5
1140 name: dataVM-xe0
1141 ns-vld-id: datanet
1142 internal-connection-point:
1143 - connection-point-id: dataVM-internal
1144 id: dataVM-internal
1145 name: dataVM-internal
1146 ip-address: null
1147 name: ALF-2-dataVM-1
1148 status: ACTIVE
1149 status-detailed: null
1150 vdu-id-ref: dataVM
1151 vim-id: a4ce4372-e0ad-4ae3-8f9f-1c969f32e77b
1152 vim-account-id: ea958ba5-4e58-4405-bf42-6e3be15d4c3a
1153 vld:
1154 - id: internal
1155 name: ALF-internal
1156 status: ACTIVE
1157 status-detailed: null
1158 vim-id: ff181e6d-2597-4244-b40b-bb0174bdfeb6
1159 vnfd-id: 7637bcf8-cf14-42dc-ad70-c66fcf1e6e77
1160 vnfd-ref: hackfest3charmed-vnf
1161 - _admin:
1162 created: 1575034637.009597
1163 modified: 1575034637.009597
1164 nsState: NOT_INSTANTIATED
1165 projects_read:
1166 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
1167 projects_write:
1168 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
1169 _id: 5ac34899-a23a-4b3c-918a-cd77acadbea6
1170 additionalParamsForVnf: null
1171 connection-point:
1172 - connection-point-id: null
1173 id: null
1174 name: mgmt
1175 created-time: 1575034636.9990137
1176 id: 5ac34899-a23a-4b3c-918a-cd77acadbea6
1177 ip-address: null
1178 k8s-cluster:
1179 nets:
1180 - external-connection-point-ref: mgmt
1181 id: mgmtnet
1182 ns-vld-id: mgmtnet
1183 vim_net: internal
1184 kdur:
1185 - ip-address: null
1186 k8s-cluster:
1187 id: e7169dab-f71a-4f1f-b82b-432605e8c4b3
1188 kdu-name: ldap
1189 helm-chart: stable/openldap:1.2.1
1190 - ip-address: null
1191 k8s-cluster:
1192 id: e7169dab-f71a-4f1f-b82b-432605e8c4b3
1193 kdu-name: mongo
1194 helm-chart: stable/mongodb
1195 member-vnf-index-ref: multikdu
1196 nsr-id-ref: 0bcb701c-ee4d-41ab-8ee6-f4156f7f114d
1197 vdur: []
1198 vim-account-id: 74337dcb-ef54-41e7-bd2d-8c0d7fcd326f
1199 vnfd-id: 7ab0d10d-8ce2-4c68-aef6-cc5a437a9c62
1200 vnfd-ref: multikdu_knf
1201 """
1202
1203 db_nslcmops_scale_text = """
1204 ---
1205 - _admin:
1206 created: 1565250912.2643092
1207 modified: 1570026174.83263
1208 projects_read:
1209 - d3581c99-31e3-45f9-b45c-49a290faedbc
1210 current_operation: '5'
1211 deployed:
1212 RO: d9aea288-b9b1-11e9-b19e-02420aff0006
1213 RO-account: d9bb2f1c-b9b1-11e9-b19e-02420aff0006
1214 detailed-status: Done
1215 modified: 1565250912.2643092
1216 operationalState: ENABLED
1217 operations:
1218 - member_vnf_index: '1'
1219 primitive: touch
1220 primitive_params: /home/ubuntu/last-touch-1
1221 operationState: COMPLETED
1222 detailed-status: Done
1223 - member_vnf_index: '1'
1224 primitive: touch
1225 primitive_params: /home/ubuntu/last-touch-2
1226 operationState: COMPLETED
1227 detailed-status: Done
1228 - member_vnf_index: '2'
1229 primitive: touch
1230 primitive_params: /home/ubuntu/last-touch-3
1231 operationState: COMPLETED
1232 detailed-status: Done
1233 projects_read:
1234 - b2d2ce4b-a1a0-4c01-847e-048632c43b40
1235 projects_write:
1236 - b2d2ce4b-a1a0-4c01-847e-048632c43b40
1237 worker: c4055a07655b
1238 deploy:
1239 RO: ACTION-1570026232.061742
1240 _id: 053967e8-7c1c-400f-ae82-3d45b291374b
1241 lcmOperationType: scale
1242 nsInstanceId: 90d9ebb7-2b5a-4b7c-bc34-a51fd7ef7b7b
1243 statusEnteredTime: 1570026243.09784
1244 startTime: 1570026174.8326
1245 operationParams:
1246 lcmOperationType: scale
1247 nsInstanceId: 90d9ebb7-2b5a-4b7c-bc34-a51fd7ef7b7b
1248 scaleVnfData:
1249 scaleByStepData:
1250 member-vnf-index: '1'
1251 scaling-group-descriptor: scale_scaling_group
1252 scaleVnfType: SCALE_IN
1253 scaleType: SCALE_VNF
1254 isAutomaticInvocation: false
1255 isCancelPending: false
1256 id: 053967e8-7c1c-400f-ae82-3d45b291374b
1257 links:
1258 nsInstance: "/osm/nslcm/v1/ns_instances/90d9ebb7-2b5a-4b7c-bc34-a51fd7ef7b7b"
1259 self: "/osm/nslcm/v1/ns_lcm_op_occs/053967e8-7c1c-400f-ae82-3d45b291374b"
1260 operationState: COMPLETED
1261 detailed-status: done
1262 """
1263
1264 test_ids = {
1265 # contains the ids of ns and operations of every test
1266 "TEST-A": {
1267 "ns": "f48163a6-c807-47bc-9682-f72caef5af85",
1268 "instantiate": "a639fac7-e0bb-4225-8ecb-c1f8efcc125e",
1269 "terminate": "a639fac7-e0bb-4225-ffff-c1f8efcc125e",
1270 },
1271 "TEST-KDU": {
1272 "ns": "0bcb701c-ee4d-41ab-8ee6-f4156f7f114d",
1273 "instantiate": "cf3aa178-7640-4174-b921-2330e6f2aad6",
1274 "terminate": None,
1275 }
1276 }