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
59 created: 1566823352.7154346
60 modified: 1566823353.9295402
61 onboardingState: ONBOARDED
62 operationalState: ENABLED
64 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
66 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
68 descriptor: hackfest_3charmed_vnfd/hackfest_3charmed_vnfd.yaml
69 folder: 7637bcf8-cf14-42dc-ad70-c66fcf1e6e77
72 pkg-dir: hackfest_3charmed_vnfd
73 zipfile: package.tar.gz
75 usageState: NOT_IN_USE
77 _id: 7637bcf8-cf14-42dc-ad70-c66fcf1e6e77
78 id: hackfest3charmed-vnf
80 A VNF consisting of 2 VDUs connected to an internal VL, and one VDU with
82 product-name: hackfest3charmed-vnf
111 cloud-init-file: cloud-config.txt
112 sw-image-desc: hackfest3-mgmt
113 virtual-compute-desc: mgmt-compute
114 virtual-storage-desc:
118 virtual-network-interface-requirement:
123 - id: mgmtVM-internal
124 int-virtual-link-desc: internal
125 virtual-network-interface-requirement:
132 sw-image-desc: hackfest3-mgmt
133 virtual-compute-desc: data-compute
134 virtual-storage-desc:
137 - id: dataVM-internal
138 int-virtual-link-desc: internal
139 virtual-network-interface-requirement:
145 virtual-network-interface-requirement:
150 monitoring-parameter:
151 - id: dataVM_cpu_util
152 name: dataVM_cpu_util
153 performance-metric: cpu_utilization
155 int-virtual-link-desc:
160 int-cpd: # Connection to int-cpd
164 int-cpd: # Connection to int-cpd
169 - id: hackfest_default
172 min-number-of-instances: 1
174 min-number-of-instances: 1
175 max-number-of-instances: 10
180 number-of-instances: 1
182 number-of-instances: 1
187 aspect-delta-details:
192 number-of-instances: 1
194 - name: auto_cpu_util_above_threshold
195 scaling-type: automatic
200 - name: cpu_util_above_threshold
201 scale-in-relational-operation: LE
202 scale-in-threshold: '15.0000000000'
203 scale-out-relational-operation: GE
204 scale-out-threshold: '60.0000000000'
205 vnf-monitoring-param-ref: dataVM_cpu_util
206 scaling-config-action:
207 - trigger: post-scale-out
208 vnf-config-primitive-name-ref: touch
209 - trigger: pre-scale-in
210 vnf-config-primitive-name-ref: touch
211 lcm-operations-configuration:
212 operate-vnf-op-config:
214 - id: hackfest3charmed-vnf
215 execution-environment-list:
219 initial-config-primitive:
221 execution-environment-ref: simple-ee
231 execution-environment-ref: simple-ee
235 value: <touch_filename>
238 execution-environment-ref: simple-ee
241 default-value: <touch_filename2>
248 created: 1566823353.971486
249 modified: 1566823353.971486
250 onboardingState: ONBOARDED
251 operationalState: ENABLED
253 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
255 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
257 descriptor: hackfest_3charmed_nsd/hackfest_3charmed_nsd.yaml
258 folder: 8c2f8b95-bb1b-47ee-8001-36dc090678da
261 pkg-dir: hackfest_3charmed_nsd
262 zipfile: package.tar.gz
263 usageState: NOT_IN_USE
265 _id: 8c2f8b95-bb1b-47ee-8001-36dc090678da
266 id: hackfest3charmed-ns
267 name: hackfest3charmed-ns
268 description: NS with 2 VNFs hackfest3charmed-vnf connected by datanet and mgmtnet VLs
273 - hackfest3charmed-vnf
279 mgmt-network: "false"
282 - id: hackfest_charmed_DF
284 - id: hackfest_vnf1 # member-vnf-index-ref: 1
285 vnfd-id: hackfest3charmed-vnf
286 virtual-link-connectivity:
287 - virtual-link-profile-id: mgmt
289 - constituent-base-element-id: hackfest_vnf1
290 constituent-cpd-id: vnf-mgmt-ext
291 - virtual-link-profile-id: datanet
293 - constituent-base-element-id: hackfest_vnf1
294 constituent-cpd-id: vnf-data-ext
295 - id: hackfest_vnf2 # member-vnf-index-ref: 2
296 vnfd-id: hackfest3charmed-vnf
297 virtual-link-connectivity:
298 - virtual-link-profile-id: mgmt
300 - constituent-base-element-id: hackfest_vnf2
301 constituent-cpd-id: vnf-mgmt-ext
302 - virtual-link-profile-id: datanet
304 - constituent-base-element-id: hackfest_vnf2
305 constituent-cpd-id: vnf-data-ext
311 created: 1566823354.3716335
312 modified: 1566823354.3716335
313 nsState: NOT_INSTANTIATED
316 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
318 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
319 _id: f48163a6-c807-47bc-9682-f72caef5af85
320 additionalParamsForNs: null
321 admin-status: ENABLED
323 constituent-vnfr-ref:
324 - 88d90b0c-faff-4b9f-bccd-017f33985984
325 - 1ca3bb1a-b29b-49fe-bed6-5f3076d77434
326 create-time: 1566823354.36234
327 datacenter: ea958ba5-4e58-4405-bf42-6e3be15d4c3a
328 description: default description
329 detailed-status: 'ERROR executing proxy charm initial primitives for member_vnf_index=1
330 vdu_id=None: charm error executing primitive verify-ssh-credentials for member_vnf_index=1
331 vdu_id=None: ''timeout after 600 seconds'''
332 id: f48163a6-c807-47bc-9682-f72caef5af85
334 nsDescription: default description
336 nsdId: 8c2f8b95-bb1b-47ee-8001-36dc090678da
337 vimAccountId: ea958ba5-4e58-4405-bf42-6e3be15d4c3a
340 ns-instance-config-ref: f48163a6-c807-47bc-9682-f72caef5af85
343 created: 1566823353.971486
344 modified: 1566823353.971486
345 onboardingState: ONBOARDED
346 operationalState: ENABLED
348 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
350 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
352 descriptor: hackfest_3charmed_nsd/hackfest_3charmed_nsd.yaml
353 folder: 8c2f8b95-bb1b-47ee-8001-36dc090678da
356 pkg-dir: hackfest_3charmed_nsd
357 zipfile: package.tar.gz
358 usageState: NOT_IN_USE
360 _id: 8c2f8b95-bb1b-47ee-8001-36dc090678da
361 id: hackfest3charmed-ns
362 name: hackfest3charmed-ns
363 description: NS with 2 VNFs hackfest3charmed-vnf connected by datanet and mgmtnet VLs
368 - hackfest3charmed-vnf
374 mgmt-network: "false"
377 - id: hackfest_charmed_DF
379 - id: hackfest_vnf1 # member-vnf-index-ref: 1
380 vnfd-id: hackfest3charmed-vnf
381 virtual-link-connectivity:
382 - virtual-link-profile-id: mgmt
384 - constituent-base-element-id: hackfest_vnf1
385 constituent-cpd-id: vnf-mgmt-ext
386 - virtual-link-profile-id: datanet
388 - constituent-base-element-id: hackfest_vnf1
389 constituent-cpd-id: vnf-data-ext
390 - id: hackfest_vnf2 # member-vnf-index-ref: 2
391 vnfd-id: hackfest3charmed-vnf
392 virtual-link-connectivity:
393 - virtual-link-profile-id: mgmt
395 - constituent-base-element-id: hackfest_vnf2
396 constituent-cpd-id: vnf-mgmt-ext
397 - virtual-link-profile-id: datanet
399 - constituent-base-element-id: hackfest_vnf2
400 constituent-cpd-id: vnf-data-ext
401 nsd-id: 8c2f8b95-bb1b-47ee-8001-36dc090678da
402 nsd-name-ref: hackfest3charmed-ns
403 nsd-ref: hackfest3charmed-ns
404 operational-events: []
405 operational-status: failed
406 orchestration-progress: {}
407 resource-orchestrator: osmopenmano
409 ssh-authorized-key: null
414 status-detailed: null
415 vim-id: f99ae780-0e2f-4985-af41-574eae6919c0
416 vim-network-name: mgmt
420 status-detailed: null
421 vim-id: c31364ba-f573-4ab6-bf1a-fed30ede39a8
423 - 7637bcf8-cf14-42dc-ad70-c66fcf1e6e77
426 db_nslcmops_text
= """
429 created: 1566823354.4148262
430 modified: 1566823354.4148262
432 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
434 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
436 _id: a639fac7-e0bb-4225-8ecb-c1f8efcc125e
437 detailed-status: 'FAILED executing proxy charm initial primitives for member_vnf_index=1
438 vdu_id=None: charm error executing primitive verify-ssh-credentials for member_vnf_index=1
439 vdu_id=None: ''timeout after 600 seconds'''
440 id: a639fac7-e0bb-4225-8ecb-c1f8efcc125e
441 isAutomaticInvocation: false
442 isCancelPending: false
443 lcmOperationType: instantiate
445 nsInstance: /osm/nslcm/v1/ns_instances/f48163a6-c807-47bc-9682-f72caef5af85
446 self: /osm/nslcm/v1/ns_lcm_op_occs/a639fac7-e0bb-4225-8ecb-c1f8efcc125e
447 nsInstanceId: f48163a6-c807-47bc-9682-f72caef5af85
449 additionalParamsForVnf:
451 touch_filename: /home/ubuntu/first-touch-1
452 touch_filename2: /home/ubuntu/second-touch-1
453 member-vnf-index: '1'
455 touch_filename: /home/ubuntu/first-touch-2
456 touch_filename2: /home/ubuntu/second-touch-2
457 member-vnf-index: '2'
458 lcmOperationType: instantiate
459 nsDescription: default description
460 nsInstanceId: f48163a6-c807-47bc-9682-f72caef5af85
462 nsdId: 8c2f8b95-bb1b-47ee-8001-36dc090678da
463 vimAccountId: ea958ba5-4e58-4405-bf42-6e3be15d4c3a
464 operationState: FAILED
465 startTime: 1566823354.414689
466 statusEnteredTime: 1566824534.5112448
472 created: 1566823354.3668208
473 modified: 1566823354.3668208
475 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
477 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
478 _id: 88d90b0c-faff-4b9f-bccd-017f33985984
479 additionalParamsForVnf:
480 touch_filename: /home/ubuntu/first-touch-1
481 touch_filename2: /home/ubuntu/second-touch-1
483 - connection-point-id: vnf-mgmt
486 - connection-point-id: vnf-data
489 created-time: 1566823354.36234
490 id: 88d90b0c-faff-4b9f-bccd-017f33985984
491 ip-address: 10.205.1.46
492 member-vnf-index-ref: '1'
493 nsr-id-ref: f48163a6-c807-47bc-9682-f72caef5af85
495 - _id: f0e7d7ce-2443-4dcb-ad0b-5ab9f3b13d37
498 - ip-address: 10.205.1.46
499 mac-address: fa:16:3e:b4:3e:b1
504 - ip-address: 192.168.54.2
505 mac-address: fa:16:3e:6e:7e:78
509 internal-connection-point:
510 - connection-point-id: mgmtVM-internal
512 name: mgmtVM-internal
513 ip-address: 10.205.1.46
516 status-detailed: null
518 vim-id: c2538499-4c30-41c0-acd5-80cb92f48061
519 - _id: ab453219-2d9a-45c2-864d-2c0788385028
522 - ip-address: 192.168.54.3
523 mac-address: fa:16:3e:d9:7a:5d
526 - ip-address: 192.168.24.3
527 mac-address: fa:16:3e:d1:6c:0d
530 internal-connection-point:
531 - connection-point-id: dataVM-internal
533 name: dataVM-internal
537 status-detailed: null
539 vim-id: 87973c3f-365d-4227-95c2-7a8abc74349c
540 vim-account-id: ea958ba5-4e58-4405-bf42-6e3be15d4c3a
545 status-detailed: null
546 vim-id: ff181e6d-2597-4244-b40b-bb0174bdfeb6
547 vnfd-id: 7637bcf8-cf14-42dc-ad70-c66fcf1e6e77
548 vnfd-ref: hackfest3charmed-vnf
550 created: 1566823354.3703845
551 modified: 1566823354.3703845
553 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
555 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
556 _id: 1ca3bb1a-b29b-49fe-bed6-5f3076d77434
557 additionalParamsForVnf:
558 touch_filename: /home/ubuntu/first-touch-2
559 touch_filename2: /home/ubuntu/second-touch-2
561 - connection-point-id: vnf-mgmt
564 - connection-point-id: vnf-data
567 created-time: 1566823354.36234
568 id: 1ca3bb1a-b29b-49fe-bed6-5f3076d77434
569 ip-address: 10.205.1.47
570 member-vnf-index-ref: '2'
571 nsr-id-ref: f48163a6-c807-47bc-9682-f72caef5af85
573 - _id: 190b4a2c-4f85-4cfe-9406-4cef7ffb1e67
576 - ip-address: 10.205.1.47
577 mac-address: fa:16:3e:cb:9f:c7
581 - ip-address: 192.168.231.1
582 mac-address: fa:16:3e:1a:89:24
585 internal-connection-point:
586 - connection-point-id: mgmtVM-internal
588 name: mgmtVM-internal
589 ip-address: 10.205.1.47
592 status-detailed: null
594 vim-id: 248077b2-e3b8-4a37-8b72-575abb8ed912
595 - _id: 889b874d-e1c3-4e75-aa45-53a9b0ddabd9
598 - ip-address: 192.168.231.3
599 mac-address: fa:16:3e:7e:ba:8c
602 - ip-address: 192.168.24.4
603 mac-address: fa:16:3e:d2:e1:f5
606 internal-connection-point:
607 - connection-point-id: dataVM-internal
609 name: dataVM-internal
613 status-detailed: null
615 vim-id: a4ce4372-e0ad-4ae3-8f9f-1c969f32e77b
616 vim-account-id: ea958ba5-4e58-4405-bf42-6e3be15d4c3a
621 status-detailed: null
622 vim-id: ff181e6d-2597-4244-b40b-bb0174bdfeb6
623 vnfd-id: 7637bcf8-cf14-42dc-ad70-c66fcf1e6e77
624 vnfd-ref: hackfest3charmed-vnf
627 db_vnfm_vnfd_text
= """
630 created: 1647529096.3635302
631 modified: 1650456936.518325
632 onboardingState: ONBOARDED
633 operationalState: ENABLED
635 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
637 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
639 descriptor: hackfest_basic_metrics_vnf/hackfest_basic_metrics_vnfd.yaml
640 folder: 70b47595-fafa-4f63-904b-fc3ada60eebb
643 pkg-dir: hackfest_basic_metrics_vnf
644 zipfile: package.tar.gz
646 usageState: NOT_IN_USE
648 _id: 70b47595-fafa-4f63-904b-fc3ada60eebb
651 href: /vnfpkgm/v1/vnf_packages/70b47595-fafa-4f63-904b-fc3ada60eebb/package_content
653 href: /vnfpkgm/v1/vnf_packages/70b47595-fafa-4f63-904b-fc3ada60eebb
655 href: /vnfpkgm/v1/vnf_packages/70b47595-fafa-4f63-904b-fc3ada60eebb/vnfd
656 description: A basic VNF descriptor with one VDU and VIM metrics
660 - id: default-instantiation-level
662 - number-of-instances: 1
663 vdu-id: hackfest_basic_metrics-VM
665 - aspect-delta-details:
667 - id: vdu_autoscale-delta
669 - id: hackfest_basic_metrics-VM
670 number-of-instances: 1
676 name: cpu_util_above_threshold
678 - name: cpu_util_above_threshold
679 scale-in-relational-operation: LT
680 scale-in-threshold: '10.0000000000'
681 scale-out-relational-operation: GT
682 scale-out-threshold: '60.0000000000'
683 vnf-monitoring-param-ref: vnf_cpu_util
684 scaling-type: automatic
687 - id: hackfest_basic_metrics-VM
688 max-number-of-instances: 2
689 min-number-of-instances: 1
694 vdu-id: hackfest_basic_metrics-VM
695 id: hackfest_basic_metrics-vnf
697 onboardingState: ONBOARDED
698 operationalState: ENABLED
699 product-name: hackfest_basic_metrics-vnf
704 - id: ubuntu18.04-aws
705 image: ubuntu/images/hvm-ssd/ubuntu-artful-17.10-amd64-server-20180509
706 name: ubuntu18.04-aws
708 - id: ubuntu18.04-azure
709 image: Canonical:UbuntuServer:18.04-LTS:latest
710 name: ubuntu18.04-azure
712 - id: ubuntu18.04-gcp
713 image: ubuntu-os-cloud:image-family:ubuntu-1804-lts
714 name: ubuntu18.04-gcp
716 usageState: NOT_IN_USE
721 - url: https://webhook.site/b79f9bf9-4c19-429d-81ed-19be26a3d5d8
723 - url: https://webhook.site/b79f9bf9-4c19-429d-81ed-19be26a3d5d8
725 - url: https://webhook.site/b79f9bf9-4c19-429d-81ed-19be26a3d5d8
729 vnf-monitoring-param-ref: vnf_cpu_util
730 alternative-sw-image-desc:
734 cloud-init-file: cloud-config
735 id: hackfest_basic_metrics-VM
738 virtual-network-interface-requirement:
742 monitoring-parameter:
745 performance-metric: cpu_utilization
746 - id: vnf_memory_util
747 name: vnf_memory_util
748 performance-metric: average_memory_utilization
749 - id: vnf_packets_sent
750 name: vnf_packets_sent
751 performance-metric: packets_sent
752 - id: vnf_packets_received
753 name: vnf_packets_received
754 performance-metric: packets_received
755 name: hackfest_basic_metrics-VM
756 sw-image-desc: bionic
757 virtual-compute-desc: hackfest_basic_metrics-VM-compute
758 virtual-storage-desc:
759 - hackfest_basic_metrics-VM-storage
761 virtual-compute-desc:
762 - id: hackfest_basic_metrics-VM-compute
767 virtual-storage-desc:
768 - id: hackfest_basic_metrics-VM-storage
769 size-of-storage: '10'