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"""
20 __author__
= "Pedro de la Cruz Ramos, pedro.delacruzramos@altran.com"
21 __date__
= "2019-11-20"
24 # Exploit exists in the key kdu.helm-chart
25 vnfd_exploit_text
= """
26 _id: 00000000-0000-0000-0000-000000000000
32 helm-chart: "local/exploit --post-renderer /bin/bash"
36 # Exploit in kdu.helm-chart is fixed
37 vnfd_exploit_fixed_text
= """
43 helm-chart: "local/exploit"
50 created: 1566823352.7154346
51 modified: 1566823352.7154346
52 onboardingState: ONBOARDED
53 operationalState: ENABLED
55 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
57 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
59 descriptor: hackfest_3charmed_vnfd/hackfest_3charmed_vnfd.yaml
60 folder: 7637bcf8-cf14-42dc-ad70-c66fcf1e6e77
63 pkg-dir: hackfest_3charmed_vnfd
64 zipfile: package.tar.gz
66 usageState: NOT_IN_USE
68 _id: 7637bcf8-cf14-42dc-ad70-c66fcf1e6e77
69 id: hackfest3charmed-vnf
71 A VNF consisting of 2 VDUs connected to an internal VL, and one VDU with
73 product-name: hackfest3charmed-vnf
102 cloud-init-file: cloud-config.txt
103 sw-image-desc: hackfest3-mgmt
104 virtual-compute-desc: mgmt-compute
105 virtual-storage-desc:
109 virtual-network-interface-requirement:
114 - id: mgmtVM-internal
115 int-virtual-link-desc: internal
116 virtual-network-interface-requirement:
123 sw-image-desc: hackfest3-mgmt
124 virtual-compute-desc: data-compute
125 virtual-storage-desc:
128 - id: dataVM-internal
129 int-virtual-link-desc: internal
130 virtual-network-interface-requirement:
136 virtual-network-interface-requirement:
141 monitoring-parameter:
142 - id: dataVM_cpu_util
143 name: dataVM_cpu_util
144 performance-metric: cpu_utilization
146 int-virtual-link-desc:
151 int-cpd: # Connection to int-cpd
155 int-cpd: # Connection to int-cpd
160 - id: hackfest_default
163 min-number-of-instances: 1
165 min-number-of-instances: 1
166 max-number-of-instances: 10
171 number-of-instances: 1
173 number-of-instances: 1
178 aspect-delta-details:
183 number-of-instances: 1
185 - name: auto_cpu_util_above_threshold
186 scaling-type: automatic
191 - name: cpu_util_above_threshold
192 scale-in-relational-operation: LE
193 scale-in-threshold: '15.0000000000'
194 scale-out-relational-operation: GE
195 scale-out-threshold: '60.0000000000'
196 vnf-monitoring-param-ref: dataVM_cpu_util
197 scaling-config-action:
198 - trigger: post-scale-out
199 vnf-config-primitive-name-ref: touch
200 - trigger: pre-scale-in
201 vnf-config-primitive-name-ref: touch
202 lcm-operations-configuration:
203 operate-vnf-op-config:
205 - id: hackfest3charmed-vnf
206 execution-environment-list:
210 initial-config-primitive:
212 execution-environment-ref: simple-ee
222 execution-environment-ref: simple-ee
226 value: <touch_filename>
229 execution-environment-ref: simple-ee
232 default-value: <touch_filename2>
239 created: 1566823353.971486
240 modified: 1566823353.971486
241 onboardingState: ONBOARDED
242 operationalState: ENABLED
244 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
246 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
248 descriptor: hackfest_3charmed_nsd/hackfest_3charmed_nsd.yaml
249 folder: 8c2f8b95-bb1b-47ee-8001-36dc090678da
252 pkg-dir: hackfest_3charmed_nsd
253 zipfile: package.tar.gz
254 usageState: NOT_IN_USE
256 _id: 8c2f8b95-bb1b-47ee-8001-36dc090678da
257 id: hackfest3charmed-ns
258 name: hackfest3charmed-ns
259 description: NS with 2 VNFs hackfest3charmed-vnf connected by datanet and mgmtnet VLs
264 - hackfest3charmed-vnf
273 - id: hackfest_charmed_DF
275 - id: hackfest_vnf1 # member-vnf-index-ref: 1
276 vnfd-id: hackfest3charmed-vnf
277 virtual-link-connectivity:
278 - virtual-link-profile-id: mgmt
280 - constituent-base-element-id: hackfest_vnf1
281 constituent-cpd-id: vnf-mgmt-ext
282 - virtual-link-profile-id: datanet
284 - constituent-base-element-id: hackfest_vnf1
285 constituent-cpd-id: vnf-data-ext
286 - id: hackfest_vnf2 # member-vnf-index-ref: 2
287 vnfd-id: hackfest3charmed-vnf
288 virtual-link-connectivity:
289 - virtual-link-profile-id: mgmt
291 - constituent-base-element-id: hackfest_vnf2
292 constituent-cpd-id: vnf-mgmt-ext
293 - virtual-link-profile-id: datanet
295 - constituent-base-element-id: hackfest_vnf2
296 constituent-cpd-id: vnf-data-ext
299 db_sfc_nsds_text
= """
303 created: 1683713524.2696395
304 modified: 1683713524.3553684
306 - 93601899-b310-4a56-a765-91539d5f675d
308 - 93601899-b310-4a56-a765-91539d5f675d
309 onboardingState: ONBOARDED
310 operationalState: ENABLED
311 usageState: NOT_IN_USE
315 folder: '2eb45633-03e3-4909-a87d-a564f5943948:1'
316 pkg-dir: cirros_vnffg_ns
317 descriptor: cirros_vnffg_ns/cirros_vnffg_nsd.yaml
318 zipfile: package.tar.gz
319 _id: 2eb45633-03e3-4909-a87d-a564f5943948
323 name: cirros_vnffg-ns
337 - id: forwardingpath1
342 constituent-profile-elements:
345 constituent-base-element-id: Mid-vnf1
346 ingress-constituent-cpd-id: vnf-cp0-ext
347 egress-constituent-cpd-id: vnf-cp0-ext
351 source-ip-address: 20.20.1.2
352 destination-ip-address: 20.20.3.5
355 nfp-position-element-id:
357 nfp-position-element:
364 virtual-link-connectivity:
365 - constituent-cpd-id:
366 - constituent-base-element-id: '1'
367 constituent-cpd-id: eth0-ext
368 virtual-link-profile-id: osm-ext
369 vnfd-id: cirros_vnffg-vnf
370 description: Simple NS example with vnffgd