9decd4e310d7a40c968c094dc5784f90a935a49d
[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 K8s: []
235 RO:
236 nsd_id: 876573b5-968d-40b9-b52b-91bf5c5844f7
237 nsr_id: c9fe9908-3180-430d-b633-fca2f68db008
238 nsr_status: ACTIVE
239 vnfd:
240 - id: 1ab2a418-9fe3-4358-bf17-411e5155535f
241 member-vnf-index: '1'
242 - id: 0de348e3-c201-4f6a-91cc-7f957e2d5504
243 member-vnf-index: '2'
244 VCA:
245 - application: alf-b-aa
246 ee_id: f48163a6-c807-47bc-9682-f72caef5af85.alf-b-aa
247 needed_terminate: True
248 detailed-status: Ready!
249 member-vnf-index: '1'
250 model: f48163a6-c807-47bc-9682-f72caef5af85
251 operational-status: active
252 primitive_id: null
253 ssh-public-key: ssh-rsa pub-key root@juju-145d3e-0
254 step: ssh-public-key-obtained
255 vdu_count_index: null
256 vdu_id: null
257 vdu_name: null
258 vnfd_id: hackfest3charmed-vnf
259 - application: alf-c-ab
260 ee_id: f48163a6-c807-47bc-9682-f72caef5af85.alf-c-ab
261 needed_terminate: True
262 detailed-status: Ready!
263 member-vnf-index: '2'
264 model: f48163a6-c807-47bc-9682-f72caef5af85
265 operational-status: active
266 primitive_id: null
267 ssh-public-key: ssh-rsa pub-key root@juju-145d3e-0
268 step: ssh-public-key-obtained
269 vdu_count_index: null
270 vdu_id: null
271 vdu_name: null
272 vnfd_id: hackfest3charmed-vnf
273 VCA-model-name: f48163a6-c807-47bc-9682-f72caef5af85
274 modified: 1566823354.3716335
275 nsState: INSTANTIATED
276 nslcmop: null
277 projects_read:
278 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
279 projects_write:
280 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
281 _id: f48163a6-c807-47bc-9682-f72caef5af85
282 additionalParamsForNs: null
283 admin-status: ENABLED
284 config-status: init
285 constituent-vnfr-ref:
286 - 88d90b0c-faff-4b9f-bccd-017f33985984
287 - 1ca3bb1a-b29b-49fe-bed6-5f3076d77434
288 create-time: 1566823354.36234
289 datacenter: ea958ba5-4e58-4405-bf42-6e3be15d4c3a
290 description: default description
291 vcaStatus:
292 8c707f16-2d9b-49d6-af5e-2ce9985b2adf:
293 applications:
294 app-vnf-1fb8538dfc39:
295 can_upgrade_to: ''
296 charm: 'local:xenial/simple-1'
297 charm_profile: ''
298 charm_version: ''
299 endpoint_bindings: null
300 err: null
301 exposed: false
302 int_: null
303 life: ''
304 meter_statuses: { }
305 provider_id: null
306 public_address: ''
307 relations: { }
308 series: xenial
309 status:
310 data: { }
311 err: null
312 info: Ready!
313 kind: ''
314 life: ''
315 since: '2021-02-17T08:39:54.239185095Z'
316 status: active
317 unknown_fields: { }
318 version: ''
319 subordinate_to: [ ]
320 units:
321 app-vnf-1fb8538dfc39/0:
322 address: null
323 agent_status:
324 data: { }
325 err: null
326 info: ''
327 kind: ''
328 life: ''
329 since: '2021-02-17T08:52:18.077155028Z'
330 status: idle
331 unknown_fields: { }
332 version: 2.8.1
333 charm: ''
334 leader: true
335 machine: '0'
336 opened_ports: null
337 provider_id: null
338 public_address: 10.151.40.53
339 subordinates: { }
340 unknown_fields: { }
341 workload_status:
342 data: { }
343 err: null
344 info: Ready!
345 kind: ''
346 life: ''
347 since: '2021-02-17T08:39:54.239185095Z'
348 status: active
349 unknown_fields: { }
350 version: ''
351 workload_version: ''
352 unknown_fields:
353 charm-verion: ''
354 workload_version: ''
355 actions:
356 generate-ssh-key: >-
357 Generate a new SSH keypair for this unit. This will replace any
358 existing previously generated keypair.
359 get-ssh-public-key: Get the public SSH key for this unit.
360 reboot: Reboot the VNF virtual machine.
361 restart: Stop the service on the VNF.
362 run: Run an arbitrary command
363 start: Stop the service on the VNF.
364 stop: Stop the service on the VNF.
365 touch: Touch a file on the VNF.
366 upgrade: Upgrade the software on the VNF.
367 verify-ssh-credentials: >-
368 Verify that this unit can authenticate with server specified by
369 ssh-hostname and ssh-username.
370 configs:
371 boolean-option:
372 default: false
373 description: A short description of the configuration option
374 source: default
375 type: boolean
376 value: false
377 int-option:
378 default: 9001
379 description: A short description of the configuration option
380 source: default
381 type: int
382 value: 9001
383 ssh-hostname:
384 default: ''
385 description: The hostname or IP address of the machine to
386 source: user
387 type: string
388 value: 192.168.61.90
389 ssh-key-bits:
390 default: 4096
391 description: The number of bits to use for the SSH key.
392 source: default
393 type: int
394 value: 4096
395 ssh-key-type:
396 default: rsa
397 description: The type of encryption to use for the SSH key.
398 source: default
399 type: string
400 value: rsa
401 ssh-password:
402 default: ''
403 description: The password used to authenticate.
404 source: user
405 type: string
406 value: osm4u
407 ssh-private-key:
408 default: ''
409 description: DEPRECATED. The private ssh key to be used to authenticate.
410 source: default
411 type: string
412 value: ''
413 ssh-public-key:
414 default: ''
415 description: The public key of this unit.
416 source: default
417 type: string
418 value: ''
419 ssh-username:
420 default: ''
421 description: The username to login as.
422 source: user
423 type: string
424 value: ubuntu
425 string-option:
426 default: Default Value
427 description: A short description of the configuration option
428 source: default
429 type: string
430 value: Default Value
431 app-vnf-943ab4274bb6:
432 can_upgrade_to: ''
433 charm: 'local:xenial/simple-0'
434 charm_profile: ''
435 charm_version: ''
436 endpoint_bindings: null
437 err: null
438 exposed: false
439 int_: null
440 life: ''
441 meter_statuses: { }
442 provider_id: null
443 public_address: ''
444 relations: { }
445 series: xenial
446 status:
447 data: { }
448 err: null
449 info: Ready!
450 kind: ''
451 life: ''
452 since: '2021-02-17T08:39:15.165682713Z'
453 status: active
454 unknown_fields: { }
455 version: ''
456 subordinate_to: [ ]
457 units:
458 app-vnf-943ab4274bb6/0:
459 address: null
460 agent_status:
461 data: { }
462 err: null
463 info: ''
464 kind: ''
465 life: ''
466 since: '2021-02-17T08:46:06.473054303Z'
467 status: idle
468 unknown_fields: { }
469 version: 2.8.1
470 charm: ''
471 leader: true
472 machine: '1'
473 opened_ports: null
474 provider_id: null
475 public_address: 10.151.40.117
476 subordinates: { }
477 unknown_fields: { }
478 workload_status:
479 data: { }
480 err: null
481 info: Ready!
482 kind: ''
483 life: ''
484 since: '2021-02-17T08:39:15.165682713Z'
485 status: active
486 unknown_fields: { }
487 version: ''
488 workload_version: ''
489 unknown_fields:
490 charm-verion: ''
491 workload_version: ''
492 actions:
493 generate-ssh-key: >-
494 Generate a new SSH keypair for this unit. This will replace any
495 existing previously generated keypair.
496 get-ssh-public-key: Get the public SSH key for this unit.
497 reboot: Reboot the VNF virtual machine.
498 restart: Stop the service on the VNF.
499 run: Run an arbitrary command
500 start: Stop the service on the VNF.
501 stop: Stop the service on the VNF.
502 touch: Touch a file on the VNF.
503 upgrade: Upgrade the software on the VNF.
504 verify-ssh-credentials: >-
505 Verify that this unit can authenticate with server specified by
506 ssh-hostname and ssh-username.
507 configs:
508 boolean-option:
509 default: false
510 description: A short description of the configuration option
511 source: default
512 type: boolean
513 value: false
514 int-option:
515 default: 9001
516 description: A short description of the configuration option
517 source: default
518 type: int
519 value: 9001
520 ssh-hostname:
521 default: ''
522 description: The hostname or IP address of the machine to
523 source: user
524 type: string
525 value: 192.168.61.72
526 ssh-key-bits:
527 default: 4096
528 description: The number of bits to use for the SSH key.
529 source: default
530 type: int
531 value: 4096
532 ssh-key-type:
533 default: rsa
534 description: The type of encryption to use for the SSH key.
535 source: default
536 type: string
537 value: rsa
538 ssh-password:
539 default: ''
540 description: The password used to authenticate.
541 source: user
542 type: string
543 value: osm4u
544 ssh-private-key:
545 default: ''
546 description: DEPRECATED. The private ssh key to be used to authenticate.
547 source: default
548 type: string
549 value: ''
550 ssh-public-key:
551 default: ''
552 description: The public key of this unit.
553 source: default
554 type: string
555 value: ''
556 ssh-username:
557 default: ''
558 description: The username to login as.
559 source: user
560 type: string
561 value: ubuntu
562 string-option:
563 default: Default Value
564 description: A short description of the configuration option
565 source: default
566 type: string
567 value: Default Value
568 branches: { }
569 controller_timestamp: '2021-02-17T09:17:38.006569064Z'
570 machines:
571 '0':
572 agent_status:
573 data: { }
574 err: null
575 info: ''
576 kind: ''
577 life: ''
578 since: '2021-02-17T08:37:46.637167056Z'
579 status: started
580 unknown_fields: { }
581 version: 2.8.1
582 constraints: ''
583 containers: { }
584 display_name: ''
585 dns_name: 10.151.40.53
586 hardware: arch=amd64 cores=0 mem=0M
587 has_vote: false
588 id_: '0'
589 instance_id: juju-0f027b-0
590 instance_status:
591 data: { }
592 err: null
593 info: Running
594 kind: ''
595 life: ''
596 since: '2021-02-17T08:35:58.435458338Z'
597 status: running
598 unknown_fields: { }
599 version: ''
600 ip_addresses:
601 - 10.151.40.53
602 jobs:
603 - JobHostUnits
604 lxd_profiles: { }
605 modification_status:
606 data: { }
607 err: null
608 info: ''
609 kind: ''
610 life: ''
611 since: '2021-02-17T08:35:34.663795891Z'
612 status: idle
613 unknown_fields: { }
614 version: ''
615 network_interfaces:
616 eth0:
617 dns_nameservers: null
618 gateway: 10.151.40.1
619 ip_addresses:
620 - 10.151.40.53
621 is_up: true
622 mac_address: '00:16:3e:99:bf:c7'
623 space: null
624 unknown_fields: { }
625 primary_controller_machine: null
626 series: xenial
627 unknown_fields: { }
628
629 wants_vote: false
630 '1':
631 agent_status:
632 data: { }
633 err: null
634 info: ''
635 kind: ''
636 life: ''
637 since: '2021-02-17T08:37:00.893313184Z'
638 status: started
639 unknown_fields: { }
640 version: 2.8.1
641 constraints: ''
642 containers: { }
643 display_name: ''
644 dns_name: 10.151.40.117
645 hardware: arch=amd64 cores=0 mem=0M
646 has_vote: false
647 id_: '1'
648 instance_id: juju-0f027b-1
649 instance_status:
650 data: { }
651 err: null
652 info: Running
653 kind: ''
654 life: ''
655 since: '2021-02-17T08:36:23.354547217Z'
656 status: running
657 unknown_fields: { }
658 version: ''
659 ip_addresses:
660 - 10.151.40.117
661 jobs:
662 - JobHostUnits
663 lxd_profiles: { }
664 modification_status:
665 data: { }
666 err: null
667 info: ''
668 kind: ''
669 life: ''
670 since: '2021-02-17T08:35:34.768829507Z'
671 status: idle
672 unknown_fields: { }
673 version: ''
674 network_interfaces:
675 eth0:
676 dns_nameservers: null
677 gateway: 10.151.40.1
678 ip_addresses:
679 - 10.151.40.117
680 is_up: true
681 mac_address: '00:16:3e:99:fe:1c'
682 space: null
683 unknown_fields: { }
684 primary_controller_machine: null
685 series: xenial
686 unknown_fields: { }
687 wants_vote: false
688 model:
689 available_version: ''
690 cloud_tag: cloud-localhost
691 migration: null
692 name: 7c707f16-2d9b-49d6-af5e-2ce9985b2adf
693 region: localhost
694 unknown_fields:
695 meter-status:
696 color: ''
697 message: ''
698 model-status:
699 data: { }
700 info: ''
701 kind: ''
702
703 life: ''
704 since: '2021-02-17T08:35:31.856691457Z'
705 status: available
706 version: ''
707 sla: unsupported
708 type: iaas
709 version: 2.8.1
710 offers: { }
711 relations: [ ]
712 remote_applications: { }
713 unknown_fields: { }
714 executedActions:
715 - id: '6'
716 action: touch
717 status: completed
718 Code: '0'
719 output: ''
720 - id: '4'
721 action: touch
722 status: completed
723 Code: '0'
724 output: ''
725 - id: '2'
726 action: verify-ssh-credentials
727 status: completed
728 Code: '0'
729 output: ALF-1-mgmtvm-1
730 verified: 'True'
731 detailed-status: 'ERROR executing proxy charm initial primitives for member_vnf_index=1
732 vdu_id=None: charm error executing primitive verify-ssh-credentials for member_vnf_index=1
733 vdu_id=None: ''timeout after 600 seconds'''
734 id: f48163a6-c807-47bc-9682-f72caef5af85
735 instantiate_params:
736 nsDescription: default description
737 nsName: ALF
738 nsdId: 8c2f8b95-bb1b-47ee-8001-36dc090678da
739 vimAccountId: ea958ba5-4e58-4405-bf42-6e3be15d4c3a
740 name: ALF
741 name-ref: ALF
742 ns-instance-config-ref: f48163a6-c807-47bc-9682-f72caef5af85
743 nsd:
744 _admin:
745 created: 1566823353.971486
746 modified: 1566823353.971486
747 onboardingState: ONBOARDED
748 operationalState: ENABLED
749 projects_read:
750 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
751 projects_write:
752 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
753 storage:
754 descriptor: hackfest_3charmed_nsd/hackfest_3charmed_nsd.yaml
755 folder: 8c2f8b95-bb1b-47ee-8001-36dc090678da
756 fs: local
757 path: /app/storage/
758 pkg-dir: hackfest_3charmed_nsd
759 zipfile: package.tar.gz
760 usageState: NOT_IN_USE
761 userDefinedData: {}
762 _id: 8c2f8b95-bb1b-47ee-8001-36dc090678da
763 id: hackfest3charmed-ns
764 name: hackfest3charmed-ns
765 description: NS with 2 VNFs hackfest3charmed-vnf connected by datanet and mgmtnet VLs
766 designer: OSM
767 version: '1.0'
768 vnfd-id:
769 - hackfest3charmed-vnf
770 virtual-link-desc:
771 - id: mgmt
772 mgmt-network: "true"
773 - id: datanet
774 mgmt-network: "false"
775 df:
776 - id: hackfest_charmed_DF
777 vnf-profile:
778 - id: hackfest_vnf1 # member-vnf-index-ref: 1
779 vnfd-id: hackfest3charmed-vnf
780 virtual-link-connectivity:
781 - virtual-link-profile-id: mgmt
782 constituent-cpd-id:
783 - constituent-base-element-id: hackfest_vnf1
784 constituent-cpd-id: vnf-mgmt-ext
785 - virtual-link-profile-id: datanet
786 constituent-cpd-id:
787 - constituent-base-element-id: hackfest_vnf1
788 constituent-cpd-id: vnf-data-ext
789 - id: hackfest_vnf2 # member-vnf-index-ref: 2
790 vnfd-id: hackfest3charmed-vnf
791 virtual-link-connectivity:
792 - virtual-link-profile-id: mgmt
793 constituent-cpd-id:
794 - constituent-base-element-id: hackfest_vnf2
795 constituent-cpd-id: vnf-mgmt-ext
796 - virtual-link-profile-id: datanet
797 constituent-cpd-id:
798 - constituent-base-element-id: hackfest_vnf2
799 constituent-cpd-id: vnf-data-ext
800 nsd-id: 8c2f8b95-bb1b-47ee-8001-36dc090678da
801 nsd-name-ref: hackfest3charmed-ns
802 nsd-ref: hackfest3charmed-ns
803 operational-events: []
804 operational-status: failed
805 orchestration-progress: {}
806 resource-orchestrator: osmopenmano
807 short-name: ALF
808 ssh-authorized-key: null
809 flavor : [{"vcpu-count":1,"memory-mb":1024,"storage-gb":"10","vim_info":[],"name":"mgmtVM-flv","id":"0"}]
810 image : [ { "image" : "ubuntu16.04", "vim_info" : [ ], "id" : "0" } ]
811 vld:
812 - id: mgmt
813 name: null
814 status: ACTIVE
815 status-detailed: null
816 vim-id: f99ae780-0e2f-4985-af41-574eae6919c0
817 vim-network-name: mgmt
818 - id: datanet
819 name: ALF-datanet
820 status: ACTIVE
821 status-detailed: null
822 vim-id: c31364ba-f573-4ab6-bf1a-fed30ede39a8
823 vnfd-id:
824 - 7637bcf8-cf14-42dc-ad70-c66fcf1e6e77
825 - _admin:
826 created: 1575034637.011233
827 current-operation: null
828 deployed:
829 K8s:
830 - k8scluster-uuid: 73d96432-d692-40d2-8440-e0c73aee209c
831 kdu-instance: stable-mongodb-0086856106
832 kdu-model: stable/mongodb
833 kdu-name: mongo
834 vnfr-id: 5ac34899-a23a-4b3c-918a-cd77acadbea6
835 - k8scluster-uuid: 73d96432-d692-40d2-8440-e0c73aee209c
836 kdu-instance: stable-openldap-0092830263
837 kdu-model: stable/mongodb
838 kdu-name: mongo
839 vnfr-id: 5ac34899-a23a-4b3c-918a-cd77acadbea6
840 RO:
841 detailed-status: Deployed at VIM
842 nsd_id: b03a8de8-1898-4142-bc6d-3b0787df567d
843 nsr_id: b5ce3e00-8647-415d-afaa-d5a612cf3074
844 nsr_status: ACTIVE
845 operational-status: running
846 vnfd:
847 - id: b9493dae-a4c9-4b96-8965-329581efb0a1
848 member-vnf-index: multikdu
849 VCA: []
850 modified: 1575034637.011233
851 nsState: INSTANTIATED
852 nslcmop: null
853 operation-type: null
854 projects_read:
855 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
856 projects_write:
857 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
858 _id: 0bcb701c-ee4d-41ab-8ee6-f4156f7f114d
859 additionalParamsForNs: null
860 admin-status: ENABLED
861 config-status: configured
862 constituent-vnfr-ref:
863 - 5ac34899-a23a-4b3c-918a-cd77acadbea6
864 create-time: 1575034636.9990137
865 datacenter: ea958ba5-4e58-4405-bf42-6e3be15d4c3a
866 description: default description
867 vcaStatus: {}
868 detailed-status: done
869 id: 0bcb701c-ee4d-41ab-8ee6-f4156f7f114d
870 instantiate_params:
871 nsDescription: default description
872 nsName: multikdu
873 nsdId: d0f63683-9032-4c6f-8928-ffd4674b9f69
874 vimAccountId: 74337dcb-ef54-41e7-bd2d-8c0d7fcd326f
875 name: multikdu
876 name-ref: multikdu
877 ns-instance-config-ref: 0bcb701c-ee4d-41ab-8ee6-f4156f7f114d
878 nsd-id: d0f63683-9032-4c6f-8928-ffd4674b9f69
879 nsd-name-ref: multikdu_ns
880 nsd-ref: multikdu_ns
881 operational-events: []
882 operational-status: init
883 orchestration-progress: {}
884 resource-orchestrator: osmopenmano
885 short-name: multikdu
886 ssh-authorized-key: null
887 vld:
888 - id: mgmtnet
889 name: null
890 status: ACTIVE
891 status-detailed: null
892 vim-id: 9b6a2ac4-767e-4ec9-9497-8ba63084c77f
893 vim-network-name: mgmt
894 vnfd-id:
895 - 7ab0d10d-8ce2-4c68-aef6-cc5a437a9c62
896 """
897
898 ro_ns_text = """
899 datacenter_tenant_id: dc5c67fa-c7f2-11e9-b9c0-02420aff0004
900 description: null
901 name: ALF
902 classifications: []
903 sdn_nets: []
904 nets:
905 - created: false
906 datacenter_id: dc51ce6c-c7f2-11e9-b9c0-02420aff0004
907 datacenter_tenant_id: dc5c67fa-c7f2-11e9-b9c0-02420aff0004
908 error_msg: null
909 ns_net_osm_id: mgmt
910 related: c6bac394-fa27-4c43-bb34-42f621a9d343
911 sce_net_id: 8f215bab-c35e-41e6-a035-42bfaa07af9f
912 sdn_net_id: null
913 status: ACTIVE
914 uuid: c6bac394-fa27-4c43-bb34-42f621a9d343
915 vim_info: "{vim_info: null}"
916 vim_name: null
917 vim_net_id: f99ae780-0e2f-4985-af41-574eae6919c0
918 vnf_net_id: null
919 vnf_net_osm_id: null
920 - created: true
921 datacenter_id: dc51ce6c-c7f2-11e9-b9c0-02420aff0004
922 datacenter_tenant_id: dc5c67fa-c7f2-11e9-b9c0-02420aff0004
923 error_msg: null
924 ns_net_osm_id: datanet
925 related: 509d576c-120f-493a-99a1-5fea99dfe041
926 sce_net_id: 3d766bbc-33a8-41aa-a986-2f35e8d25c16
927 sdn_net_id: null
928 status: ACTIVE
929 uuid: 509d576c-120f-493a-99a1-5fea99dfe041
930 vim_info: "{vim_info: null}"
931 vim_name: ALF-datanet
932 vim_net_id: c31364ba-f573-4ab6-bf1a-fed30ede39a8
933 vnf_net_id: null
934 vnf_net_osm_id: null
935 - created: true
936 datacenter_id: dc51ce6c-c7f2-11e9-b9c0-02420aff0004
937 datacenter_tenant_id: dc5c67fa-c7f2-11e9-b9c0-02420aff0004
938 error_msg: null
939 ns_net_osm_id: null
940 related: 277fed09-3220-4bfd-9052-b96b21a32daf
941 sce_net_id: null
942 sdn_net_id: null
943 status: ACTIVE
944 uuid: 277fed09-3220-4bfd-9052-b96b21a32daf
945 vim_info: "{vim_info: null}"
946 vim_name: ALF-internal
947 vim_net_id: ff181e6d-2597-4244-b40b-bb0174bdfeb6
948 vnf_net_id: 62e62fae-c12b-4ebc-9a9b-30031c6c16fa
949 vnf_net_osm_id: internal
950 - created: true
951 datacenter_id: dc51ce6c-c7f2-11e9-b9c0-02420aff0004
952 datacenter_tenant_id: dc5c67fa-c7f2-11e9-b9c0-02420aff0004
953 error_msg: null
954 ns_net_osm_id: null
955 related: 92534d1a-e697-4372-a84d-aa0aa643b68a
956 sce_net_id: null
957 sdn_net_id: null
958 status: ACTIVE
959 uuid: 92534d1a-e697-4372-a84d-aa0aa643b68a
960 vim_info: "{vim_info: null}"
961 vim_name: ALF-internal
962 vim_net_id: 09655387-b639-421a-b5f6-72b26d685fb4
963 vnf_net_id: 13c6c77d-86a5-4914-832c-990d4ec7b54e
964 vnf_net_osm_id: internal
965 nsd_osm_id: f48163a6-c807-47bc-9682-f72caef5af85.2.hackfest3charmed-ns
966 scenario_id: 876573b5-968d-40b9-b52b-91bf5c5844f7
967 scenario_name: hackfest3charmed-ns
968 sfis: []
969 sfps: []
970 sfs: []
971 tenant_id: 0ea38bd0-2729-47a9-ae07-c6ce76115eb2
972 uuid: c9fe9908-3180-430d-b633-fca2f68db008
973 vnfs:
974 - datacenter_id: dc51ce6c-c7f2-11e9-b9c0-02420aff0004
975 datacenter_tenant_id: dc5c67fa-c7f2-11e9-b9c0-02420aff0004
976 ip_address: 10.205.1.46
977 member_vnf_index: '1'
978 mgmt_access: '{interface_id: 61549ee3-cd6c-4930-8b90-eaad97fe345b, required: ''False'',
979 vm_id: 6cf4a48f-3b6c-4395-8221-119fa37de24a}
980
981 '
982 sce_vnf_id: 83be04a8-c513-42ba-9908-22728f686d31
983 uuid: 94724042-7576-4fb0-82ec-6a7ab642741c
984 vms:
985 - created_at: '2019-08-26T12:50:38'
986 error_msg: null
987 interfaces:
988 - external_name: vnf-mgmt
989 instance_net_id: c6bac394-fa27-4c43-bb34-42f621a9d343
990 internal_name: mgmtVM-eth0
991 ip_address: 10.205.1.46
992 mac_address: fa:16:3e:b4:3e:b1
993 sdn_port_id: null
994 type: mgmt
995 vim_info: "{vim_info: null}"
996 vim_interface_id: 4d3cb8fd-7040-4169-a0ad-2486d2b006a1
997 - external_name: null
998 instance_net_id: 277fed09-3220-4bfd-9052-b96b21a32daf
999 internal_name: mgmtVM-eth1
1000 ip_address: 192.168.54.2
1001 mac_address: fa:16:3e:6e:7e:78
1002 sdn_port_id: null
1003 type: bridge
1004 vim_info: "{vim_info: null}"
1005 vim_interface_id: 54ed68e2-9802-4dfe-b68a-280b3fc6e02d
1006 ip_address: 10.205.1.46
1007 name: mgmtVM
1008 related: d0b91293-a91d-4f08-b15f-0bf841216dfe
1009 status: ACTIVE
1010 uuid: d0b91293-a91d-4f08-b15f-0bf841216dfe
1011 vdu_osm_id: mgmtVM
1012 vim_info: "{vim_info: null}"
1013 vim_name: ALF-1-mgmtVM-1
1014 vim_vm_id: c2538499-4c30-41c0-acd5-80cb92f48061
1015 - created_at: '2019-08-26T12:50:38'
1016 error_msg: null
1017 interfaces:
1018 - external_name: null
1019 instance_net_id: 277fed09-3220-4bfd-9052-b96b21a32daf
1020 internal_name: dataVM-eth0
1021 ip_address: 192.168.54.3
1022 mac_address: fa:16:3e:d9:7a:5d
1023 sdn_port_id: null
1024 type: bridge
1025 vim_info: "{vim_info: null}"
1026 vim_interface_id: 1637f350-8840-4241-8ed0-4616bdcecfcf
1027 - external_name: vnf-data
1028 instance_net_id: 509d576c-120f-493a-99a1-5fea99dfe041
1029 internal_name: dataVM-xe0
1030 ip_address: 192.168.24.3
1031 mac_address: fa:16:3e:d1:6c:0d
1032 sdn_port_id: null
1033 type: bridge
1034 vim_info: "{vim_info: null}"
1035 vim_interface_id: 54c73e83-7059-41fe-83a9-4c4ae997b481
1036 name: dataVM
1037 related: 5c08253d-8a35-474f-b0d3-c5297d174c13
1038 status: ACTIVE
1039 uuid: 5c08253d-8a35-474f-b0d3-c5297d174c13
1040 vdu_osm_id: dataVM
1041 vim_info: "{vim_info: null}"
1042 vim_name: ALF-1-dataVM-1
1043 vim_vm_id: 87973c3f-365d-4227-95c2-7a8abc74349c
1044 - created_at: '2019-08-26T13:40:54'
1045 error_msg: null
1046 interfaces:
1047 - external_name: null
1048 instance_net_id: 277fed09-3220-4bfd-9052-b96b21a32daf
1049 internal_name: dataVM-eth0
1050 ip_address: 192.168.54.5
1051 mac_address: fa:16:3e:e4:17:45
1052 sdn_port_id: null
1053 type: bridge
1054 vim_info: "{vim_info: null}"
1055 vim_interface_id: 7e246e40-8710-4c33-9c95-78fc3c02bc5b
1056 - external_name: vnf-data
1057 instance_net_id: 509d576c-120f-493a-99a1-5fea99dfe041
1058 internal_name: dataVM-xe0
1059 ip_address: 192.168.24.5
1060 mac_address: fa:16:3e:29:6f:a6
1061 sdn_port_id: null
1062 type: bridge
1063 vim_info: "{vim_info: null}"
1064 vim_interface_id: ce81af7a-9adf-494b-950e-6581fd04ecc4
1065 name: dataVM
1066 related: 1ae5a0a2-c15a-49a4-a77c-2991d97f6dbe
1067 status: ACTIVE
1068 uuid: 1ae5a0a2-c15a-49a4-a77c-2991d97f6dbe
1069 vdu_osm_id: dataVM
1070 vim_info: "{vim_info: null}"
1071 vim_name: ALF-1-dataVM-2
1072 vim_vm_id: 4916533e-36c6-4861-9fe3-366a8fb0a5f8
1073 vnf_id: 1ab2a418-9fe3-4358-bf17-411e5155535f
1074 vnf_name: hackfest3charmed-vnf.1
1075 vnfd_osm_id: f48163a6-c807-47bc-9682-f72caef5af85.0.1
1076 - datacenter_id: dc51ce6c-c7f2-11e9-b9c0-02420aff0004
1077 datacenter_tenant_id: dc5c67fa-c7f2-11e9-b9c0-02420aff0004
1078 ip_address: 10.205.1.47
1079 member_vnf_index: '2'
1080 mgmt_access: '{interface_id: 538604c3-5c5e-41eb-8f84-c0239c7fabcd, required: ''False'',
1081 vm_id: dd04d792-05c9-4ecc-bf28-f77384d00311}
1082
1083 '
1084 sce_vnf_id: c4f3607a-08ff-4f75-893c-fce507e2f240
1085 uuid: 00020403-e80f-4ef2-bb7e-b29669643035
1086 vms:
1087 - created_at: '2019-08-26T12:50:38'
1088 error_msg: null
1089 interfaces:
1090 - external_name: vnf-mgmt
1091 instance_net_id: c6bac394-fa27-4c43-bb34-42f621a9d343
1092 internal_name: mgmtVM-eth0
1093 ip_address: 10.205.1.47
1094 mac_address: fa:16:3e:cb:9f:c7
1095 sdn_port_id: null
1096 type: mgmt
1097 vim_info: "{vim_info: null}"
1098 vim_interface_id: dcd6d2de-3c68-481c-883e-e9d38c671dc4
1099 - external_name: null
1100 instance_net_id: 92534d1a-e697-4372-a84d-aa0aa643b68a
1101 internal_name: mgmtVM-eth1
1102 ip_address: 192.168.231.1
1103 mac_address: fa:16:3e:1a:89:24
1104 sdn_port_id: null
1105 type: bridge
1106 vim_info: "{vim_info: null}"
1107 vim_interface_id: 50e538e3-aba0-4652-93bb-20487f3f28e1
1108 ip_address: 10.205.1.47
1109 name: mgmtVM
1110 related: 4543ab5d-578c-427c-9df2-affd17e21b66
1111 status: ACTIVE
1112 uuid: 4543ab5d-578c-427c-9df2-affd17e21b66
1113 vdu_osm_id: mgmtVM
1114 vim_info: "{vim_info: null}"
1115 vim_name: ALF-2-mgmtVM-1
1116 vim_vm_id: 248077b2-e3b8-4a37-8b72-575abb8ed912
1117 - created_at: '2019-08-26T12:50:38'
1118 error_msg: null
1119 interfaces:
1120 - external_name: null
1121 instance_net_id: 92534d1a-e697-4372-a84d-aa0aa643b68a
1122 internal_name: dataVM-eth0
1123 ip_address: 192.168.231.3
1124 mac_address: fa:16:3e:7e:ba:8c
1125 sdn_port_id: null
1126 type: bridge
1127 vim_info: "{vim_info: null}"
1128 vim_interface_id: 15274862-14ea-4527-b405-101cae8bc1a0
1129 - external_name: vnf-data
1130 instance_net_id: 509d576c-120f-493a-99a1-5fea99dfe041
1131 internal_name: dataVM-xe0
1132 ip_address: 192.168.24.4
1133 mac_address: fa:16:3e:d2:e1:f5
1134 sdn_port_id: null
1135 type: bridge
1136 vim_info: "{vim_info: null}"
1137 vim_interface_id: 253ebe4e-38d5-46be-8777-dbb57510a2ec
1138 name: dataVM
1139 related: 6f03f16b-295a-47a1-9a69-2d069d574a33
1140 status: ACTIVE
1141 uuid: 6f03f16b-295a-47a1-9a69-2d069d574a33
1142 vdu_osm_id: dataVM
1143 vim_info: "{vim_info: null}"
1144 vim_name: ALF-2-dataVM-1
1145 vim_vm_id: a4ce4372-e0ad-4ae3-8f9f-1c969f32e77b
1146 vnf_id: 0de348e3-c201-4f6a-91cc-7f957e2d5504
1147 vnf_name: hackfest3charmed-vnf.2
1148 vnfd_osm_id: f48163a6-c807-47bc-9682-f72caef5af85.1.2
1149 """
1150
1151 ro_delete_action_text = """
1152 actions:
1153 - created_at: 1580140763.1099188
1154 description: DELETE
1155 instance_id: c9fe9908-3180-430d-b633-fca2f68db008
1156 modified_at: 1580140763.253148
1157 number_done: 1
1158 number_failed: 0
1159 number_tasks: 1
1160 tenant_id: 0ea38bd0-2729-47a9-ae07-c6ce76115eb2
1161 uuid: delete
1162 vim_wim_actions:
1163 - action: DELETE
1164 created_at: 1580140763.1099188
1165 datacenter_vim_id: dc5c67fa-c7f2-11e9-b9c0-02420aff0004
1166 error_msg: null
1167 extra: '{params: [9b6a2ac4-767e-4ec9-9497-8ba63084c77f, null]}'
1168 instance_action_id: ACTION-1580140763.054037
1169 item: instance_nets
1170 item_id: 8cb06b72-c71d-4b58-b419-95025fa651d3
1171 modified_at: 1580140763.1099188
1172 related: 8cb06b72-c71d-4b58-b419-95025fa651d3
1173 status: SUPERSEDED
1174 task_index: 0
1175 vim_id: null
1176 wim_account_id: null
1177 wim_internal_id: null
1178 worker: null
1179 """
1180
1181 db_vim_accounts_text = """
1182 ---
1183 - _admin:
1184 created: 1566818150.3024442
1185 current_operation: 0
1186 deployed:
1187 RO: dc51ce6c-c7f2-11e9-b9c0-02420aff0004
1188 RO-account: dc5c67fa-c7f2-11e9-b9c0-02420aff0004
1189 detailed-status: Done
1190 modified: 1566818150.3024442
1191 operationalState: ENABLED
1192 operations:
1193 - detailed-status: Done
1194 lcmOperationType: create
1195 operationParams: null
1196 operationState: COMPLETED
1197 startTime: 1566818150.3025382
1198 statusEnteredTime: 1566818150.3025382
1199 worker: 86434c2948e2
1200 projects_read:
1201 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
1202 projects_write:
1203 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
1204 _id: ea958ba5-4e58-4405-bf42-6e3be15d4c3a
1205 description: some description here
1206 name: vim1
1207 schema_version: '1.1'
1208 vim_password: 5g0yGX86qIhprX86YTMcpg==
1209 vim_tenant_name: osm
1210 vim_type: openstack
1211 vim_url: http://10.95.87.162:5000/v2.0
1212 vim_user: osm
1213 - _admin:
1214 created: 1566818150.3024442
1215 current_operation: 0
1216 deployed:
1217 RO: 9ac17c0d-4265-4333-843b-c3cbd1f93f88
1218 RO-account: 011895dc-ab34-4c9f-b06f-401a8ffb073b
1219 detailed-status: Done
1220 modified: 1566818150.3024442
1221 operationalState: ENABLED
1222 operations:
1223 - detailed-status: Done
1224 lcmOperationType: create
1225 operationParams: null
1226 operationState: COMPLETED
1227 startTime: 1566818150.3025382
1228 statusEnteredTime: 1566818150.3025382
1229 worker: 86434c2948e2
1230 projects_read:
1231 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
1232 projects_write:
1233 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
1234 _id: 05357241-1a01-416f-9e02-af20f65f51cd
1235 description: No description
1236 name: vim2
1237 schema_version: '1.1'
1238 vim_password: 5g0yGX86qIhprX86YTMcpg==
1239 vim_tenant_name: osm
1240 vim_type: dumy
1241 vim_url: http://10.95.88.162:5000/v2.0
1242 vim_user: osm
1243 """
1244
1245 db_k8sclusters_text = """
1246 - _admin:
1247 created: 1575031378.9268339
1248 current_operation: 0
1249 modified: 1575031378.9268339
1250 operationalState: ENABLED
1251 operations:
1252 - detailed-status: ''
1253 lcmOperationType: create
1254 operationParams: null
1255 operationState: ''
1256 startTime: 1575031378.926895
1257 statusEnteredTime: 1575031378.926895
1258 worker: 36681ccf7f32
1259 projects_read:
1260 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
1261 projects_write:
1262 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
1263 helm-chart:
1264 id: 73d96432-d692-40d2-8440-e0c73aee209c
1265 created: True
1266 helm-chart-v3:
1267 id: 73d96432-d692-40d2-8440-e0c73aee209c
1268 created: True
1269 _id: e7169dab-f71a-4f1f-b82b-432605e8c4b3
1270 credentials:
1271 apiVersion: v1
1272 users:
1273 - name: admin
1274 user:
1275 password: qhpdogJXhBLG+JiYyyE0LeNsJXHkCSMy+sGVzlnJqes=
1276 username: admin
1277 description: Cluster3
1278 k8s_version: '1.15'
1279 name: cluster3
1280 namespace: kube-system
1281 nets:
1282 net1: None
1283 schema_version: '1.11'
1284 vim_account: ea958ba5-4e58-4405-bf42-6e3be15d4c3a
1285 """
1286
1287 db_vnfds_text = """
1288 ---
1289 - _admin:
1290 created: 1566823352.7154346
1291 modified: 1566823353.9295402
1292 onboardingState: ONBOARDED
1293 operationalState: ENABLED
1294 projects_read:
1295 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
1296 projects_write:
1297 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
1298 storage:
1299 descriptor: hackfest_3charmed_vnfd/hackfest_3charmed_vnfd.yaml
1300 folder: 7637bcf8-cf14-42dc-ad70-c66fcf1e6e77
1301 fs: local
1302 path: /app/storage/
1303 pkg-dir: hackfest_3charmed_vnfd
1304 zipfile: package.tar.gz
1305 type: vnfd
1306 usageState: NOT_IN_USE
1307 userDefinedData: {}
1308 _id: 7637bcf8-cf14-42dc-ad70-c66fcf1e6e77
1309 id: hackfest3charmed-vnf
1310 description: >-
1311 A VNF consisting of 2 VDUs connected to an internal VL, and one VDU
1312 with cloud-init
1313 product-name: hackfest3charmed-vnf
1314 version: '1.0'
1315 mgmt-cp: vnf-mgmt-ext
1316 virtual-compute-desc:
1317 - id: mgmt-compute
1318 virtual-cpu:
1319 num-virtual-cpu: 1
1320 virtual-memory:
1321 size: 1
1322 - id: data-compute
1323 virtual-cpu:
1324 num-virtual-cpu: 1
1325 virtual-memory:
1326 size: 1
1327
1328 virtual-storage-desc:
1329 - id: mgmt-storage
1330 block-storage-data:
1331 size-of-storage: 10
1332 - id: data-storage
1333 block-storage-data:
1334 size-of-storage: 10
1335
1336 sw-image-desc:
1337 - id: hackfest3-mgmt
1338 name: hackfest3-mgmt
1339
1340 vdu:
1341 - id: mgmtVM
1342 name: mgmtVM
1343 cloud-init-file: cloud-config.txt
1344 sw-image-desc: hackfest3-mgmt
1345 virtual-compute-desc: mgmt-compute
1346 virtual-storage-desc: mgmt-storage
1347 int-cpd:
1348 - id: vnf-mgmt
1349 order: 1
1350 virtual-network-interface-requirement:
1351 - name: mgmtVM-eth0
1352 virtual-interface:
1353 type: VIRTIO
1354 - id: mgmtVM-internal
1355 int-virtual-link-desc: internal
1356 order: 2
1357 virtual-network-interface-requirement:
1358 - name: mgmtVM-eth1
1359 virtual-interface:
1360 type: VIRTIO
1361 - id: dataVM
1362 name: dataVM
1363 sw-image-desc: hackfest3-mgmt
1364 virtual-compute-desc: data-compute
1365 virtual-storage-desc: data-storage
1366 int-cpd:
1367 - id: dataVM-internal
1368 int-virtual-link-desc: internal
1369 order: 1
1370 virtual-network-interface-requirement:
1371 - name: dataVM-eth1
1372 virtual-interface:
1373 type: VIRTIO
1374 - id: vnf-data
1375 order: 2
1376 virtual-network-interface-requirement:
1377 - name: dataVM-eth0
1378 virtual-interface:
1379 type: VIRTIO
1380 monitoring-parameter:
1381 - id: dataVM_cpu_util
1382 name: dataVM_cpu_util
1383 performance-metric: cpu_utilization
1384
1385 int-virtual-link-desc:
1386 - id: internal
1387
1388 ext-cpd:
1389 - id: vnf-mgmt-ext
1390 int-cpd: # Connection to int-cpd
1391 vdu-id: mgmtVM
1392 cpd: vnf-mgmt
1393 - id: vnf-data-ext
1394 int-cpd: # Connection to int-cpd
1395 vdu-id: dataVM
1396 cpd: vnf-data
1397
1398 df:
1399 - id: hackfest_default
1400 vdu-profile:
1401 - id: mgmtVM
1402 min-number-of-instances: 1
1403 - id: dataVM
1404 min-number-of-instances: 1
1405 max-number-of-instances: 10
1406 instantiation-level:
1407 - id: default
1408 vdu-level:
1409 - vdu-id: mgmtVM
1410 number-of-instances: 1
1411 - vdu-id: dataVM
1412 number-of-instances: 1
1413 scaling-aspect:
1414 - id: scale_dataVM
1415 name: scale_dataVM
1416 max-scale-level: 10
1417 aspect-delta-details:
1418 deltas:
1419 - id: delta1
1420 vdu-delta:
1421 - id: vdudelta1
1422 number-of-instances: 1
1423 scaling-policy:
1424 - name: auto_cpu_util_above_threshold
1425 scaling-type: automatic
1426 enabled: true
1427 threshold-time: 0
1428 cooldown-time: 60
1429 scaling-criteria:
1430 - name: cpu_util_above_threshold
1431 scale-in-relational-operation: LE
1432 scale-in-threshold: '15.0000000000'
1433 scale-out-relational-operation: GE
1434 scale-out-threshold: '60.0000000000'
1435 vnf-monitoring-param-ref: dataVM_cpu_util
1436 scaling-config-action:
1437 - trigger: post-scale-out
1438 vnf-config-primitive-name-ref: touch
1439 - trigger: pre-scale-in
1440 vnf-config-primitive-name-ref: touch
1441 lcm-operations-configuration:
1442 operate-vnf-op-config:
1443 day1-2:
1444 - id: hackfest3charmed-vnf
1445 execution-environment-list:
1446 - id: simple-ee
1447 juju:
1448 charm: simple
1449 initial-config-primitive:
1450 - seq: "1"
1451 execution-environment-ref: simple-ee
1452 name: config
1453 parameter:
1454 - name: ssh-hostname
1455 value: <rw_mgmt_ip>
1456 - name: ssh-username
1457 value: ubuntu
1458 - name: ssh-password
1459 value: osm4u
1460 - seq: "2"
1461 execution-environment-ref: simple-ee
1462 name: touch
1463 parameter:
1464 - name: filename
1465 value: <touch_filename>
1466 config-primitive:
1467 - name: touch
1468 execution-environment-ref: simple-ee
1469 parameter:
1470 - data-type: STRING
1471 default-value: <touch_filename2>
1472 name: filename
1473
1474 - _admin:
1475 created: 1575031727.5383403
1476 modified: 1575031727.5383403
1477 onboardingState: ONBOARDED
1478 operationalState: ENABLED
1479 projects_read:
1480 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
1481 projects_write:
1482 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
1483 storage:
1484 descriptor: multikdu_knf/multikdu_vnfd.yaml
1485 folder: 7ab0d10d-8ce2-4c68-aef6-cc5a437a9c62
1486 fs: local
1487 path: /app/storage/
1488 pkg-dir: multikdu_knf
1489 zipfile: multikdu_knf.tar.gz
1490 usageState: NOT_IN_USE
1491 userDefinedData: {}
1492 _id: 7ab0d10d-8ce2-4c68-aef6-cc5a437a9c62
1493 connection-point:
1494 - name: mgmt
1495 description: KNF with two KDU using helm-charts
1496 id: multikdu_knf
1497 df:
1498 - id: "default_df"
1499 k8s-cluster:
1500 nets:
1501 - external-connection-point-ref: mgmt
1502 id: mgmtnet
1503 kdu:
1504 - helm-chart: stable/openldap:1.2.1
1505 name: ldap
1506 - helm-chart: stable/mongodb
1507 name: mongo
1508 mgmt-interface:
1509 cp: mgmt
1510 name: multikdu_knf
1511 short-name: multikdu_knf
1512 vendor: Telefonica
1513 version: '1.0'
1514 """
1515
1516 db_vnfrs_text = """
1517 ---
1518 - _admin:
1519 created: 1566823354.3668208
1520 modified: 1566823354.3668208
1521 nsState: NOT_INSTANTIATED
1522 projects_read:
1523 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
1524 projects_write:
1525 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
1526 _id: 88d90b0c-faff-4b9f-bccd-017f33985984
1527 additionalParamsForVnf:
1528 touch_filename: /home/ubuntu/first-touch-1
1529 touch_filename2: /home/ubuntu/second-touch-1
1530 connection-point:
1531 - connection-point-id: vnf-mgmt
1532 id: vnf-mgmt
1533 name: vnf-mgmt
1534 - connection-point-id: vnf-data
1535 id: vnf-data
1536 name: vnf-data
1537 created-time: 1566823354.36234
1538 id: 88d90b0c-faff-4b9f-bccd-017f33985984
1539 ip-address: 10.205.1.46
1540 member-vnf-index-ref: '1'
1541 nsr-id-ref: f48163a6-c807-47bc-9682-f72caef5af85
1542 vdur:
1543 - _id: f0e7d7ce-2443-4dcb-ad0b-5ab9f3b13d37
1544 count-index: 0
1545 interfaces:
1546 - ip-address: 10.205.1.46
1547 mac-address: fa:16:3e:b4:3e:b1
1548 mgmt-vnf: true
1549 name: mgmtVM-eth0
1550 ns-vld-id: mgmt
1551 - ip-address: 192.168.54.2
1552 mac-address: fa:16:3e:6e:7e:78
1553 name: mgmtVM-eth1
1554 vnf-vld-id: internal
1555 internal-connection-point:
1556 - connection-point-id: mgmtVM-internal
1557 id: mgmtVM-internal
1558 name: mgmtVM-internal
1559 ip-address: 10.205.1.46
1560 name: ALF-1-mgmtVM-1
1561 status: ACTIVE
1562 status-detailed: null
1563 vdu-id-ref: mgmtVM
1564 vim-id: c2538499-4c30-41c0-acd5-80cb92f48061
1565 ns-image-id: 0
1566 ns-flavor-id: 0
1567 - _id: ab453219-2d9a-45c2-864d-2c0788385028
1568 count-index: 0
1569 interfaces:
1570 - ip-address: 192.168.54.3
1571 mac-address: fa:16:3e:d9:7a:5d
1572 name: dataVM-eth0
1573 vnf-vld-id: internal
1574 - ip-address: 192.168.24.3
1575 mac-address: fa:16:3e:d1:6c:0d
1576 name: dataVM-xe0
1577 ns-vld-id: datanet
1578 internal-connection-point:
1579 - connection-point-id: dataVM-internal
1580 id: dataVM-internal
1581 name: dataVM-internal
1582 ip-address: null
1583 name: ALF-1-dataVM-1
1584 status: ACTIVE
1585 status-detailed: null
1586 vdu-id-ref: dataVM
1587 vim-id: 87973c3f-365d-4227-95c2-7a8abc74349c
1588 ns-image-id: 0
1589 ns-flavor-id: 0
1590 vim-account-id: ea958ba5-4e58-4405-bf42-6e3be15d4c3a
1591 vld:
1592 - id: internal
1593 name: ALF-internal
1594 status: ACTIVE
1595 status-detailed: null
1596 vim-id: ff181e6d-2597-4244-b40b-bb0174bdfeb6
1597 vnfd-id: 7637bcf8-cf14-42dc-ad70-c66fcf1e6e77
1598 vnfd-ref: hackfest3charmed-vnf
1599 - _admin:
1600 created: 1566823354.3703845
1601 modified: 1566823354.3703845
1602 nsState: NOT_INSTANTIATED
1603 projects_read:
1604 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
1605 projects_write:
1606 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
1607 _id: 1ca3bb1a-b29b-49fe-bed6-5f3076d77434
1608 additionalParamsForVnf:
1609 touch_filename: /home/ubuntu/first-touch-2
1610 touch_filename2: /home/ubuntu/second-touch-2
1611 connection-point:
1612 - connection-point-id: vnf-mgmt
1613 id: vnf-mgmt
1614 name: vnf-mgmt
1615 - connection-point-id: vnf-data
1616 id: vnf-data
1617 name: vnf-data
1618 created-time: 1566823354.36234
1619 id: 1ca3bb1a-b29b-49fe-bed6-5f3076d77434
1620 ip-address: 10.205.1.47
1621 member-vnf-index-ref: '2'
1622 nsr-id-ref: f48163a6-c807-47bc-9682-f72caef5af85
1623 vdur:
1624 - _id: 190b4a2c-4f85-4cfe-9406-4cef7ffb1e67
1625 count-index: 0
1626 interfaces:
1627 - ip-address: 10.205.1.47
1628 mac-address: fa:16:3e:cb:9f:c7
1629 mgmt-vnf: true
1630 name: mgmtVM-eth0
1631 ns-vld-id: mgmt
1632 - ip-address: 192.168.231.1
1633 mac-address: fa:16:3e:1a:89:24
1634 name: mgmtVM-eth1
1635 vnf-vld-id: internal
1636 internal-connection-point:
1637 - connection-point-id: mgmtVM-internal
1638 id: mgmtVM-internal
1639 name: mgmtVM-internal
1640 ip-address: 10.205.1.47
1641 name: ALF-2-mgmtVM-1
1642 status: ACTIVE
1643 status-detailed: null
1644 vdu-id-ref: mgmtVM
1645 vim-id: 248077b2-e3b8-4a37-8b72-575abb8ed912
1646 ns-image-id: 0
1647 ns-flavor-id: 0
1648 - _id: 889b874d-e1c3-4e75-aa45-53a9b0ddabd9
1649 count-index: 0
1650 interfaces:
1651 - ip-address: 192.168.231.3
1652 mac-address: fa:16:3e:7e:ba:8c
1653 name: dataVM-eth0
1654 vnf-vld-id: internal
1655 - ip-address: 192.168.24.4
1656 mac-address: fa:16:3e:d2:e1:f5
1657 name: dataVM-xe0
1658 ns-vld-id: datanet
1659 internal-connection-point:
1660 - connection-point-id: dataVM-internal
1661 id: dataVM-internal
1662 name: dataVM-internal
1663 ip-address: null
1664 name: ALF-2-dataVM-1
1665 status: ACTIVE
1666 status-detailed: null
1667 vdu-id-ref: dataVM
1668 vim-id: a4ce4372-e0ad-4ae3-8f9f-1c969f32e77b
1669 ns-image-id: 0
1670 ns-flavor-id: 0
1671 vim-account-id: ea958ba5-4e58-4405-bf42-6e3be15d4c3a
1672 vld:
1673 - id: internal
1674 name: ALF-internal
1675 status: ACTIVE
1676 status-detailed: null
1677 vim-id: ff181e6d-2597-4244-b40b-bb0174bdfeb6
1678 vnfd-id: 7637bcf8-cf14-42dc-ad70-c66fcf1e6e77
1679 vnfd-ref: hackfest3charmed-vnf
1680 - _admin:
1681 created: 1575034637.009597
1682 modified: 1575034637.009597
1683 nsState: NOT_INSTANTIATED
1684 projects_read:
1685 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
1686 projects_write:
1687 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
1688 _id: 5ac34899-a23a-4b3c-918a-cd77acadbea6
1689 additionalParamsForVnf: null
1690 connection-point:
1691 - connection-point-id: null
1692 id: null
1693 name: mgmt
1694 created-time: 1575034636.9990137
1695 id: 5ac34899-a23a-4b3c-918a-cd77acadbea6
1696 ip-address: null
1697 k8s-cluster:
1698 nets:
1699 - external-connection-point-ref: mgmt
1700 id: mgmtnet
1701 ns-vld-id: mgmtnet
1702 vim_net: internal
1703 kdur:
1704 - ip-address: null
1705 k8s-cluster:
1706 id: e7169dab-f71a-4f1f-b82b-432605e8c4b3
1707 kdu-name: ldap
1708 helm-chart: stable/openldap:1.2.1
1709 - ip-address: null
1710 k8s-cluster:
1711 id: e7169dab-f71a-4f1f-b82b-432605e8c4b3
1712 kdu-name: mongo
1713 helm-chart: stable/mongodb
1714 member-vnf-index-ref: multikdu
1715 nsr-id-ref: 0bcb701c-ee4d-41ab-8ee6-f4156f7f114d
1716 vdur: []
1717 vim-account-id: 74337dcb-ef54-41e7-bd2d-8c0d7fcd326f
1718 vnfd-id: 7ab0d10d-8ce2-4c68-aef6-cc5a437a9c62
1719 vnfd-ref: multikdu_knf
1720 """
1721
1722 db_nslcmops_scale_text = """
1723 ---
1724 - _admin:
1725 created: 1565250912.2643092
1726 modified: 1570026174.83263
1727 projects_read:
1728 - d3581c99-31e3-45f9-b45c-49a290faedbc
1729 current_operation: '5'
1730 deployed:
1731 RO: d9aea288-b9b1-11e9-b19e-02420aff0006
1732 RO-account: d9bb2f1c-b9b1-11e9-b19e-02420aff0006
1733 detailed-status: Done
1734 modified: 1565250912.2643092
1735 operationalState: ENABLED
1736 operations:
1737 - member_vnf_index: '1'
1738 primitive: touch
1739 primitive_params: /home/ubuntu/last-touch-1
1740 operationState: COMPLETED
1741 detailed-status: Done
1742 - member_vnf_index: '1'
1743 primitive: touch
1744 primitive_params: /home/ubuntu/last-touch-2
1745 operationState: COMPLETED
1746 detailed-status: Done
1747 - member_vnf_index: '2'
1748 primitive: touch
1749 primitive_params: /home/ubuntu/last-touch-3
1750 operationState: COMPLETED
1751 detailed-status: Done
1752 projects_read:
1753 - b2d2ce4b-a1a0-4c01-847e-048632c43b40
1754 projects_write:
1755 - b2d2ce4b-a1a0-4c01-847e-048632c43b40
1756 worker: c4055a07655b
1757 deploy:
1758 RO: ACTION-1570026232.061742
1759 _id: 053967e8-7c1c-400f-ae82-3d45b291374b
1760 lcmOperationType: scale
1761 nsInstanceId: 90d9ebb7-2b5a-4b7c-bc34-a51fd7ef7b7b
1762 statusEnteredTime: 1570026243.09784
1763 startTime: 1570026174.8326
1764 operationParams:
1765 lcmOperationType: scale
1766 nsInstanceId: 90d9ebb7-2b5a-4b7c-bc34-a51fd7ef7b7b
1767 scaleVnfData:
1768 scaleByStepData:
1769 member-vnf-index: '1'
1770 scaling-group-descriptor: scale_scaling_group
1771 scaleVnfType: SCALE_IN
1772 scaleType: SCALE_VNF
1773 isAutomaticInvocation: false
1774 isCancelPending: false
1775 id: 053967e8-7c1c-400f-ae82-3d45b291374b
1776 links:
1777 nsInstance: "/osm/nslcm/v1/ns_instances/90d9ebb7-2b5a-4b7c-bc34-a51fd7ef7b7b"
1778 self: "/osm/nslcm/v1/ns_lcm_op_occs/053967e8-7c1c-400f-ae82-3d45b291374b"
1779 operationState: COMPLETED
1780 detailed-status: done
1781 """
1782
1783 test_ids = {
1784 # contains the ids of ns and operations of every test
1785 "TEST-A": {
1786 "ns": "f48163a6-c807-47bc-9682-f72caef5af85",
1787 "instantiate": "a639fac7-e0bb-4225-8ecb-c1f8efcc125e",
1788 "terminate": "a639fac7-e0bb-4225-ffff-c1f8efcc125e",
1789 },
1790 "TEST-KDU": {
1791 "ns": "0bcb701c-ee4d-41ab-8ee6-f4156f7f114d",
1792 "instantiate": "cf3aa178-7640-4174-b921-2330e6f2aad6",
1793 "terminate": None,
1794 }
1795 }