3c11a613fc5d2e068f0ef6f7cc5140e8a8581a2b
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
6 # http://www.apache.org/licenses/LICENSE-2.0
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
14 # For those usages not covered by the Apache License, Version 2.0 please
15 # contact: esousa@whitestack.com or alfonso.tiernosepulveda@telefonica.com
18 """Contains database content needed for tests"""
21 db_vim_accounts_text
= """
24 created: 1566818150.3024442
27 RO: dc51ce6c-c7f2-11e9-b9c0-02420aff0004
28 RO-account: dc5c67fa-c7f2-11e9-b9c0-02420aff0004
30 modified: 1566818150.3024442
31 operationalState: ENABLED
33 - detailed-status: Done
34 lcmOperationType: create
36 operationState: COMPLETED
37 startTime: 1566818150.3025382
38 statusEnteredTime: 1566818150.3025382
41 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
43 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
44 _id: ea958ba5-4e58-4405-bf42-6e3be15d4c3a
45 description: Openstack site 2, based on Mirantis, also called DSS9000-1, with
49 vim_password: 5g0yGX86qIhprX86YTMcpg==
52 vim_url: http://10.95.87.162:5000/v2.0
56 db_paas_accounts_text
= """
58 - _id: 3d93ca4e-b007-4d94-bbdc-61911078b864
64 secret: SCgY5peOGf98oqc00TNxfQ==
66 created: 1664533097.4940042
67 modified: 1664533116.9955606
69 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
71 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
72 operationalState: ENABLED
74 - lcmOperationType: create
75 operationState: COMPLETED
76 startTime: 1664533097.4943297
77 statusEnteredTime: 1664533097.4943297
78 detailed-status: PaaS validated
81 current_operation: null
82 detailed-status: "Connectivity: ok"
84 - _id: c2538499-4c30-41c0-acd5-80cb92f45555
90 secret: 5g0yGX86qIhprX86YTMcpg==
92 created: 1664533097.4940042
93 modified: 1664533116.9955606
95 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
97 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
98 operationalState: ENABLED
100 - lcmOperationType: create
101 operationState: COMPLETED
102 startTime: 1664533097.4943297
103 statusEnteredTime: 1664533097.4943297
104 detailed-status: PaaS validated
105 operationParams: null
107 current_operation: null
108 detailed-status: "Connectivity: ok"
115 created: 1566823352.7154346
116 modified: 1566823353.9295402
117 onboardingState: ONBOARDED
118 operationalState: ENABLED
120 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
122 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
124 descriptor: hackfest_3charmed_vnfd/hackfest_3charmed_vnfd.yaml
125 folder: 7637bcf8-cf14-42dc-ad70-c66fcf1e6e77
128 pkg-dir: hackfest_3charmed_vnfd
129 zipfile: package.tar.gz
131 usageState: NOT_IN_USE
133 _id: 7637bcf8-cf14-42dc-ad70-c66fcf1e6e77
134 id: hackfest3charmed-vnf
136 A VNF consisting of 2 VDUs connected to an internal VL, and one VDU with
138 product-name: hackfest3charmed-vnf
140 mgmt-cp: vnf-mgmt-ext
142 virtual-compute-desc:
154 virtual-storage-desc:
167 cloud-init-file: cloud-config.txt
168 sw-image-desc: hackfest3-mgmt
169 virtual-compute-desc: mgmt-compute
170 virtual-storage-desc:
174 virtual-network-interface-requirement:
179 - id: mgmtVM-internal
180 int-virtual-link-desc: internal
181 virtual-network-interface-requirement:
188 sw-image-desc: hackfest3-mgmt
189 virtual-compute-desc: data-compute
190 virtual-storage-desc:
193 - id: dataVM-internal
194 int-virtual-link-desc: internal
195 virtual-network-interface-requirement:
201 virtual-network-interface-requirement:
206 monitoring-parameter:
207 - id: dataVM_cpu_util
208 name: dataVM_cpu_util
209 performance-metric: cpu_utilization
211 int-virtual-link-desc:
216 int-cpd: # Connection to int-cpd
220 int-cpd: # Connection to int-cpd
225 - id: hackfest_default
228 min-number-of-instances: 1
230 min-number-of-instances: 1
231 max-number-of-instances: 10
236 number-of-instances: 1
238 number-of-instances: 1
243 aspect-delta-details:
248 number-of-instances: 1
250 - name: auto_cpu_util_above_threshold
251 scaling-type: automatic
256 - name: cpu_util_above_threshold
257 scale-in-relational-operation: LE
258 scale-in-threshold: '15.0000000000'
259 scale-out-relational-operation: GE
260 scale-out-threshold: '60.0000000000'
261 vnf-monitoring-param-ref: dataVM_cpu_util
262 scaling-config-action:
263 - trigger: post-scale-out
264 vnf-config-primitive-name-ref: touch
265 - trigger: pre-scale-in
266 vnf-config-primitive-name-ref: touch
267 lcm-operations-configuration:
268 operate-vnf-op-config:
270 - id: hackfest3charmed-vnf
271 execution-environment-list:
275 initial-config-primitive:
277 execution-environment-ref: simple-ee
287 execution-environment-ref: simple-ee
291 value: <touch_filename>
294 execution-environment-ref: simple-ee
297 default-value: <touch_filename2>
304 created: 1566823353.971486
305 modified: 1566823353.971486
306 onboardingState: ONBOARDED
307 operationalState: ENABLED
309 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
311 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
313 descriptor: hackfest_3charmed_nsd/hackfest_3charmed_nsd.yaml
314 folder: 8c2f8b95-bb1b-47ee-8001-36dc090678da
317 pkg-dir: hackfest_3charmed_nsd
318 zipfile: package.tar.gz
319 usageState: NOT_IN_USE
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
329 - hackfest3charmed-vnf
335 mgmt-network: "false"
338 - id: hackfest_charmed_DF
340 - id: hackfest_vnf1 # member-vnf-index-ref: 1
341 vnfd-id: hackfest3charmed-vnf
342 virtual-link-connectivity:
343 - virtual-link-profile-id: mgmt
345 - constituent-base-element-id: hackfest_vnf1
346 constituent-cpd-id: vnf-mgmt-ext
347 - virtual-link-profile-id: datanet
349 - constituent-base-element-id: hackfest_vnf1
350 constituent-cpd-id: vnf-data-ext
351 - id: hackfest_vnf2 # member-vnf-index-ref: 2
352 vnfd-id: hackfest3charmed-vnf
353 virtual-link-connectivity:
354 - virtual-link-profile-id: mgmt
356 - constituent-base-element-id: hackfest_vnf2
357 constituent-cpd-id: vnf-mgmt-ext
358 - virtual-link-profile-id: datanet
360 - constituent-base-element-id: hackfest_vnf2
361 constituent-cpd-id: vnf-data-ext
367 created: 1566823354.3716335
368 modified: 1566823354.3716335
369 nsState: NOT_INSTANTIATED
372 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
374 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
375 _id: f48163a6-c807-47bc-9682-f72caef5af85
376 additionalParamsForNs: null
377 admin-status: ENABLED
379 constituent-vnfr-ref:
380 - 88d90b0c-faff-4b9f-bccd-017f33985984
381 - 1ca3bb1a-b29b-49fe-bed6-5f3076d77434
382 create-time: 1566823354.36234
383 datacenter: ea958ba5-4e58-4405-bf42-6e3be15d4c3a
384 description: default description
385 detailed-status: 'ERROR executing proxy charm initial primitives for member_vnf_index=1
386 vdu_id=None: charm error executing primitive verify-ssh-credentials for member_vnf_index=1
387 vdu_id=None: ''timeout after 600 seconds'''
388 id: f48163a6-c807-47bc-9682-f72caef5af85
390 nsDescription: default description
392 nsdId: 8c2f8b95-bb1b-47ee-8001-36dc090678da
393 vimAccountId: ea958ba5-4e58-4405-bf42-6e3be15d4c3a
396 ns-instance-config-ref: f48163a6-c807-47bc-9682-f72caef5af85
399 created: 1566823353.971486
400 modified: 1566823353.971486
401 onboardingState: ONBOARDED
402 operationalState: ENABLED
404 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
406 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
408 descriptor: hackfest_3charmed_nsd/hackfest_3charmed_nsd.yaml
409 folder: 8c2f8b95-bb1b-47ee-8001-36dc090678da
412 pkg-dir: hackfest_3charmed_nsd
413 zipfile: package.tar.gz
414 usageState: NOT_IN_USE
416 _id: 8c2f8b95-bb1b-47ee-8001-36dc090678da
417 id: hackfest3charmed-ns
418 name: hackfest3charmed-ns
419 description: NS with 2 VNFs hackfest3charmed-vnf connected by datanet and mgmtnet VLs
424 - hackfest3charmed-vnf
430 mgmt-network: "false"
433 - id: hackfest_charmed_DF
435 - id: hackfest_vnf1 # member-vnf-index-ref: 1
436 vnfd-id: hackfest3charmed-vnf
437 virtual-link-connectivity:
438 - virtual-link-profile-id: mgmt
440 - constituent-base-element-id: hackfest_vnf1
441 constituent-cpd-id: vnf-mgmt-ext
442 - virtual-link-profile-id: datanet
444 - constituent-base-element-id: hackfest_vnf1
445 constituent-cpd-id: vnf-data-ext
446 - id: hackfest_vnf2 # member-vnf-index-ref: 2
447 vnfd-id: hackfest3charmed-vnf
448 virtual-link-connectivity:
449 - virtual-link-profile-id: mgmt
451 - constituent-base-element-id: hackfest_vnf2
452 constituent-cpd-id: vnf-mgmt-ext
453 - virtual-link-profile-id: datanet
455 - constituent-base-element-id: hackfest_vnf2
456 constituent-cpd-id: vnf-data-ext
457 nsd-id: 8c2f8b95-bb1b-47ee-8001-36dc090678da
458 nsd-name-ref: hackfest3charmed-ns
459 nsd-ref: hackfest3charmed-ns
460 operational-events: []
461 operational-status: failed
462 orchestration-progress: {}
463 resource-orchestrator: osmopenmano
465 ssh-authorized-key: null
470 status-detailed: null
471 vim-id: f99ae780-0e2f-4985-af41-574eae6919c0
472 vim-network-name: mgmt
476 status-detailed: null
477 vim-id: c31364ba-f573-4ab6-bf1a-fed30ede39a8
479 - 7637bcf8-cf14-42dc-ad70-c66fcf1e6e77
482 db_nslcmops_text
= """
485 created: 1566823354.4148262
486 modified: 1566823354.4148262
488 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
490 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
492 _id: a639fac7-e0bb-4225-8ecb-c1f8efcc125e
493 detailed-status: 'FAILED executing proxy charm initial primitives for member_vnf_index=1
494 vdu_id=None: charm error executing primitive verify-ssh-credentials for member_vnf_index=1
495 vdu_id=None: ''timeout after 600 seconds'''
496 id: a639fac7-e0bb-4225-8ecb-c1f8efcc125e
497 isAutomaticInvocation: false
498 isCancelPending: false
499 lcmOperationType: instantiate
501 nsInstance: /osm/nslcm/v1/ns_instances/f48163a6-c807-47bc-9682-f72caef5af85
502 self: /osm/nslcm/v1/ns_lcm_op_occs/a639fac7-e0bb-4225-8ecb-c1f8efcc125e
503 nsInstanceId: f48163a6-c807-47bc-9682-f72caef5af85
505 additionalParamsForVnf:
507 touch_filename: /home/ubuntu/first-touch-1
508 touch_filename2: /home/ubuntu/second-touch-1
509 member-vnf-index: '1'
511 touch_filename: /home/ubuntu/first-touch-2
512 touch_filename2: /home/ubuntu/second-touch-2
513 member-vnf-index: '2'
514 lcmOperationType: instantiate
515 nsDescription: default description
516 nsInstanceId: f48163a6-c807-47bc-9682-f72caef5af85
518 nsdId: 8c2f8b95-bb1b-47ee-8001-36dc090678da
519 vimAccountId: ea958ba5-4e58-4405-bf42-6e3be15d4c3a
520 operationState: FAILED
521 startTime: 1566823354.414689
522 statusEnteredTime: 1566824534.5112448
528 created: 1566823354.3668208
529 modified: 1566823354.3668208
530 nsState: NOT_INSTANTIATED
532 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
534 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
535 _id: 88d90b0c-faff-4b9f-bccd-017f33985984
536 additionalParamsForVnf:
537 touch_filename: /home/ubuntu/first-touch-1
538 touch_filename2: /home/ubuntu/second-touch-1
540 - connection-point-id: vnf-mgmt
543 - connection-point-id: vnf-data
546 created-time: 1566823354.36234
547 id: 88d90b0c-faff-4b9f-bccd-017f33985984
548 ip-address: 10.205.1.46
549 member-vnf-index-ref: '1'
550 nsr-id-ref: f48163a6-c807-47bc-9682-f72caef5af85
552 - _id: f0e7d7ce-2443-4dcb-ad0b-5ab9f3b13d37
555 - ip-address: 10.205.1.46
556 mac-address: fa:16:3e:b4:3e:b1
561 - ip-address: 192.168.54.2
562 mac-address: fa:16:3e:6e:7e:78
566 internal-connection-point:
567 - connection-point-id: mgmtVM-internal
569 name: mgmtVM-internal
570 ip-address: 10.205.1.46
573 status-detailed: null
575 vim-id: c2538499-4c30-41c0-acd5-80cb92f48061
576 - _id: ab453219-2d9a-45c2-864d-2c0788385028
579 - ip-address: 192.168.54.3
580 mac-address: fa:16:3e:d9:7a:5d
583 - ip-address: 192.168.24.3
584 mac-address: fa:16:3e:d1:6c:0d
587 internal-connection-point:
588 - connection-point-id: dataVM-internal
590 name: dataVM-internal
594 status-detailed: null
596 vim-id: 87973c3f-365d-4227-95c2-7a8abc74349c
597 vim-account-id: ea958ba5-4e58-4405-bf42-6e3be15d4c3a
602 status-detailed: null
603 vim-id: ff181e6d-2597-4244-b40b-bb0174bdfeb6
604 vnfd-id: 7637bcf8-cf14-42dc-ad70-c66fcf1e6e77
605 vnfd-ref: hackfest3charmed-vnf
607 created: 1566823354.3703845
608 modified: 1566823354.3703845
609 nsState: NOT_INSTANTIATED
611 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
613 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
614 _id: 1ca3bb1a-b29b-49fe-bed6-5f3076d77434
615 additionalParamsForVnf:
616 touch_filename: /home/ubuntu/first-touch-2
617 touch_filename2: /home/ubuntu/second-touch-2
619 - connection-point-id: vnf-mgmt
622 - connection-point-id: vnf-data
625 created-time: 1566823354.36234
626 id: 1ca3bb1a-b29b-49fe-bed6-5f3076d77434
627 ip-address: 10.205.1.47
628 member-vnf-index-ref: '2'
629 nsr-id-ref: f48163a6-c807-47bc-9682-f72caef5af85
631 - _id: 190b4a2c-4f85-4cfe-9406-4cef7ffb1e67
634 - ip-address: 10.205.1.47
635 mac-address: fa:16:3e:cb:9f:c7
639 - ip-address: 192.168.231.1
640 mac-address: fa:16:3e:1a:89:24
643 internal-connection-point:
644 - connection-point-id: mgmtVM-internal
646 name: mgmtVM-internal
647 ip-address: 10.205.1.47
650 status-detailed: null
652 vim-id: 248077b2-e3b8-4a37-8b72-575abb8ed912
653 - _id: 889b874d-e1c3-4e75-aa45-53a9b0ddabd9
656 - ip-address: 192.168.231.3
657 mac-address: fa:16:3e:7e:ba:8c
660 - ip-address: 192.168.24.4
661 mac-address: fa:16:3e:d2:e1:f5
664 internal-connection-point:
665 - connection-point-id: dataVM-internal
667 name: dataVM-internal
671 status-detailed: null
673 vim-id: a4ce4372-e0ad-4ae3-8f9f-1c969f32e77b
674 vim-account-id: ea958ba5-4e58-4405-bf42-6e3be15d4c3a
679 status-detailed: null
680 vim-id: ff181e6d-2597-4244-b40b-bb0174bdfeb6
681 vnfd-id: 7637bcf8-cf14-42dc-ad70-c66fcf1e6e77
682 vnfd-ref: hackfest3charmed-vnf
685 db_vnfm_vnfd_text
= """
688 created: 1647529096.3635302
689 modified: 1650456936.518325
690 onboardingState: ONBOARDED
691 operationalState: ENABLED
693 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
695 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
697 descriptor: hackfest_basic_metrics_vnf/hackfest_basic_metrics_vnfd.yaml
698 folder: 70b47595-fafa-4f63-904b-fc3ada60eebb
701 pkg-dir: hackfest_basic_metrics_vnf
702 zipfile: package.tar.gz
704 usageState: NOT_IN_USE
706 _id: 70b47595-fafa-4f63-904b-fc3ada60eebb
709 href: /vnfpkgm/v1/vnf_packages/70b47595-fafa-4f63-904b-fc3ada60eebb/package_content
711 href: /vnfpkgm/v1/vnf_packages/70b47595-fafa-4f63-904b-fc3ada60eebb
713 href: /vnfpkgm/v1/vnf_packages/70b47595-fafa-4f63-904b-fc3ada60eebb/vnfd
714 description: A basic VNF descriptor with one VDU and VIM metrics
718 - id: default-instantiation-level
720 - number-of-instances: 1
721 vdu-id: hackfest_basic_metrics-VM
723 - aspect-delta-details:
725 - id: vdu_autoscale-delta
727 - id: hackfest_basic_metrics-VM
728 number-of-instances: 1
734 name: cpu_util_above_threshold
736 - name: cpu_util_above_threshold
737 scale-in-relational-operation: LT
738 scale-in-threshold: '10.0000000000'
739 scale-out-relational-operation: GT
740 scale-out-threshold: '60.0000000000'
741 vnf-monitoring-param-ref: vnf_cpu_util
742 scaling-type: automatic
745 - id: hackfest_basic_metrics-VM
746 max-number-of-instances: 2
747 min-number-of-instances: 1
752 vdu-id: hackfest_basic_metrics-VM
753 id: hackfest_basic_metrics-vnf
755 onboardingState: ONBOARDED
756 operationalState: ENABLED
757 product-name: hackfest_basic_metrics-vnf
762 - id: ubuntu18.04-aws
763 image: ubuntu/images/hvm-ssd/ubuntu-artful-17.10-amd64-server-20180509
764 name: ubuntu18.04-aws
766 - id: ubuntu18.04-azure
767 image: Canonical:UbuntuServer:18.04-LTS:latest
768 name: ubuntu18.04-azure
770 - id: ubuntu18.04-gcp
771 image: ubuntu-os-cloud:image-family:ubuntu-1804-lts
772 name: ubuntu18.04-gcp
774 usageState: NOT_IN_USE
779 - url: https://webhook.site/b79f9bf9-4c19-429d-81ed-19be26a3d5d8
781 - url: https://webhook.site/b79f9bf9-4c19-429d-81ed-19be26a3d5d8
783 - url: https://webhook.site/b79f9bf9-4c19-429d-81ed-19be26a3d5d8
787 vnf-monitoring-param-ref: vnf_cpu_util
788 alternative-sw-image-desc:
792 cloud-init-file: cloud-config
793 id: hackfest_basic_metrics-VM
796 virtual-network-interface-requirement:
800 monitoring-parameter:
803 performance-metric: cpu_utilization
804 - id: vnf_memory_util
805 name: vnf_memory_util
806 performance-metric: average_memory_utilization
807 - id: vnf_packets_sent
808 name: vnf_packets_sent
809 performance-metric: packets_sent
810 - id: vnf_packets_received
811 name: vnf_packets_received
812 performance-metric: packets_received
813 name: hackfest_basic_metrics-VM
814 sw-image-desc: bionic
815 virtual-compute-desc: hackfest_basic_metrics-VM-compute
816 virtual-storage-desc:
817 - hackfest_basic_metrics-VM-storage
819 virtual-compute-desc:
820 - id: hackfest_basic_metrics-VM-compute
825 virtual-storage-desc:
826 - id: hackfest_basic_metrics-VM-storage
827 size-of-storage: '10'