blob: 9771d581463b1e2f46b3f4701471078dbac7954a [file] [log] [blame]
Mike Tureka7cb4be2016-01-18 19:35:29 +00001# Copyright 2015 NEC Corporation
2# All Rights Reserved.
3#
4# Licensed under the Apache License, Version 2.0 (the "License"); you may
5# not use this file except in compliance with the License. You may obtain
6# a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13# License for the specific language governing permissions and limitations
14# under the License.
15
16from oslo_config import cfg
17
18from tempest import config # noqa
19
20
Vladyslav Drokdcb72962020-12-14 13:46:59 +010021_DEFAULT_IFACE_HELP = ('Default {0} interface to be used for nodes that '
22 'do not have {0}_interface field set.')
23
24
Julia Kreger3a07c4d2021-06-22 10:27:56 -070025# NOTE(TheJulia): The following options are loaded into a tempest
26# plugin configuration option via plugin.py.
Dmitry Tantsurb609cea2017-12-12 08:06:44 +010027ironic_service_option = cfg.BoolOpt('ironic',
28 default=False,
29 help='Whether or not ironic is expected '
30 'to be available')
Jim Rollenhagen1c11bdf2016-11-29 16:57:30 -050031
John L. Villalovos25be1172017-12-13 16:08:34 -080032inspector_service_option = cfg.BoolOpt("ironic_inspector",
33 default=False,
Dmitry Tantsurb609cea2017-12-12 08:06:44 +010034 help="Whether or not ironic-inspector "
35 "is expected to be available")
Jim Rollenhagen1c11bdf2016-11-29 16:57:30 -050036
Julia Kreger3a07c4d2021-06-22 10:27:56 -070037ironic_scope_enforcement = cfg.BoolOpt('ironic',
38 default=False,
39 help='Wheter or not ironic is '
40 'exepcted to enforce auth '
41 'scope.')
42
43inspector_scope_enforcement = cfg.BoolOpt('ironic_inspector',
44 default=False,
45 help='Whether or not '
46 'ironic-inspector is expected '
47 'to enforce auth scope.')
48
Mike Tureka7cb4be2016-01-18 19:35:29 +000049baremetal_group = cfg.OptGroup(name='baremetal',
50 title='Baremetal provisioning service options',
51 help='When enabling baremetal tests, Nova '
52 'must be configured to use the Ironic '
53 'driver. The following parameters for the '
54 '[compute] section must be disabled: '
55 'console_output, interface_attach, '
56 'live_migration, pause, rescue, resize, '
57 'shelve, snapshot, and suspend')
58
Julia Kreger3a07c4d2021-06-22 10:27:56 -070059# The bulk of the embedded configuration is below.
60
Anton Arefiev6dc82792016-08-03 11:50:49 +030061baremetal_introspection_group = cfg.OptGroup(
62 name="baremetal_introspection",
63 title="Baremetal introspection service options",
64 help="When enabling baremetal introspection tests,"
65 "Ironic must be configured.")
66
Vasyl Saienkof46b9fa2017-02-23 13:06:56 -050067baremetal_features_group = cfg.OptGroup(
68 name='baremetal_feature_enabled',
69 title="Enabled Baremetal Service Features")
70
Mike Tureka7cb4be2016-01-18 19:35:29 +000071BaremetalGroup = [
Thiago Paivaa7760932016-08-15 15:23:30 -030072 cfg.StrOpt('catalog_type',
73 default='baremetal',
74 help="Catalog type of the baremetal provisioning service"),
75 cfg.StrOpt('driver',
Iury Gregory Melo Ferreira4569ada2020-03-09 16:52:09 +010076 default='fake-hardware',
Dmitry Tantsur893b1a92018-04-26 16:12:45 +020077 help="Driver name to use for API tests"),
Thiago Paivaa7760932016-08-15 15:23:30 -030078 cfg.StrOpt('endpoint_type',
79 default='publicURL',
80 choices=['public', 'admin', 'internal',
81 'publicURL', 'adminURL', 'internalURL'],
82 help="The endpoint type to use for the baremetal provisioning"
83 " service"),
Mike Tureka7cb4be2016-01-18 19:35:29 +000084 cfg.IntOpt('deploywait_timeout',
85 default=15,
86 help="Timeout for Ironic node to reach the "
87 "wait-callback state after powering on."),
Thiago Paivaa7760932016-08-15 15:23:30 -030088 cfg.IntOpt('active_timeout',
89 default=300,
90 help="Timeout for Ironic node to completely provision"),
91 cfg.IntOpt('association_timeout',
92 default=30,
93 help="Timeout for association of Nova instance and Ironic "
94 "node"),
95 cfg.IntOpt('power_timeout',
96 default=60,
97 help="Timeout for Ironic power transitions."),
98 cfg.IntOpt('unprovision_timeout',
99 default=300,
100 help="Timeout for unprovisioning an Ironic node. "
101 "Takes longer since Kilo as Ironic performs an extra "
102 "step in Node cleaning."),
Dao Cong Tien4108a352018-01-26 09:38:46 +0700103 cfg.IntOpt('rescue_timeout',
104 default=300,
105 help="Timeout for rescuing an Ironic node."),
106 cfg.IntOpt('unrescue_timeout',
107 default=300,
108 help="Timeout for unrescuing an Ironic node."),
Yuiko Takadaff785002015-12-17 15:56:42 +0900109 cfg.StrOpt('min_microversion',
Yuiko Takadaff785002015-12-17 15:56:42 +0900110 help="Lower version of the test target microversion range. "
111 "The format is 'X.Y', where 'X' and 'Y' are int values. "
112 "Tempest selects tests based on the range between "
113 "min_microversion and max_microversion. "
114 "If both values are None, Tempest avoids tests which "
115 "require a microversion."),
116 cfg.StrOpt('max_microversion',
117 default='latest',
118 help="Upper version of the test target microversion range. "
119 "The format is 'X.Y', where 'X' and 'Y' are int values. "
120 "Tempest selects tests based on the range between "
121 "min_microversion and max_microversion. "
122 "If both values are None, Tempest avoids tests which "
123 "require a microversion."),
Yuriy Yekovenkoeb612d92016-01-18 17:49:47 +0200124 cfg.BoolOpt('use_provision_network',
125 default=False,
Vasyl Saienko4ddbeec2017-01-20 16:26:04 +0000126 help="Whether the Ironic/Neutron tenant isolation is enabled"),
127 cfg.StrOpt('whole_disk_image_ref',
128 help="UUID of the wholedisk image to use in the tests."),
Vasyl Saienkof46b9fa2017-02-23 13:06:56 -0500129 cfg.StrOpt('whole_disk_image_url',
130 help="An http link to the wholedisk image to use in the "
131 "tests."),
132 cfg.StrOpt('whole_disk_image_checksum',
133 help="An MD5 checksum of the image."),
Vasyl Saienko4ddbeec2017-01-20 16:26:04 +0000134 cfg.StrOpt('partition_image_ref',
135 help="UUID of the partitioned image to use in the tests."),
Julia Kregerff9f8742020-06-17 13:47:34 -0700136 cfg.StrOpt('ramdisk_iso_image_ref',
137 help=("UUID (or url) of an ISO image for the ramdisk boot "
138 "tests.")),
Vasyl Saienko4ddbeec2017-01-20 16:26:04 +0000139 cfg.ListOpt('enabled_drivers',
140 default=['fake', 'pxe_ipmitool', 'agent_ipmitool'],
141 help="List of Ironic enabled drivers."),
142 cfg.ListOpt('enabled_hardware_types',
143 default=['ipmi'],
144 help="List of Ironic enabled hardware types."),
Yolanda Roblaeef49ea2018-05-15 12:54:58 +0200145 cfg.ListOpt('enabled_bios_interfaces',
146 default=['fake'],
147 help="List of Ironic enabled bios interfaces."),
Pavlo Shchelokovskyy12e62752017-12-21 16:11:28 +0000148 cfg.ListOpt('enabled_deploy_interfaces',
149 default=['iscsi', 'direct'],
150 help="List of Ironic enabled deploy interfaces."),
Dao Cong Tien4108a352018-01-26 09:38:46 +0700151 cfg.ListOpt('enabled_rescue_interfaces',
152 default=['no-rescue'],
153 help="List of Ironic enabled rescue interfaces."),
ankitbf770e52018-01-19 07:39:01 +0000154 cfg.ListOpt('enabled_boot_interfaces',
155 default=['fake', 'pxe'],
156 help="List of Ironic enabled boot interfaces."),
Dmitry Tantsur65abaca2019-08-07 11:07:48 +0200157 cfg.ListOpt('enabled_raid_interfaces',
158 default=['no-raid', 'agent'],
159 help="List of Ironic enabled RAID interfaces."),
Vladyslav Drokdcb72962020-12-14 13:46:59 +0100160 cfg.StrOpt('default_bios_interface',
161 help=_DEFAULT_IFACE_HELP.format('bios')),
162 cfg.StrOpt('default_boot_interface',
163 help=_DEFAULT_IFACE_HELP.format('boot')),
164 cfg.StrOpt('default_console_interface',
165 help=_DEFAULT_IFACE_HELP.format('console')),
166 cfg.StrOpt('default_deploy_interface',
167 help=_DEFAULT_IFACE_HELP.format('deploy')),
168 cfg.StrOpt('default_inspect_interface',
169 help=_DEFAULT_IFACE_HELP.format('inspect')),
170 cfg.StrOpt('default_management_interface',
171 help=_DEFAULT_IFACE_HELP.format('management')),
172 cfg.StrOpt('default_network_interface',
173 help=_DEFAULT_IFACE_HELP.format('network')),
174 cfg.StrOpt('default_power_interface',
175 help=_DEFAULT_IFACE_HELP.format('power')),
176 cfg.StrOpt('default_raid_interface',
177 help=_DEFAULT_IFACE_HELP.format('raid')),
Dao Cong Tiend6ce6672017-12-18 19:04:48 +0700178 cfg.StrOpt('default_rescue_interface',
Vladyslav Drokdcb72962020-12-14 13:46:59 +0100179 help=_DEFAULT_IFACE_HELP.format('rescue')),
180 cfg.StrOpt('default_storage_interface',
181 help=_DEFAULT_IFACE_HELP.format('storage')),
182 cfg.StrOpt('default_vendor_interface',
183 help=_DEFAULT_IFACE_HELP.format('vendor')),
Vasyl Saienko4ddbeec2017-01-20 16:26:04 +0000184 cfg.IntOpt('adjusted_root_disk_size_gb',
185 min=0,
186 help="Ironic adjusted disk size to use in the standalone tests "
187 "as instance_info/root_gb value."),
Sam Bettsf31abcc2018-02-06 17:34:08 +0000188 cfg.IntOpt('available_nodes', min=0, default=None,
189 help="The number of baremetal hosts available to use for "
Julia Kregercd85f202019-08-26 14:48:17 -0400190 "the tests."),
191 cfg.BoolOpt('partition_netboot',
192 default=True,
193 help="Treat partition images as netbooted as opposed to "
194 "attempting to populate a boot loader. IF cirros is "
195 "being used, this option should be set to True as "
196 "it lacks the needed components to make it locally "
197 "from a partition image."),
Iury Gregory Melo Ferreirad180a3e2020-06-16 18:17:44 +0200198 cfg.StrOpt('boot_mode',
199 default='bios',
200 choices=['bios', 'uefi'],
201 help="The desired boot_mode to be used on testing nodes."),
Mike Tureka7cb4be2016-01-18 19:35:29 +0000202]
Vasyl Saienkof46b9fa2017-02-23 13:06:56 -0500203
204BaremetalFeaturesGroup = [
205 cfg.BoolOpt('ipxe_enabled',
206 default=True,
207 help="Defines if IPXE is enabled"),
Dmitry Tantsur52ca0092019-07-23 15:09:09 +0200208 cfg.BoolOpt('adoption',
209 # Defaults to False since it's a destructive operation AND it
210 # requires the plugin to be able to read ipmi_password.
211 default=False,
212 help="Defines if adoption is enabled"),
Dmitry Tantsur65abaca2019-08-07 11:07:48 +0200213 cfg.BoolOpt('software_raid',
214 default=False,
215 help="Defines if software RAID is enabled (available "
216 "starting with Train). Requires at least two disks "
217 "on testing nodes."),
Dmitry Tantsur0cc7aa92020-05-07 12:01:56 +0200218 cfg.BoolOpt('deploy_time_raid',
219 default=False,
220 help="Defines if in-band RAID can be built in deploy time "
221 "(possible starting with Victoria)."),
Vasyl Saienkof46b9fa2017-02-23 13:06:56 -0500222]
Dmitry Tantsurb609cea2017-12-12 08:06:44 +0100223
Anton Arefiev6dc82792016-08-03 11:50:49 +0300224BaremetalIntrospectionGroup = [
225 cfg.StrOpt('catalog_type',
226 default='baremetal-introspection',
227 help="Catalog type of the baremetal provisioning service"),
228 cfg.StrOpt('endpoint_type',
229 default='publicURL',
230 choices=['public', 'admin', 'internal',
231 'publicURL', 'adminURL', 'internalURL'],
232 help="The endpoint type to use for the baremetal introspection"
233 " service"),
234 cfg.IntOpt('introspection_sleep',
235 default=30,
236 help="Introspection sleep before check status"),
237 cfg.IntOpt('introspection_timeout',
238 default=600,
239 help="Introspection time out"),
Dmitry Tantsurdeab6ec2019-10-18 17:29:52 +0200240 cfg.IntOpt('introspection_start_timeout',
241 default=90,
242 help="Timeout to start introspection"),
Anton Arefiev6dc82792016-08-03 11:50:49 +0300243 cfg.IntOpt('hypervisor_update_sleep',
244 default=60,
245 help="Time to wait until nova becomes aware of "
246 "bare metal instances"),
247 cfg.IntOpt('hypervisor_update_timeout',
248 default=300,
249 help="Time out for wait until nova becomes aware of "
250 "bare metal instances"),
251 # NOTE(aarefiev): status_check_period default is 60s, but checking
252 # node state takes some time(API call), so races appear here,
253 # 80s would be enough to make one more check.
254 cfg.IntOpt('ironic_sync_timeout',
255 default=80,
256 help="Time it might take for Ironic--Inspector "
257 "sync to happen"),
Anton Arefiev6b003562016-09-13 12:17:29 +0300258 cfg.IntOpt('discovery_timeout',
259 default=300,
260 help="Time to wait until new node would enrolled in "
261 "ironic"),
262 cfg.BoolOpt('auto_discovery_feature',
263 default=False,
264 help="Is the auto-discovery feature enabled. Enroll hook "
265 "should be specified in node_not_found_hook - processing "
266 "section of inspector.conf"),
Dmitry Tantsur39579c62018-03-28 12:46:48 +0200267 cfg.StrOpt('auto_discovery_default_driver',
268 # TODO(dtantsur): change to fake-hardware when Queens is no
269 # longer supported.
270 default='fake',
271 help="The driver expected to be set on newly discovered nodes. "
272 "Only has effect with auto_discovery_feature is True."),
Dmitry Tantsur0812cc72019-03-14 10:56:45 +0100273 cfg.StrOpt('auto_discovery_target_driver',
274 help="The driver to set on the newly discovered nodes. "
275 "Only has effect with auto_discovery_feature is True."),
Dongcan Ye2d992ed2019-05-10 01:55:29 +0000276 cfg.StrOpt('data_store',
Dongcan Ye2d992ed2019-05-10 01:55:29 +0000277 help="The storage backend for storing introspection data."),
Anton Arefiev6dc82792016-08-03 11:50:49 +0300278]