| tierno | f7aa8c4 | 2016-09-06 16:43:04 +0200 | [diff] [blame] | 1 | # -*- coding: utf-8 -*- |
| 2 | |
| 3 | ## |
| tierno | a62249e | 2018-09-17 17:57:30 +0200 | [diff] [blame] | 4 | # Copyright 2015 Telefonica Investigacion y Desarrollo, S.A.U. |
| tierno | 9a61c6b | 2016-09-08 10:57:02 +0200 | [diff] [blame] | 5 | # This file is part of openvim |
| tierno | f7aa8c4 | 2016-09-06 16:43:04 +0200 | [diff] [blame] | 6 | # All Rights Reserved. |
| 7 | # |
| 8 | # Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 9 | # not use this file except in compliance with the License. You may obtain |
| 10 | # a copy of the License at |
| 11 | # |
| 12 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 13 | # |
| 14 | # Unless required by applicable law or agreed to in writing, software |
| 15 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 16 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 17 | # License for the specific language governing permissions and limitations |
| 18 | # under the License. |
| 19 | # |
| 20 | # For those usages not covered by the Apache License, Version 2.0 please |
| 21 | # contact with: nfvlabs@tid.es |
| 22 | ## |
| 23 | |
| 24 | ''' |
| 25 | Definitions of classes for the Host operating server, ... |
| 26 | ''' |
| 27 | |
| 28 | __author__="Pablo Montes" |
| 29 | |
| 30 | |
| 31 | class Units(): |
| 32 | memory_1000 = 1 |
| 33 | memory_1024 = 2 |
| 34 | memory_full = 3 |
| 35 | bw = 4 |
| 36 | freq = 5 |
| 37 | no_units = 6 |
| 38 | name = 7 |
| 39 | boolean = 8 |
| 40 | |
| 41 | class definitionsClass(): |
| 42 | user = 'n2' |
| 43 | password = 'n2' |
| 44 | extrict_hugepages_allocation = True |
| 45 | processor_possible_features = ['64b','iommu','lps','tlbps','hwsv','dioc','ht'] |
| 46 | processor_possible_manufacturers = ['Intel','AMD'] |
| 47 | processor_possible_families = ['Xeon'] |
| 48 | processor_possible_versions = ['Intel(R) Xeon(R) CPU E5-4620 0 @ 2.20GHz', 'Intel(R) Xeon(R) CPU E5-2680 0 @ 2.70GHz','Intel(R) Xeon(R) CPU E5-2697 v2 @ 2.70GHz'] |
| 49 | memory_possible_types = ['DDR2','DDR3'] |
| 50 | memory_possible_form_factors = ['DIMM'] |
| 51 | hypervisor_possible_types = ['QEMU'] |
| 52 | hypervisor_possible_domain_types = ['kvm'] #['qemu', 'kvm'] |
| 53 | os_possible_id = ['Red Hat Enterprise Linux Server release 6.4 (Santiago)', |
| 54 | 'Red Hat Enterprise Linux Server release 6.5 (Santiago)', |
| 55 | 'Red Hat Enterprise Linux Server release 6.6 (Santiago)', |
| 56 | 'CentOS release 6.5 (Final)', |
| 57 | 'CentOS release 6.6 (Final)', |
| 58 | 'Red Hat Enterprise Linux Server release 7.0 (Maipo)', |
| 59 | 'Red Hat Enterprise Linux Server release 7.1 (Maipo)', |
| 60 | ] |
| 61 | os_possible_types = ['GNU/Linux'] |
| 62 | os_possible_architectures = ['x86_64'] |
| 63 | hypervisor_possible_composed_versions = ['QEMU-kvm'] |
| 64 | units = dict() |
| 65 | units[Units.bw] = ['Gbps', 'Mbps', 'kbps', 'bps'] |
| 66 | units[Units.freq] = ['GHz', 'MHz', 'KHz', 'Hz'] |
| 67 | units[Units.memory_1000] = ['GB', 'MB', 'KB', 'B'] |
| 68 | units[Units.memory_1024] = ['GiB', 'MiB', 'KiB', 'B'] |
| 69 | units[Units.memory_full] = ['GB', 'MB', 'KB', 'GiB', 'MiB', 'KiB', 'B'] |
| 70 | valid_hugepage_sz = [1073741824, 2097152] #In bytes |
| 71 | valid_VNFC_iface_types = ['mgmt','data'] |
| 72 | |
| 73 | def __init__(self): |
| 74 | return |
| 75 | |