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
87 description: A VNF consisting of 2 VDUs connected to an internal VL, and one VDU
89 id: hackfest3charmed-vnf
92 internal-connection-point:
93 - id-ref: mgmtVM-internal
94 - id-ref: dataVM-internal
102 - aggregation-type: AVERAGE
105 vdu-monitoring-param:
106 vdu-monitoring-param-ref: dataVM_cpu_util
109 aggregation-type: AVERAGE
112 vdu-metric-name-ref: users
115 aggregation-type: AVERAGE
118 vdu-metric-name-ref: load
120 name: hackfest3charmed-vnf
121 scaling-group-descriptor:
122 - max-instance-count: 10
124 scaling-config-action:
125 - trigger: post-scale-out
126 vnf-config-primitive-name-ref: touch
127 - trigger: pre-scale-in
128 vnf-config-primitive-name-ref: touch
131 name: auto_cpu_util_above_threshold
133 - name: cpu_util_above_threshold
134 scale-in-relational-operation: LE
135 scale-in-threshold: '15.0000000000'
136 scale-out-relational-operation: GE
137 scale-out-threshold: '60.0000000000'
138 vnf-monitoring-param-ref: monitor1
139 scaling-type: automatic
144 short-name: hackfest3charmed-vnf
147 cloud-init-file: cloud-config.txt
149 image: hackfest3-mgmt
151 - external-connection-point-ref: vnf-mgmt
157 - internal-connection-point-ref: mgmtVM-internal
163 internal-connection-point:
164 - id: mgmtVM-internal
165 name: mgmtVM-internal
166 short-name: mgmtVM-internal
175 image: hackfest3-mgmt
177 - internal-connection-point-ref: dataVM-internal
183 - external-connection-point-ref: vnf-data
189 internal-connection-point:
190 - id: dataVM-internal
191 name: dataVM-internal
192 short-name: dataVM-internal
195 - id: dataVM_cpu_util
196 nfvi-metric: cpu_utilization
199 initial-config-primitive:
201 - value: "<rw_mgmt_ip>"
225 default-value: <touch_filename2>
227 initial-config-primitive:
240 value: <touch_filename>
249 created: 1566823353.971486
250 modified: 1566823353.971486
251 onboardingState: ONBOARDED
252 operationalState: ENABLED
254 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
256 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
258 descriptor: hackfest_3charmed_nsd/hackfest_3charmed_nsd.yaml
259 folder: 8c2f8b95-bb1b-47ee-8001-36dc090678da
262 pkg-dir: hackfest_3charmed_nsd
263 zipfile: package.tar.gz
264 usageState: NOT_IN_USE
266 _id: 8c2f8b95-bb1b-47ee-8001-36dc090678da
268 - member-vnf-index: '1'
269 vnfd-id-ref: hackfest3charmed-vnf
270 - member-vnf-index: '2'
271 vnfd-id-ref: hackfest3charmed-vnf
272 description: NS with 2 VNFs hackfest3charmed-vnf connected by datanet and mgmtnet
274 id: hackfest3charmed-ns
276 name: hackfest3charmed-ns
277 short-name: hackfest3charmed-ns
285 vim-network-name: mgmt
286 vnfd-connection-point-ref:
287 - member-vnf-index-ref: '1'
288 vnfd-connection-point-ref: vnf-mgmt
289 vnfd-id-ref: hackfest3charmed-vnf
290 - member-vnf-index-ref: '2'
291 vnfd-connection-point-ref: vnf-mgmt
292 vnfd-id-ref: hackfest3charmed-vnf
297 vnfd-connection-point-ref:
298 - member-vnf-index-ref: '1'
299 vnfd-connection-point-ref: vnf-data
300 vnfd-id-ref: hackfest3charmed-vnf
301 - member-vnf-index-ref: '2'
302 vnfd-connection-point-ref: vnf-data
303 vnfd-id-ref: hackfest3charmed-vnf
309 created: 1566823354.3716335
310 modified: 1566823354.3716335
311 nsState: NOT_INSTANTIATED
314 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
316 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
317 _id: f48163a6-c807-47bc-9682-f72caef5af85
318 additionalParamsForNs: null
319 admin-status: ENABLED
321 constituent-vnfr-ref:
322 - 88d90b0c-faff-4b9f-bccd-017f33985984
323 - 1ca3bb1a-b29b-49fe-bed6-5f3076d77434
324 create-time: 1566823354.36234
325 datacenter: ea958ba5-4e58-4405-bf42-6e3be15d4c3a
326 description: default description
327 detailed-status: 'ERROR executing proxy charm initial primitives for member_vnf_index=1
328 vdu_id=None: charm error executing primitive verify-ssh-credentials for member_vnf_index=1
329 vdu_id=None: ''timeout after 600 seconds'''
330 id: f48163a6-c807-47bc-9682-f72caef5af85
332 nsDescription: default description
334 nsdId: 8c2f8b95-bb1b-47ee-8001-36dc090678da
335 vimAccountId: ea958ba5-4e58-4405-bf42-6e3be15d4c3a
338 ns-instance-config-ref: f48163a6-c807-47bc-9682-f72caef5af85
341 created: 1566823353.971486
342 modified: 1566823353.971486
343 onboardingState: ONBOARDED
344 operationalState: ENABLED
346 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
348 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
350 descriptor: hackfest_3charmed_nsd/hackfest_3charmed_nsd.yaml
351 folder: 8c2f8b95-bb1b-47ee-8001-36dc090678da
354 pkg-dir: hackfest_3charmed_nsd
355 zipfile: package.tar.gz
356 usageState: NOT_IN_USE
358 _id: 8c2f8b95-bb1b-47ee-8001-36dc090678da
360 - member-vnf-index: '1'
361 vnfd-id-ref: hackfest3charmed-vnf
362 - member-vnf-index: '2'
363 vnfd-id-ref: hackfest3charmed-vnf
364 description: NS with 2 VNFs hackfest3charmed-vnf connected by datanet and
366 id: hackfest3charmed-ns
368 name: hackfest3charmed-ns
369 short-name: hackfest3charmed-ns
377 vim-network-name: mgmt
378 vnfd-connection-point-ref:
379 - member-vnf-index-ref: '1'
380 vnfd-connection-point-ref: vnf-mgmt
381 vnfd-id-ref: hackfest3charmed-vnf
382 - member-vnf-index-ref: '2'
383 vnfd-connection-point-ref: vnf-mgmt
384 vnfd-id-ref: hackfest3charmed-vnf
389 vnfd-connection-point-ref:
390 - member-vnf-index-ref: '1'
391 vnfd-connection-point-ref: vnf-data
392 vnfd-id-ref: hackfest3charmed-vnf
393 - member-vnf-index-ref: '2'
394 vnfd-connection-point-ref: vnf-data
395 vnfd-id-ref: hackfest3charmed-vnf
396 nsd-id: 8c2f8b95-bb1b-47ee-8001-36dc090678da
397 nsd-name-ref: hackfest3charmed-ns
398 nsd-ref: hackfest3charmed-ns
399 operational-events: []
400 operational-status: failed
401 orchestration-progress: {}
402 resource-orchestrator: osmopenmano
404 ssh-authorized-key: null
409 status-detailed: null
410 vim-id: f99ae780-0e2f-4985-af41-574eae6919c0
411 vim-network-name: mgmt
415 status-detailed: null
416 vim-id: c31364ba-f573-4ab6-bf1a-fed30ede39a8
418 - 7637bcf8-cf14-42dc-ad70-c66fcf1e6e77
421 db_nslcmops_text
= """
424 created: 1566823354.4148262
425 modified: 1566823354.4148262
427 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
429 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
431 _id: a639fac7-e0bb-4225-8ecb-c1f8efcc125e
432 detailed-status: 'FAILED executing proxy charm initial primitives for member_vnf_index=1
433 vdu_id=None: charm error executing primitive verify-ssh-credentials for member_vnf_index=1
434 vdu_id=None: ''timeout after 600 seconds'''
435 id: a639fac7-e0bb-4225-8ecb-c1f8efcc125e
436 isAutomaticInvocation: false
437 isCancelPending: false
438 lcmOperationType: instantiate
440 nsInstance: /osm/nslcm/v1/ns_instances/f48163a6-c807-47bc-9682-f72caef5af85
441 self: /osm/nslcm/v1/ns_lcm_op_occs/a639fac7-e0bb-4225-8ecb-c1f8efcc125e
442 nsInstanceId: f48163a6-c807-47bc-9682-f72caef5af85
444 additionalParamsForVnf:
446 touch_filename: /home/ubuntu/first-touch-1
447 touch_filename2: /home/ubuntu/second-touch-1
448 member-vnf-index: '1'
450 touch_filename: /home/ubuntu/first-touch-2
451 touch_filename2: /home/ubuntu/second-touch-2
452 member-vnf-index: '2'
453 lcmOperationType: instantiate
454 nsDescription: default description
455 nsInstanceId: f48163a6-c807-47bc-9682-f72caef5af85
457 nsdId: 8c2f8b95-bb1b-47ee-8001-36dc090678da
458 vimAccountId: ea958ba5-4e58-4405-bf42-6e3be15d4c3a
459 operationState: FAILED
460 startTime: 1566823354.414689
461 statusEnteredTime: 1566824534.5112448
467 created: 1566823354.3668208
468 modified: 1566823354.3668208
469 nsState: NOT_INSTANTIATED
471 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
473 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
474 _id: 88d90b0c-faff-4b9f-bccd-017f33985984
475 additionalParamsForVnf:
476 touch_filename: /home/ubuntu/first-touch-1
477 touch_filename2: /home/ubuntu/second-touch-1
479 - connection-point-id: vnf-mgmt
482 - connection-point-id: vnf-data
485 created-time: 1566823354.36234
486 id: 88d90b0c-faff-4b9f-bccd-017f33985984
487 ip-address: 10.205.1.46
488 member-vnf-index-ref: '1'
489 nsr-id-ref: f48163a6-c807-47bc-9682-f72caef5af85
491 - _id: f0e7d7ce-2443-4dcb-ad0b-5ab9f3b13d37
494 - ip-address: 10.205.1.46
495 mac-address: fa:16:3e:b4:3e:b1
499 - ip-address: 192.168.54.2
500 mac-address: fa:16:3e:6e:7e:78
503 internal-connection-point:
504 - connection-point-id: mgmtVM-internal
506 name: mgmtVM-internal
507 ip-address: 10.205.1.46
510 status-detailed: null
512 vim-id: c2538499-4c30-41c0-acd5-80cb92f48061
513 - _id: ab453219-2d9a-45c2-864d-2c0788385028
516 - ip-address: 192.168.54.3
517 mac-address: fa:16:3e:d9:7a:5d
520 - ip-address: 192.168.24.3
521 mac-address: fa:16:3e:d1:6c:0d
524 internal-connection-point:
525 - connection-point-id: dataVM-internal
527 name: dataVM-internal
531 status-detailed: null
533 vim-id: 87973c3f-365d-4227-95c2-7a8abc74349c
534 vim-account-id: ea958ba5-4e58-4405-bf42-6e3be15d4c3a
539 status-detailed: null
540 vim-id: ff181e6d-2597-4244-b40b-bb0174bdfeb6
541 vnfd-id: 7637bcf8-cf14-42dc-ad70-c66fcf1e6e77
542 vnfd-ref: hackfest3charmed-vnf
544 created: 1566823354.3703845
545 modified: 1566823354.3703845
546 nsState: NOT_INSTANTIATED
548 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
550 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
551 _id: 1ca3bb1a-b29b-49fe-bed6-5f3076d77434
552 additionalParamsForVnf:
553 touch_filename: /home/ubuntu/first-touch-2
554 touch_filename2: /home/ubuntu/second-touch-2
556 - connection-point-id: vnf-mgmt
559 - connection-point-id: vnf-data
562 created-time: 1566823354.36234
563 id: 1ca3bb1a-b29b-49fe-bed6-5f3076d77434
564 ip-address: 10.205.1.47
565 member-vnf-index-ref: '2'
566 nsr-id-ref: f48163a6-c807-47bc-9682-f72caef5af85
568 - _id: 190b4a2c-4f85-4cfe-9406-4cef7ffb1e67
571 - ip-address: 10.205.1.47
572 mac-address: fa:16:3e:cb:9f:c7
576 - ip-address: 192.168.231.1
577 mac-address: fa:16:3e:1a:89:24
580 internal-connection-point:
581 - connection-point-id: mgmtVM-internal
583 name: mgmtVM-internal
584 ip-address: 10.205.1.47
587 status-detailed: null
589 vim-id: 248077b2-e3b8-4a37-8b72-575abb8ed912
590 - _id: 889b874d-e1c3-4e75-aa45-53a9b0ddabd9
593 - ip-address: 192.168.231.3
594 mac-address: fa:16:3e:7e:ba:8c
597 - ip-address: 192.168.24.4
598 mac-address: fa:16:3e:d2:e1:f5
601 internal-connection-point:
602 - connection-point-id: dataVM-internal
604 name: dataVM-internal
608 status-detailed: null
610 vim-id: a4ce4372-e0ad-4ae3-8f9f-1c969f32e77b
611 vim-account-id: ea958ba5-4e58-4405-bf42-6e3be15d4c3a
616 status-detailed: null
617 vim-id: ff181e6d-2597-4244-b40b-bb0174bdfeb6
618 vnfd-id: 7637bcf8-cf14-42dc-ad70-c66fcf1e6e77
619 vnfd-ref: hackfest3charmed-vnf