Adding PaaS Service Creation UTs
[osm/NBI.git] / osm_nbi / 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
18 """Contains database content needed for tests"""
19
20
21 db_vim_accounts_text = """
22 ---
23 - _admin:
24 created: 1566818150.3024442
25 current_operation: 0
26 deployed:
27 RO: dc51ce6c-c7f2-11e9-b9c0-02420aff0004
28 RO-account: dc5c67fa-c7f2-11e9-b9c0-02420aff0004
29 detailed-status: Done
30 modified: 1566818150.3024442
31 operationalState: ENABLED
32 operations:
33 - detailed-status: Done
34 lcmOperationType: create
35 operationParams: null
36 operationState: COMPLETED
37 startTime: 1566818150.3025382
38 statusEnteredTime: 1566818150.3025382
39 worker: 86434c2948e2
40 projects_read:
41 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
42 projects_write:
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
46 tenant tid
47 name: ost2-mrt-tid
48 schema_version: '1.1'
49 vim_password: 5g0yGX86qIhprX86YTMcpg==
50 vim_tenant_name: osm
51 vim_type: openstack
52 vim_url: http://10.95.87.162:5000/v2.0
53 vim_user: osm
54 """
55
56 db_paas_accounts_text = """
57 ---
58 - _id: 3d93ca4e-b007-4d94-bbdc-61911078b864
59 name: my_new_paas1
60 paas_type: juju
61 endpoints:
62 - 127.0.0.1
63 user: admin
64 secret: SCgY5peOGf98oqc00TNxfQ==
65 _admin:
66 created: 1664533097.4940042
67 modified: 1664533116.9955606
68 projects_read:
69 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
70 projects_write:
71 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
72 operationalState: ENABLED
73 operations:
74 - lcmOperationType: create
75 operationState: COMPLETED
76 startTime: 1664533097.4943297
77 statusEnteredTime: 1664533097.4943297
78 detailed-status: PaaS validated
79 operationParams: null
80 worker: null
81 current_operation: null
82 detailed-status: "Connectivity: ok"
83 schema_version: 1.11
84 - _id: c2538499-4c30-41c0-acd5-80cb92f45555
85 name: my_new_paas2
86 paas_type: juju
87 endpoints:
88 - 127.0.0.1
89 user: admin
90 secret: 5g0yGX86qIhprX86YTMcpg==
91 _admin:
92 created: 1664533097.4940042
93 modified: 1664533116.9955606
94 projects_read:
95 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
96 projects_write:
97 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
98 operationalState: ENABLED
99 operations:
100 - lcmOperationType: create
101 operationState: COMPLETED
102 startTime: 1664533097.4943297
103 statusEnteredTime: 1664533097.4943297
104 detailed-status: PaaS validated
105 operationParams: null
106 worker: null
107 current_operation: null
108 detailed-status: "Connectivity: ok"
109 schema_version: 1.11
110 """
111
112 db_vnfds_text = """
113 ---
114 - _admin:
115 created: 1566823352.7154346
116 modified: 1566823353.9295402
117 onboardingState: ONBOARDED
118 operationalState: ENABLED
119 projects_read:
120 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
121 projects_write:
122 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
123 storage:
124 descriptor: hackfest_3charmed_vnfd/hackfest_3charmed_vnfd.yaml
125 folder: 7637bcf8-cf14-42dc-ad70-c66fcf1e6e77
126 fs: local
127 path: /app/storage/
128 pkg-dir: hackfest_3charmed_vnfd
129 zipfile: package.tar.gz
130 type: vnfd
131 usageState: NOT_IN_USE
132 userDefinedData: {}
133 _id: 7637bcf8-cf14-42dc-ad70-c66fcf1e6e77
134 id: hackfest3charmed-vnf
135 description: >-
136 A VNF consisting of 2 VDUs connected to an internal VL, and one VDU with
137 cloud-init
138 product-name: hackfest3charmed-vnf
139 version: '1.0'
140 mgmt-cp: vnf-mgmt-ext
141
142 virtual-compute-desc:
143 - id: mgmt-compute
144 virtual-cpu:
145 num-virtual-cpu: 1
146 virtual-memory:
147 size: 1
148 - id: data-compute
149 virtual-cpu:
150 num-virtual-cpu: 1
151 virtual-memory:
152 size: 1
153
154 virtual-storage-desc:
155 - id: mgmt-storage
156 size-of-storage: 10
157 - id: data-storage
158 size-of-storage: 10
159
160 sw-image-desc:
161 - id: hackfest3-mgmt
162 name: hackfest3-mgmt
163
164 vdu:
165 - id: mgmtVM
166 name: mgmtVM
167 cloud-init-file: cloud-config.txt
168 sw-image-desc: hackfest3-mgmt
169 virtual-compute-desc: mgmt-compute
170 virtual-storage-desc:
171 - mgmt-storage
172 int-cpd:
173 - id: vnf-mgmt
174 virtual-network-interface-requirement:
175 - name: mgmtVM-eth0
176 position: 1
177 virtual-interface:
178 type: VIRTIO
179 - id: mgmtVM-internal
180 int-virtual-link-desc: internal
181 virtual-network-interface-requirement:
182 - name: mgmtVM-eth1
183 position: 2
184 virtual-interface:
185 type: VIRTIO
186 - id: dataVM
187 name: dataVM
188 sw-image-desc: hackfest3-mgmt
189 virtual-compute-desc: data-compute
190 virtual-storage-desc:
191 - data-storage
192 int-cpd:
193 - id: dataVM-internal
194 int-virtual-link-desc: internal
195 virtual-network-interface-requirement:
196 - name: dataVM-eth1
197 position: 1
198 virtual-interface:
199 type: VIRTIO
200 - id: vnf-data
201 virtual-network-interface-requirement:
202 - name: dataVM-eth0
203 position: 2
204 virtual-interface:
205 type: VIRTIO
206 monitoring-parameter:
207 - id: dataVM_cpu_util
208 name: dataVM_cpu_util
209 performance-metric: cpu_utilization
210
211 int-virtual-link-desc:
212 - id: internal
213
214 ext-cpd:
215 - id: vnf-mgmt-ext
216 int-cpd: # Connection to int-cpd
217 vdu-id: mgmtVM
218 cpd: vnf-mgmt
219 - id: vnf-data-ext
220 int-cpd: # Connection to int-cpd
221 vdu-id: dataVM
222 cpd: vnf-data
223
224 df:
225 - id: hackfest_default
226 vdu-profile:
227 - id: mgmtVM
228 min-number-of-instances: 1
229 - id: dataVM
230 min-number-of-instances: 1
231 max-number-of-instances: 10
232 instantiation-level:
233 - id: default
234 vdu-level:
235 - vdu-id: mgmtVM
236 number-of-instances: 1
237 - vdu-id: dataVM
238 number-of-instances: 1
239 scaling-aspect:
240 - id: scale_dataVM
241 name: scale_dataVM
242 max-scale-level: 10
243 aspect-delta-details:
244 deltas:
245 - id: delta1
246 vdu-delta:
247 - id: vdudelta1
248 number-of-instances: 1
249 scaling-policy:
250 - name: auto_cpu_util_above_threshold
251 scaling-type: automatic
252 enabled: true
253 threshold-time: 0
254 cooldown-time: 60
255 scaling-criteria:
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:
269 day1-2:
270 - id: hackfest3charmed-vnf
271 execution-environment-list:
272 - id: simple-ee
273 juju:
274 charm: simple
275 initial-config-primitive:
276 - seq: "1"
277 execution-environment-ref: simple-ee
278 name: config
279 parameter:
280 - name: ssh-hostname
281 value: <rw_mgmt_ip>
282 - name: ssh-username
283 value: ubuntu
284 - name: ssh-password
285 value: osm4u
286 - seq: "2"
287 execution-environment-ref: simple-ee
288 name: touch
289 parameter:
290 - name: filename
291 value: <touch_filename>
292 config-primitive:
293 - name: touch
294 execution-environment-ref: simple-ee
295 parameter:
296 - data-type: STRING
297 default-value: <touch_filename2>
298 name: filename
299 """
300
301 db_nsds_text = """
302 ---
303 - _admin:
304 created: 1566823353.971486
305 modified: 1566823353.971486
306 onboardingState: ONBOARDED
307 operationalState: ENABLED
308 projects_read:
309 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
310 projects_write:
311 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
312 storage:
313 descriptor: hackfest_3charmed_nsd/hackfest_3charmed_nsd.yaml
314 folder: 8c2f8b95-bb1b-47ee-8001-36dc090678da
315 fs: local
316 path: /app/storage/
317 pkg-dir: hackfest_3charmed_nsd
318 zipfile: package.tar.gz
319 usageState: NOT_IN_USE
320 userDefinedData: {}
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
325 designer: OSM
326 version: '1.0'
327
328 vnfd-id:
329 - hackfest3charmed-vnf
330
331 virtual-link-desc:
332 - id: mgmt
333 mgmt-network: "true"
334 - id: datanet
335 mgmt-network: "false"
336
337 df:
338 - id: hackfest_charmed_DF
339 vnf-profile:
340 - id: hackfest_vnf1 # member-vnf-index-ref: 1
341 vnfd-id: hackfest3charmed-vnf
342 virtual-link-connectivity:
343 - virtual-link-profile-id: mgmt
344 constituent-cpd-id:
345 - constituent-base-element-id: hackfest_vnf1
346 constituent-cpd-id: vnf-mgmt-ext
347 - virtual-link-profile-id: datanet
348 constituent-cpd-id:
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
355 constituent-cpd-id:
356 - constituent-base-element-id: hackfest_vnf2
357 constituent-cpd-id: vnf-mgmt-ext
358 - virtual-link-profile-id: datanet
359 constituent-cpd-id:
360 - constituent-base-element-id: hackfest_vnf2
361 constituent-cpd-id: vnf-data-ext
362 """
363
364 db_nsrs_text = """
365 ---
366 - _admin:
367 created: 1566823354.3716335
368 modified: 1566823354.3716335
369 nsState: NOT_INSTANTIATED
370 nslcmop: null
371 projects_read:
372 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
373 projects_write:
374 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
375 _id: f48163a6-c807-47bc-9682-f72caef5af85
376 additionalParamsForNs: null
377 admin-status: ENABLED
378 config-status: init
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
389 instantiate_params:
390 nsDescription: default description
391 nsName: ALF
392 nsdId: 8c2f8b95-bb1b-47ee-8001-36dc090678da
393 vimAccountId: ea958ba5-4e58-4405-bf42-6e3be15d4c3a
394 name: ALF
395 name-ref: ALF
396 ns-instance-config-ref: f48163a6-c807-47bc-9682-f72caef5af85
397 nsd:
398 _admin:
399 created: 1566823353.971486
400 modified: 1566823353.971486
401 onboardingState: ONBOARDED
402 operationalState: ENABLED
403 projects_read:
404 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
405 projects_write:
406 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
407 storage:
408 descriptor: hackfest_3charmed_nsd/hackfest_3charmed_nsd.yaml
409 folder: 8c2f8b95-bb1b-47ee-8001-36dc090678da
410 fs: local
411 path: /app/storage/
412 pkg-dir: hackfest_3charmed_nsd
413 zipfile: package.tar.gz
414 usageState: NOT_IN_USE
415 userDefinedData: {}
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
420 designer: OSM
421 version: '1.0'
422
423 vnfd-id:
424 - hackfest3charmed-vnf
425
426 virtual-link-desc:
427 - id: mgmt
428 mgmt-network: "true"
429 - id: datanet
430 mgmt-network: "false"
431
432 df:
433 - id: hackfest_charmed_DF
434 vnf-profile:
435 - id: hackfest_vnf1 # member-vnf-index-ref: 1
436 vnfd-id: hackfest3charmed-vnf
437 virtual-link-connectivity:
438 - virtual-link-profile-id: mgmt
439 constituent-cpd-id:
440 - constituent-base-element-id: hackfest_vnf1
441 constituent-cpd-id: vnf-mgmt-ext
442 - virtual-link-profile-id: datanet
443 constituent-cpd-id:
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
450 constituent-cpd-id:
451 - constituent-base-element-id: hackfest_vnf2
452 constituent-cpd-id: vnf-mgmt-ext
453 - virtual-link-profile-id: datanet
454 constituent-cpd-id:
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
464 short-name: ALF
465 ssh-authorized-key: null
466 vld:
467 - id: mgmt
468 name: null
469 status: ACTIVE
470 status-detailed: null
471 vim-id: f99ae780-0e2f-4985-af41-574eae6919c0
472 vim-network-name: mgmt
473 - id: datanet
474 name: ALF-datanet
475 status: ACTIVE
476 status-detailed: null
477 vim-id: c31364ba-f573-4ab6-bf1a-fed30ede39a8
478 vnfd-id:
479 - 7637bcf8-cf14-42dc-ad70-c66fcf1e6e77
480 """
481
482 db_nslcmops_text = """
483 ---
484 - _admin:
485 created: 1566823354.4148262
486 modified: 1566823354.4148262
487 projects_read:
488 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
489 projects_write:
490 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
491 worker: 86434c2948e2
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
500 links:
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
504 operationParams:
505 additionalParamsForVnf:
506 - additionalParams:
507 touch_filename: /home/ubuntu/first-touch-1
508 touch_filename2: /home/ubuntu/second-touch-1
509 member-vnf-index: '1'
510 - additionalParams:
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
517 nsName: ALF
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
523 """
524
525 db_vnfrs_text = """
526 ---
527 - _admin:
528 created: 1566823354.3668208
529 modified: 1566823354.3668208
530 nsState: NOT_INSTANTIATED
531 projects_read:
532 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
533 projects_write:
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
539 connection-point:
540 - connection-point-id: vnf-mgmt
541 id: vnf-mgmt
542 name: vnf-mgmt
543 - connection-point-id: vnf-data
544 id: vnf-data
545 name: 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
551 vdur:
552 - _id: f0e7d7ce-2443-4dcb-ad0b-5ab9f3b13d37
553 count-index: 0
554 interfaces:
555 - ip-address: 10.205.1.46
556 mac-address: fa:16:3e:b4:3e:b1
557 mgmt-vnf: true
558 name: mgmtVM-eth0
559 ns-vld-id: mgmt
560 position: 1
561 - ip-address: 192.168.54.2
562 mac-address: fa:16:3e:6e:7e:78
563 name: mgmtVM-eth1
564 vnf-vld-id: internal
565 position: 2
566 internal-connection-point:
567 - connection-point-id: mgmtVM-internal
568 id: mgmtVM-internal
569 name: mgmtVM-internal
570 ip-address: 10.205.1.46
571 name: ALF-1-mgmtVM-1
572 status: ACTIVE
573 status-detailed: null
574 vdu-id-ref: mgmtVM
575 vim-id: c2538499-4c30-41c0-acd5-80cb92f48061
576 - _id: ab453219-2d9a-45c2-864d-2c0788385028
577 count-index: 0
578 interfaces:
579 - ip-address: 192.168.54.3
580 mac-address: fa:16:3e:d9:7a:5d
581 name: dataVM-eth0
582 vnf-vld-id: internal
583 - ip-address: 192.168.24.3
584 mac-address: fa:16:3e:d1:6c:0d
585 name: dataVM-xe0
586 ns-vld-id: datanet
587 internal-connection-point:
588 - connection-point-id: dataVM-internal
589 id: dataVM-internal
590 name: dataVM-internal
591 ip-address: null
592 name: ALF-1-dataVM-1
593 status: ACTIVE
594 status-detailed: null
595 vdu-id-ref: dataVM
596 vim-id: 87973c3f-365d-4227-95c2-7a8abc74349c
597 vim-account-id: ea958ba5-4e58-4405-bf42-6e3be15d4c3a
598 vld:
599 - id: internal
600 name: ALF-internal
601 status: ACTIVE
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
606 - _admin:
607 created: 1566823354.3703845
608 modified: 1566823354.3703845
609 nsState: NOT_INSTANTIATED
610 projects_read:
611 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
612 projects_write:
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
618 connection-point:
619 - connection-point-id: vnf-mgmt
620 id: vnf-mgmt
621 name: vnf-mgmt
622 - connection-point-id: vnf-data
623 id: vnf-data
624 name: 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
630 vdur:
631 - _id: 190b4a2c-4f85-4cfe-9406-4cef7ffb1e67
632 count-index: 0
633 interfaces:
634 - ip-address: 10.205.1.47
635 mac-address: fa:16:3e:cb:9f:c7
636 mgmt-vnf: true
637 name: mgmtVM-eth0
638 ns-vld-id: mgmt
639 - ip-address: 192.168.231.1
640 mac-address: fa:16:3e:1a:89:24
641 name: mgmtVM-eth1
642 vnf-vld-id: internal
643 internal-connection-point:
644 - connection-point-id: mgmtVM-internal
645 id: mgmtVM-internal
646 name: mgmtVM-internal
647 ip-address: 10.205.1.47
648 name: ALF-2-mgmtVM-1
649 status: ACTIVE
650 status-detailed: null
651 vdu-id-ref: mgmtVM
652 vim-id: 248077b2-e3b8-4a37-8b72-575abb8ed912
653 - _id: 889b874d-e1c3-4e75-aa45-53a9b0ddabd9
654 count-index: 0
655 interfaces:
656 - ip-address: 192.168.231.3
657 mac-address: fa:16:3e:7e:ba:8c
658 name: dataVM-eth0
659 vnf-vld-id: internal
660 - ip-address: 192.168.24.4
661 mac-address: fa:16:3e:d2:e1:f5
662 name: dataVM-xe0
663 ns-vld-id: datanet
664 internal-connection-point:
665 - connection-point-id: dataVM-internal
666 id: dataVM-internal
667 name: dataVM-internal
668 ip-address: null
669 name: ALF-2-dataVM-1
670 status: ACTIVE
671 status-detailed: null
672 vdu-id-ref: dataVM
673 vim-id: a4ce4372-e0ad-4ae3-8f9f-1c969f32e77b
674 vim-account-id: ea958ba5-4e58-4405-bf42-6e3be15d4c3a
675 vld:
676 - id: internal
677 name: ALF-internal
678 status: ACTIVE
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
683 """
684
685 db_vnfm_vnfd_text = """
686 ---
687 - _admin:
688 created: 1647529096.3635302
689 modified: 1650456936.518325
690 onboardingState: ONBOARDED
691 operationalState: ENABLED
692 projects_read:
693 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
694 projects_write:
695 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
696 storage:
697 descriptor: hackfest_basic_metrics_vnf/hackfest_basic_metrics_vnfd.yaml
698 folder: 70b47595-fafa-4f63-904b-fc3ada60eebb
699 fs: mongo
700 path: /app/storage/
701 pkg-dir: hackfest_basic_metrics_vnf
702 zipfile: package.tar.gz
703 type: vnfd
704 usageState: NOT_IN_USE
705 userDefinedData: {}
706 _id: 70b47595-fafa-4f63-904b-fc3ada60eebb
707 _links:
708 packageContent:
709 href: /vnfpkgm/v1/vnf_packages/70b47595-fafa-4f63-904b-fc3ada60eebb/package_content
710 self:
711 href: /vnfpkgm/v1/vnf_packages/70b47595-fafa-4f63-904b-fc3ada60eebb
712 vnfd:
713 href: /vnfpkgm/v1/vnf_packages/70b47595-fafa-4f63-904b-fc3ada60eebb/vnfd
714 description: A basic VNF descriptor with one VDU and VIM metrics
715 df:
716 - id: default-df
717 instantiation-level:
718 - id: default-instantiation-level
719 vdu-level:
720 - number-of-instances: 1
721 vdu-id: hackfest_basic_metrics-VM
722 scaling-aspect:
723 - aspect-delta-details:
724 deltas:
725 - id: vdu_autoscale-delta
726 vdu-delta:
727 - id: hackfest_basic_metrics-VM
728 number-of-instances: 1
729 id: vdu_autoscale
730 max-scale-level: 1
731 name: vdu_autoscale
732 scaling-policy:
733 - cooldown-time: 120
734 name: cpu_util_above_threshold
735 scaling-criteria:
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
743 threshold-time: 10
744 vdu-profile:
745 - id: hackfest_basic_metrics-VM
746 max-number-of-instances: 2
747 min-number-of-instances: 1
748 ext-cpd:
749 - id: vnf-cp0-ext
750 int-cpd:
751 cpd: vdu-eth0-int
752 vdu-id: hackfest_basic_metrics-VM
753 id: hackfest_basic_metrics-vnf
754 mgmt-cp: vnf-cp0-ext
755 onboardingState: ONBOARDED
756 operationalState: ENABLED
757 product-name: hackfest_basic_metrics-vnf
758 sw-image-desc:
759 - id: bionic
760 image: bionic
761 name: bionic
762 - id: ubuntu18.04-aws
763 image: ubuntu/images/hvm-ssd/ubuntu-artful-17.10-amd64-server-20180509
764 name: ubuntu18.04-aws
765 vim-type: aws
766 - id: ubuntu18.04-azure
767 image: Canonical:UbuntuServer:18.04-LTS:latest
768 name: ubuntu18.04-azure
769 vim-type: azure
770 - id: ubuntu18.04-gcp
771 image: ubuntu-os-cloud:image-family:ubuntu-1804-lts
772 name: ubuntu18.04-gcp
773 vim-type: gcp
774 usageState: NOT_IN_USE
775 vdu:
776 - alarm:
777 - actions:
778 alarm:
779 - url: https://webhook.site/b79f9bf9-4c19-429d-81ed-19be26a3d5d8
780 insufficient-data:
781 - url: https://webhook.site/b79f9bf9-4c19-429d-81ed-19be26a3d5d8
782 ok:
783 - url: https://webhook.site/b79f9bf9-4c19-429d-81ed-19be26a3d5d8
784 alarm-id: alarm-1
785 operation: LT
786 value: '20.0000'
787 vnf-monitoring-param-ref: vnf_cpu_util
788 alternative-sw-image-desc:
789 - ubuntu18.04-aws
790 - ubuntu18.04-azure
791 - ubuntu18.04-gcp
792 cloud-init-file: cloud-config
793 id: hackfest_basic_metrics-VM
794 int-cpd:
795 - id: vdu-eth0-int
796 virtual-network-interface-requirement:
797 - name: vdu-eth0
798 virtual-interface:
799 type: PARAVIRT
800 monitoring-parameter:
801 - id: vnf_cpu_util
802 name: vnf_cpu_util
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
818 version: '1.0'
819 virtual-compute-desc:
820 - id: hackfest_basic_metrics-VM-compute
821 virtual-cpu:
822 num-virtual-cpu: 1
823 virtual-memory:
824 size: 1.0
825 virtual-storage-desc:
826 - id: hackfest_basic_metrics-VM-storage
827 size-of-storage: '10'
828 """