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
108 name: hackfest3charmed-vnf
109 scaling-group-descriptor:
110 - max-instance-count: 10
112 scaling-config-action:
113 - trigger: post-scale-out
114 vnf-config-primitive-name-ref: touch
115 - trigger: pre-scale-in
116 vnf-config-primitive-name-ref: touch
119 name: auto_cpu_util_above_threshold
121 - name: cpu_util_above_threshold
122 scale-in-relational-operation: LE
123 scale-in-threshold: '15.0000000000'
124 scale-out-relational-operation: GE
125 scale-out-threshold: '60.0000000000'
126 vnf-monitoring-param-ref: monitor1
127 scaling-type: automatic
132 short-name: hackfest3charmed-vnf
135 cloud-init-file: cloud-config.txt
137 image: hackfest3-mgmt
139 - external-connection-point-ref: vnf-mgmt
145 - internal-connection-point-ref: mgmtVM-internal
151 internal-connection-point:
152 - id: mgmtVM-internal
153 name: mgmtVM-internal
154 short-name: mgmtVM-internal
163 image: hackfest3-mgmt
165 - internal-connection-point-ref: dataVM-internal
171 - external-connection-point-ref: vnf-data
177 internal-connection-point:
178 - id: dataVM-internal
179 name: dataVM-internal
180 short-name: dataVM-internal
183 - id: dataVM_cpu_util
184 nfvi-metric: cpu_utilization
196 default-value: <touch_filename2>
198 initial-config-primitive:
211 value: <touch_filename>
220 created: 1566823353.971486
221 modified: 1566823353.971486
222 onboardingState: ONBOARDED
223 operationalState: ENABLED
225 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
227 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
229 descriptor: hackfest_3charmed_nsd/hackfest_3charmed_nsd.yaml
230 folder: 8c2f8b95-bb1b-47ee-8001-36dc090678da
233 pkg-dir: hackfest_3charmed_nsd
234 zipfile: package.tar.gz
235 usageState: NOT_IN_USE
237 _id: 8c2f8b95-bb1b-47ee-8001-36dc090678da
239 - member-vnf-index: '1'
240 vnfd-id-ref: hackfest3charmed-vnf
241 - member-vnf-index: '2'
242 vnfd-id-ref: hackfest3charmed-vnf
243 description: NS with 2 VNFs hackfest3charmed-vnf connected by datanet and mgmtnet
245 id: hackfest3charmed-ns
247 name: hackfest3charmed-ns
248 short-name: hackfest3charmed-ns
256 vim-network-name: mgmt
257 vnfd-connection-point-ref:
258 - member-vnf-index-ref: '1'
259 vnfd-connection-point-ref: vnf-mgmt
260 vnfd-id-ref: hackfest3charmed-vnf
261 - member-vnf-index-ref: '2'
262 vnfd-connection-point-ref: vnf-mgmt
263 vnfd-id-ref: hackfest3charmed-vnf
268 vnfd-connection-point-ref:
269 - member-vnf-index-ref: '1'
270 vnfd-connection-point-ref: vnf-data
271 vnfd-id-ref: hackfest3charmed-vnf
272 - member-vnf-index-ref: '2'
273 vnfd-connection-point-ref: vnf-data
274 vnfd-id-ref: hackfest3charmed-vnf
280 created: 1566823354.3716335
281 modified: 1566823354.3716335
282 nsState: NOT_INSTANTIATED
285 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
287 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
288 _id: f48163a6-c807-47bc-9682-f72caef5af85
289 additionalParamsForNs: null
290 admin-status: ENABLED
292 constituent-vnfr-ref:
293 - 88d90b0c-faff-4b9f-bccd-017f33985984
294 - 1ca3bb1a-b29b-49fe-bed6-5f3076d77434
295 create-time: 1566823354.36234
296 datacenter: ea958ba5-4e58-4405-bf42-6e3be15d4c3a
297 description: default description
298 detailed-status: 'ERROR executing proxy charm initial primitives for member_vnf_index=1
299 vdu_id=None: charm error executing primitive verify-ssh-credentials for member_vnf_index=1
300 vdu_id=None: ''timeout after 600 seconds'''
301 id: f48163a6-c807-47bc-9682-f72caef5af85
303 nsDescription: default description
305 nsdId: 8c2f8b95-bb1b-47ee-8001-36dc090678da
306 vimAccountId: ea958ba5-4e58-4405-bf42-6e3be15d4c3a
309 ns-instance-config-ref: f48163a6-c807-47bc-9682-f72caef5af85
312 created: 1566823353.971486
313 modified: 1566823353.971486
314 onboardingState: ONBOARDED
315 operationalState: ENABLED
317 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
319 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
321 descriptor: hackfest_3charmed_nsd/hackfest_3charmed_nsd.yaml
322 folder: 8c2f8b95-bb1b-47ee-8001-36dc090678da
325 pkg-dir: hackfest_3charmed_nsd
326 zipfile: package.tar.gz
327 usageState: NOT_IN_USE
329 _id: 8c2f8b95-bb1b-47ee-8001-36dc090678da
331 - member-vnf-index: '1'
332 vnfd-id-ref: hackfest3charmed-vnf
333 - member-vnf-index: '2'
334 vnfd-id-ref: hackfest3charmed-vnf
335 description: NS with 2 VNFs hackfest3charmed-vnf connected by datanet and
337 id: hackfest3charmed-ns
339 name: hackfest3charmed-ns
340 short-name: hackfest3charmed-ns
348 vim-network-name: mgmt
349 vnfd-connection-point-ref:
350 - member-vnf-index-ref: '1'
351 vnfd-connection-point-ref: vnf-mgmt
352 vnfd-id-ref: hackfest3charmed-vnf
353 - member-vnf-index-ref: '2'
354 vnfd-connection-point-ref: vnf-mgmt
355 vnfd-id-ref: hackfest3charmed-vnf
360 vnfd-connection-point-ref:
361 - member-vnf-index-ref: '1'
362 vnfd-connection-point-ref: vnf-data
363 vnfd-id-ref: hackfest3charmed-vnf
364 - member-vnf-index-ref: '2'
365 vnfd-connection-point-ref: vnf-data
366 vnfd-id-ref: hackfest3charmed-vnf
367 nsd-id: 8c2f8b95-bb1b-47ee-8001-36dc090678da
368 nsd-name-ref: hackfest3charmed-ns
369 nsd-ref: hackfest3charmed-ns
370 operational-events: []
371 operational-status: failed
372 orchestration-progress: {}
373 resource-orchestrator: osmopenmano
375 ssh-authorized-key: null
380 status-detailed: null
381 vim-id: f99ae780-0e2f-4985-af41-574eae6919c0
382 vim-network-name: mgmt
386 status-detailed: null
387 vim-id: c31364ba-f573-4ab6-bf1a-fed30ede39a8
389 - 7637bcf8-cf14-42dc-ad70-c66fcf1e6e77
392 db_nslcmops_text
= """
395 created: 1566823354.4148262
396 modified: 1566823354.4148262
398 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
400 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
402 _id: a639fac7-e0bb-4225-8ecb-c1f8efcc125e
403 detailed-status: 'FAILED executing proxy charm initial primitives for member_vnf_index=1
404 vdu_id=None: charm error executing primitive verify-ssh-credentials for member_vnf_index=1
405 vdu_id=None: ''timeout after 600 seconds'''
406 id: a639fac7-e0bb-4225-8ecb-c1f8efcc125e
407 isAutomaticInvocation: false
408 isCancelPending: false
409 lcmOperationType: instantiate
411 nsInstance: /osm/nslcm/v1/ns_instances/f48163a6-c807-47bc-9682-f72caef5af85
412 self: /osm/nslcm/v1/ns_lcm_op_occs/a639fac7-e0bb-4225-8ecb-c1f8efcc125e
413 nsInstanceId: f48163a6-c807-47bc-9682-f72caef5af85
415 additionalParamsForVnf:
417 touch_filename: /home/ubuntu/first-touch-1
418 touch_filename2: /home/ubuntu/second-touch-1
419 member-vnf-index: '1'
421 touch_filename: /home/ubuntu/first-touch-2
422 touch_filename2: /home/ubuntu/second-touch-2
423 member-vnf-index: '2'
424 lcmOperationType: instantiate
425 nsDescription: default description
426 nsInstanceId: f48163a6-c807-47bc-9682-f72caef5af85
428 nsdId: 8c2f8b95-bb1b-47ee-8001-36dc090678da
429 vimAccountId: ea958ba5-4e58-4405-bf42-6e3be15d4c3a
430 operationState: FAILED
431 startTime: 1566823354.414689
432 statusEnteredTime: 1566824534.5112448
438 created: 1566823354.3668208
439 modified: 1566823354.3668208
440 nsState: NOT_INSTANTIATED
442 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
444 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
445 _id: 88d90b0c-faff-4b9f-bccd-017f33985984
446 additionalParamsForVnf:
447 touch_filename: /home/ubuntu/first-touch-1
448 touch_filename2: /home/ubuntu/second-touch-1
450 - connection-point-id: vnf-mgmt
453 - connection-point-id: vnf-data
456 created-time: 1566823354.36234
457 id: 88d90b0c-faff-4b9f-bccd-017f33985984
458 ip-address: 10.205.1.46
459 member-vnf-index-ref: '1'
460 nsr-id-ref: f48163a6-c807-47bc-9682-f72caef5af85
462 - _id: f0e7d7ce-2443-4dcb-ad0b-5ab9f3b13d37
465 - ip-address: 10.205.1.46
466 mac-address: fa:16:3e:b4:3e:b1
470 - ip-address: 192.168.54.2
471 mac-address: fa:16:3e:6e:7e:78
474 internal-connection-point:
475 - connection-point-id: mgmtVM-internal
477 name: mgmtVM-internal
478 ip-address: 10.205.1.46
481 status-detailed: null
483 vim-id: c2538499-4c30-41c0-acd5-80cb92f48061
484 - _id: ab453219-2d9a-45c2-864d-2c0788385028
487 - ip-address: 192.168.54.3
488 mac-address: fa:16:3e:d9:7a:5d
491 - ip-address: 192.168.24.3
492 mac-address: fa:16:3e:d1:6c:0d
495 internal-connection-point:
496 - connection-point-id: dataVM-internal
498 name: dataVM-internal
502 status-detailed: null
504 vim-id: 87973c3f-365d-4227-95c2-7a8abc74349c
505 vim-account-id: ea958ba5-4e58-4405-bf42-6e3be15d4c3a
510 status-detailed: null
511 vim-id: ff181e6d-2597-4244-b40b-bb0174bdfeb6
512 vnfd-id: 7637bcf8-cf14-42dc-ad70-c66fcf1e6e77
513 vnfd-ref: hackfest3charmed-vnf
515 created: 1566823354.3703845
516 modified: 1566823354.3703845
517 nsState: NOT_INSTANTIATED
519 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
521 - 25b5aebf-3da1-49ed-99de-1d2b4a86d6e4
522 _id: 1ca3bb1a-b29b-49fe-bed6-5f3076d77434
523 additionalParamsForVnf:
524 touch_filename: /home/ubuntu/first-touch-2
525 touch_filename2: /home/ubuntu/second-touch-2
527 - connection-point-id: vnf-mgmt
530 - connection-point-id: vnf-data
533 created-time: 1566823354.36234
534 id: 1ca3bb1a-b29b-49fe-bed6-5f3076d77434
535 ip-address: 10.205.1.47
536 member-vnf-index-ref: '2'
537 nsr-id-ref: f48163a6-c807-47bc-9682-f72caef5af85
539 - _id: 190b4a2c-4f85-4cfe-9406-4cef7ffb1e67
542 - ip-address: 10.205.1.47
543 mac-address: fa:16:3e:cb:9f:c7
547 - ip-address: 192.168.231.1
548 mac-address: fa:16:3e:1a:89:24
551 internal-connection-point:
552 - connection-point-id: mgmtVM-internal
554 name: mgmtVM-internal
555 ip-address: 10.205.1.47
558 status-detailed: null
560 vim-id: 248077b2-e3b8-4a37-8b72-575abb8ed912
561 - _id: 889b874d-e1c3-4e75-aa45-53a9b0ddabd9
564 - ip-address: 192.168.231.3
565 mac-address: fa:16:3e:7e:ba:8c
568 - ip-address: 192.168.24.4
569 mac-address: fa:16:3e:d2:e1:f5
572 internal-connection-point:
573 - connection-point-id: dataVM-internal
575 name: dataVM-internal
579 status-detailed: null
581 vim-id: a4ce4372-e0ad-4ae3-8f9f-1c969f32e77b
582 vim-account-id: ea958ba5-4e58-4405-bf42-6e3be15d4c3a
587 status-detailed: null
588 vim-id: ff181e6d-2597-4244-b40b-bb0174bdfeb6
589 vnfd-id: 7637bcf8-cf14-42dc-ad70-c66fcf1e6e77
590 vnfd-ref: hackfest3charmed-vnf