Coverage for nova/virt/vmwareapi/constants.py: 0%
42 statements
« prev ^ index » next coverage.py v7.6.12, created at 2025-04-24 11:16 +0000
« prev ^ index » next coverage.py v7.6.12, created at 2025-04-24 11:16 +0000
1# Copyright (c) 2014 VMware, Inc.
2#
3# Licensed under the Apache License, Version 2.0 (the "License"); you may
4# not use this file except in compliance with the License. You may obtain
5# a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12# License for the specific language governing permissions and limitations
13# under the License.
15"""
16Shared constants across the VMware driver
17"""
19from nova.compute import power_state
20from nova.network import model as network_model
22MIN_VC_VERSION = '5.1.0'
23NEXT_MIN_VC_VERSION = '5.5.0'
24# The minimum VC version for Neutron 'ovs' port type support
25MIN_VC_OVS_VERSION = '5.5.0'
27DISK_FORMAT_ISO = 'iso'
28DISK_FORMAT_VMDK = 'vmdk'
29DISK_FORMAT_ISCSI = 'iscsi'
30DISK_FORMAT_FCD = 'vstorageobject'
31DISK_FORMATS_ALL = [DISK_FORMAT_ISO, DISK_FORMAT_VMDK, DISK_FORMAT_FCD]
33DISK_TYPE_THIN = 'thin'
34CONTAINER_FORMAT_BARE = 'bare'
35CONTAINER_FORMAT_OVA = 'ova'
36CONTAINER_FORMATS_ALL = [CONTAINER_FORMAT_BARE, CONTAINER_FORMAT_OVA]
38DISK_TYPE_SPARSE = 'sparse'
39DISK_TYPE_PREALLOCATED = 'preallocated'
40DISK_TYPE_STREAM_OPTIMIZED = 'streamOptimized'
41DISK_TYPE_EAGER_ZEROED_THICK = 'eagerZeroedThick'
43DATASTORE_TYPE_VMFS = 'VMFS'
44DATASTORE_TYPE_NFS = 'NFS'
45DATASTORE_TYPE_NFS41 = 'NFS41'
46DATASTORE_TYPE_VSAN = 'vsan'
48DEFAULT_VIF_MODEL = network_model.VIF_MODEL_E1000
49DEFAULT_OS_TYPE = "otherGuest"
50DEFAULT_ADAPTER_TYPE = "lsiLogic"
51DEFAULT_DISK_TYPE = DISK_TYPE_PREALLOCATED
52DEFAULT_DISK_FORMAT = DISK_FORMAT_VMDK
53DEFAULT_CONTAINER_FORMAT = CONTAINER_FORMAT_BARE
55IMAGE_VM_PREFIX = "OSTACK_IMG"
56SNAPSHOT_VM_PREFIX = "OSTACK_SNAP"
58ADAPTER_TYPE_BUSLOGIC = "busLogic"
59ADAPTER_TYPE_IDE = "ide"
60ADAPTER_TYPE_LSILOGICSAS = "lsiLogicsas"
61ADAPTER_TYPE_PARAVIRTUAL = "paraVirtual"
63SCSI_ADAPTER_TYPES = [DEFAULT_ADAPTER_TYPE, ADAPTER_TYPE_LSILOGICSAS,
64 ADAPTER_TYPE_BUSLOGIC, ADAPTER_TYPE_PARAVIRTUAL]
66SUPPORTED_FLAT_VARIANTS = ["thin", "preallocated", "thick", "eagerZeroedThick"]
68EXTENSION_KEY = 'org.openstack.compute'
69EXTENSION_TYPE_INSTANCE = 'instance'
71# The max number of devices that can be connected to one adapter
72# One adapter has 16 slots but one reserved for controller
73SCSI_MAX_CONNECT_NUMBER = 15
75# The max number of SCSI adaptors that could be created on one instance.
76SCSI_MAX_CONTROLLER_NUMBER = 4
78# This list was extracted from a file on an installation of ESX 6.5. The file
79# can be found in /usr/lib/vmware/hostd/vimLocale/en/gos.vmsg
80# The contents of this list should be updated whenever there is a new
81# release of ESX.
82VALID_OS_TYPES = set([
83 'asianux3_64Guest',
84 'asianux3Guest',
85 'asianux4_64Guest',
86 'asianux4Guest',
87 'asianux5_64Guest',
88 'asianux7_64Guest',
89 'centos64Guest',
90 'centosGuest',
91 'centos6Guest',
92 'centos6_64Guest',
93 'centos7_64Guest',
94 'centos7Guest',
95 'coreos64Guest',
96 'darwin10_64Guest',
97 'darwin10Guest',
98 'darwin11_64Guest',
99 'darwin11Guest',
100 'darwin12_64Guest',
101 'darwin13_64Guest',
102 'darwin14_64Guest',
103 'darwin15_64Guest',
104 'darwin16_64Guest',
105 'darwin64Guest',
106 'darwinGuest',
107 'debian4_64Guest',
108 'debian4Guest',
109 'debian5_64Guest',
110 'debian5Guest',
111 'debian6_64Guest',
112 'debian6Guest',
113 'debian7_64Guest',
114 'debian7Guest',
115 'debian8_64Guest',
116 'debian8Guest',
117 'debian9_64Guest',
118 'debian9Guest',
119 'debian10_64Guest',
120 'debian10Guest',
121 'dosGuest',
122 'eComStation2Guest',
123 'eComStationGuest',
124 'fedora64Guest',
125 'fedoraGuest',
126 'freebsd64Guest',
127 'freebsdGuest',
128 'genericLinuxGuest',
129 'mandrakeGuest',
130 'mandriva64Guest',
131 'mandrivaGuest',
132 'netware4Guest',
133 'netware5Guest',
134 'netware6Guest',
135 'nld9Guest',
136 'oesGuest',
137 'openServer5Guest',
138 'openServer6Guest',
139 'opensuse64Guest',
140 'opensuseGuest',
141 'oracleLinux64Guest',
142 'oracleLinuxGuest',
143 'oracleLinux6Guest',
144 'oracleLinux6_64Guest',
145 'oracleLinux7_64Guest',
146 'oracleLinux7Guest',
147 'os2Guest',
148 'other24xLinux64Guest',
149 'other24xLinuxGuest',
150 'other26xLinux64Guest',
151 'other26xLinuxGuest',
152 'other3xLinux64Guest',
153 'other3xLinuxGuest',
154 'otherGuest',
155 'otherGuest64',
156 'otherLinux64Guest',
157 'otherLinuxGuest',
158 'redhatGuest',
159 'rhel2Guest',
160 'rhel3_64Guest',
161 'rhel3Guest',
162 'rhel4_64Guest',
163 'rhel4Guest',
164 'rhel5_64Guest',
165 'rhel5Guest',
166 'rhel6_64Guest',
167 'rhel6Guest',
168 'rhel7_64Guest',
169 'rhel7Guest',
170 'sjdsGuest',
171 'sles10_64Guest',
172 'sles10Guest',
173 'sles11_64Guest',
174 'sles11Guest',
175 'sles12_64Guest',
176 'sles12Guest',
177 'sles64Guest',
178 'slesGuest',
179 'solaris10_64Guest',
180 'solaris10Guest',
181 'solaris11_64Guest',
182 'solaris6Guest',
183 'solaris7Guest',
184 'solaris8Guest',
185 'solaris9Guest',
186 'suse64Guest',
187 'suseGuest',
188 'turboLinux64Guest',
189 'turboLinuxGuest',
190 'ubuntu64Guest',
191 'ubuntuGuest',
192 'unixWare7Guest',
193 'vmkernel5Guest',
194 'vmkernel6Guest',
195 'vmkernel65Guest',
196 'vmkernelGuest',
197 'vmwarePhoton64Guest',
198 'win2000AdvServGuest',
199 'win2000ProGuest',
200 'win2000ServGuest',
201 'win31Guest',
202 'win95Guest',
203 'win98Guest',
204 'windows7_64Guest',
205 'windows7Guest',
206 'windows7Server64Guest',
207 'windows8_64Guest',
208 'windows8Guest',
209 'windows8Server64Guest',
210 'windows9_64Guest',
211 'windows9Guest',
212 'windows9Server64Guest',
213 'windowsHyperVGuest',
214 'winLonghorn64Guest',
215 'winLonghornGuest',
216 'winMeGuest',
217 'winNetBusinessGuest',
218 'winNetDatacenter64Guest',
219 'winNetDatacenterGuest',
220 'winNetEnterprise64Guest',
221 'winNetEnterpriseGuest',
222 'winNetStandard64Guest',
223 'winNetStandardGuest',
224 'winNetWebGuest',
225 'winNTGuest',
226 'winVista64Guest',
227 'winVistaGuest',
228 'winXPHomeGuest',
229 'winXPPro64Guest',
230 'winXPProGuest',
231])
233POWER_STATES = {'poweredOff': power_state.SHUTDOWN,
234 'poweredOn': power_state.RUNNING,
235 'suspended': power_state.SUSPENDED}