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
474 nsState: NOT_INSTANTIATED
476 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
478 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
479 _id: 88d90b0c-faff-4b9f-bccd-017f33985984
480 additionalParamsForVnf:
481 touch_filename: /home/ubuntu/first-touch-1
482 touch_filename2: /home/ubuntu/second-touch-1
484 - connection-point-id: vnf-mgmt
487 - connection-point-id: vnf-data
490 created-time: 1566823354.36234
491 id: 88d90b0c-faff-4b9f-bccd-017f33985984
492 ip-address: 10.205.1.46
493 member-vnf-index-ref: '1'
494 nsr-id-ref: f48163a6-c807-47bc-9682-f72caef5af85
496 - _id: f0e7d7ce-2443-4dcb-ad0b-5ab9f3b13d37
499 - ip-address: 10.205.1.46
500 mac-address: fa:16:3e:b4:3e:b1
505 - ip-address: 192.168.54.2
506 mac-address: fa:16:3e:6e:7e:78
510 internal-connection-point:
511 - connection-point-id: mgmtVM-internal
513 name: mgmtVM-internal
514 ip-address: 10.205.1.46
517 status-detailed: null
519 vim-id: c2538499-4c30-41c0-acd5-80cb92f48061
520 - _id: ab453219-2d9a-45c2-864d-2c0788385028
523 - ip-address: 192.168.54.3
524 mac-address: fa:16:3e:d9:7a:5d
527 - ip-address: 192.168.24.3
528 mac-address: fa:16:3e:d1:6c:0d
531 internal-connection-point:
532 - connection-point-id: dataVM-internal
534 name: dataVM-internal
538 status-detailed: null
540 vim-id: 87973c3f-365d-4227-95c2-7a8abc74349c
541 vim-account-id: ea958ba5-4e58-4405-bf42-6e3be15d4c3a
546 status-detailed: null
547 vim-id: ff181e6d-2597-4244-b40b-bb0174bdfeb6
548 vnfd-id: 7637bcf8-cf14-42dc-ad70-c66fcf1e6e77
549 vnfd-ref: hackfest3charmed-vnf
551 created: 1566823354.3703845
552 modified: 1566823354.3703845
553 nsState: NOT_INSTANTIATED
555 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
557 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
558 _id: 1ca3bb1a-b29b-49fe-bed6-5f3076d77434
559 additionalParamsForVnf:
560 touch_filename: /home/ubuntu/first-touch-2
561 touch_filename2: /home/ubuntu/second-touch-2
563 - connection-point-id: vnf-mgmt
566 - connection-point-id: vnf-data
569 created-time: 1566823354.36234
570 id: 1ca3bb1a-b29b-49fe-bed6-5f3076d77434
571 ip-address: 10.205.1.47
572 member-vnf-index-ref: '2'
573 nsr-id-ref: f48163a6-c807-47bc-9682-f72caef5af85
575 - _id: 190b4a2c-4f85-4cfe-9406-4cef7ffb1e67
578 - ip-address: 10.205.1.47
579 mac-address: fa:16:3e:cb:9f:c7
583 - ip-address: 192.168.231.1
584 mac-address: fa:16:3e:1a:89:24
587 internal-connection-point:
588 - connection-point-id: mgmtVM-internal
590 name: mgmtVM-internal
591 ip-address: 10.205.1.47
594 status-detailed: null
596 vim-id: 248077b2-e3b8-4a37-8b72-575abb8ed912
597 - _id: 889b874d-e1c3-4e75-aa45-53a9b0ddabd9
600 - ip-address: 192.168.231.3
601 mac-address: fa:16:3e:7e:ba:8c
604 - ip-address: 192.168.24.4
605 mac-address: fa:16:3e:d2:e1:f5
608 internal-connection-point:
609 - connection-point-id: dataVM-internal
611 name: dataVM-internal
615 status-detailed: null
617 vim-id: a4ce4372-e0ad-4ae3-8f9f-1c969f32e77b
618 vim-account-id: ea958ba5-4e58-4405-bf42-6e3be15d4c3a
623 status-detailed: null
624 vim-id: ff181e6d-2597-4244-b40b-bb0174bdfeb6
625 vnfd-id: 7637bcf8-cf14-42dc-ad70-c66fcf1e6e77
626 vnfd-ref: hackfest3charmed-vnf
629 db_vnfm_vnfd_text
= """
632 created: 1647529096.3635302
633 modified: 1650456936.518325
634 onboardingState: ONBOARDED
635 operationalState: ENABLED
637 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
639 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
641 descriptor: hackfest_basic_metrics_vnf/hackfest_basic_metrics_vnfd.yaml
642 folder: 70b47595-fafa-4f63-904b-fc3ada60eebb
645 pkg-dir: hackfest_basic_metrics_vnf
646 zipfile: package.tar.gz
648 usageState: NOT_IN_USE
650 _id: 70b47595-fafa-4f63-904b-fc3ada60eebb
653 href: /vnfpkgm/v1/vnf_packages/70b47595-fafa-4f63-904b-fc3ada60eebb/package_content
655 href: /vnfpkgm/v1/vnf_packages/70b47595-fafa-4f63-904b-fc3ada60eebb
657 href: /vnfpkgm/v1/vnf_packages/70b47595-fafa-4f63-904b-fc3ada60eebb/vnfd
658 description: A basic VNF descriptor with one VDU and VIM metrics
662 - id: default-instantiation-level
664 - number-of-instances: 1
665 vdu-id: hackfest_basic_metrics-VM
667 - aspect-delta-details:
669 - id: vdu_autoscale-delta
671 - id: hackfest_basic_metrics-VM
672 number-of-instances: 1
678 name: cpu_util_above_threshold
680 - name: cpu_util_above_threshold
681 scale-in-relational-operation: LT
682 scale-in-threshold: '10.0000000000'
683 scale-out-relational-operation: GT
684 scale-out-threshold: '60.0000000000'
685 vnf-monitoring-param-ref: vnf_cpu_util
686 scaling-type: automatic
689 - id: hackfest_basic_metrics-VM
690 max-number-of-instances: 2
691 min-number-of-instances: 1
696 vdu-id: hackfest_basic_metrics-VM
697 id: hackfest_basic_metrics-vnf
699 onboardingState: ONBOARDED
700 operationalState: ENABLED
701 product-name: hackfest_basic_metrics-vnf
706 - id: ubuntu18.04-aws
707 image: ubuntu/images/hvm-ssd/ubuntu-artful-17.10-amd64-server-20180509
708 name: ubuntu18.04-aws
710 - id: ubuntu18.04-azure
711 image: Canonical:UbuntuServer:18.04-LTS:latest
712 name: ubuntu18.04-azure
714 - id: ubuntu18.04-gcp
715 image: ubuntu-os-cloud:image-family:ubuntu-1804-lts
716 name: ubuntu18.04-gcp
718 usageState: NOT_IN_USE
723 - url: https://webhook.site/b79f9bf9-4c19-429d-81ed-19be26a3d5d8
725 - url: https://webhook.site/b79f9bf9-4c19-429d-81ed-19be26a3d5d8
727 - url: https://webhook.site/b79f9bf9-4c19-429d-81ed-19be26a3d5d8
731 vnf-monitoring-param-ref: vnf_cpu_util
732 alternative-sw-image-desc:
736 cloud-init-file: cloud-config
737 id: hackfest_basic_metrics-VM
740 virtual-network-interface-requirement:
744 monitoring-parameter:
747 performance-metric: cpu_utilization
748 - id: vnf_memory_util
749 name: vnf_memory_util
750 performance-metric: average_memory_utilization
751 - id: vnf_packets_sent
752 name: vnf_packets_sent
753 performance-metric: packets_sent
754 - id: vnf_packets_received
755 name: vnf_packets_received
756 performance-metric: packets_received
757 name: hackfest_basic_metrics-VM
758 sw-image-desc: bionic
759 virtual-compute-desc: hackfest_basic_metrics-VM-compute
760 virtual-storage-desc:
761 - hackfest_basic_metrics-VM-storage
763 virtual-compute-desc:
764 - id: hackfest_basic_metrics-VM-compute
769 virtual-storage-desc:
770 - id: hackfest_basic_metrics-VM-storage
771 size-of-storage: '10'