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