blob: 38a67ebacfabfec90ca4a9c7021070b7de831b7f [file] [log] [blame]
Mike Tureka7cb4be2016-01-18 19:35:29 +00001# Copyright 2015 NEC Corporation
2# All Rights Reserved.
3#
Ameya Raut64ad5572022-01-27 11:26:27 +00004# Copyright (c) 2022 Dell Inc. or its subsidiaries.
5#
Mike Tureka7cb4be2016-01-18 19:35:29 +00006# Licensed under the Apache License, Version 2.0 (the "License"); you may
7# not use this file except in compliance with the License. You may obtain
8# a copy of the License at
9#
10# http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing, software
13# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15# License for the specific language governing permissions and limitations
16# under the License.
17
18from oslo_config import cfg
19
20from tempest import config # noqa
21
22
Takashi Kajinami5933b562025-11-18 20:47:06 +090023_INSPECTOR_REASON = ('ironic-inspector was retired in favor of the built-in'
24 'agent inspect interface.')
25
26
Julia Kreger3a07c4d2021-06-22 10:27:56 -070027# NOTE(TheJulia): The following options are loaded into a tempest
28# plugin configuration option via plugin.py.
Dmitry Tantsurb609cea2017-12-12 08:06:44 +010029ironic_service_option = cfg.BoolOpt('ironic',
30 default=False,
31 help='Whether or not ironic is expected '
32 'to be available')
Jim Rollenhagen1c11bdf2016-11-29 16:57:30 -050033
John L. Villalovos25be1172017-12-13 16:08:34 -080034inspector_service_option = cfg.BoolOpt("ironic_inspector",
35 default=False,
Takashi Kajinami5933b562025-11-18 20:47:06 +090036 deprecated_for_removal=True,
37 deprecated_reason=_INSPECTOR_REASON,
Dmitry Tantsurb609cea2017-12-12 08:06:44 +010038 help="Whether or not ironic-inspector "
39 "is expected to be available")
Jim Rollenhagen1c11bdf2016-11-29 16:57:30 -050040
Julia Kreger3a07c4d2021-06-22 10:27:56 -070041ironic_scope_enforcement = cfg.BoolOpt('ironic',
Julia Kreger638dcb72024-01-23 15:16:40 -080042 default=True,
Julia Kreger3a07c4d2021-06-22 10:27:56 -070043 help='Wheter or not ironic is '
44 'exepcted to enforce auth '
45 'scope.')
46
47inspector_scope_enforcement = cfg.BoolOpt('ironic_inspector',
Julia Kreger638dcb72024-01-23 15:16:40 -080048 default=True,
Takashi Kajinami5933b562025-11-18 20:47:06 +090049 deprecated_for_removal=True,
50 deprecated_reason=_INSPECTOR_REASON,
Julia Kreger3a07c4d2021-06-22 10:27:56 -070051 help='Whether or not '
52 'ironic-inspector is expected '
53 'to enforce auth scope.')
54
Mike Tureka7cb4be2016-01-18 19:35:29 +000055baremetal_group = cfg.OptGroup(name='baremetal',
56 title='Baremetal provisioning service options',
57 help='When enabling baremetal tests, Nova '
58 'must be configured to use the Ironic '
59 'driver. The following parameters for the '
60 '[compute] section must be disabled: '
61 'console_output, interface_attach, '
62 'live_migration, pause, rescue, resize, '
63 'shelve, snapshot, and suspend')
64
Julia Kreger3a07c4d2021-06-22 10:27:56 -070065# The bulk of the embedded configuration is below.
66
Anton Arefiev6dc82792016-08-03 11:50:49 +030067baremetal_introspection_group = cfg.OptGroup(
68 name="baremetal_introspection",
69 title="Baremetal introspection service options",
70 help="When enabling baremetal introspection tests,"
71 "Ironic must be configured.")
72
Vasyl Saienkof46b9fa2017-02-23 13:06:56 -050073baremetal_features_group = cfg.OptGroup(
74 name='baremetal_feature_enabled',
75 title="Enabled Baremetal Service Features")
76
Mike Tureka7cb4be2016-01-18 19:35:29 +000077BaremetalGroup = [
Thiago Paivaa7760932016-08-15 15:23:30 -030078 cfg.StrOpt('catalog_type',
79 default='baremetal',
80 help="Catalog type of the baremetal provisioning service"),
81 cfg.StrOpt('driver',
Iury Gregory Melo Ferreira4569ada2020-03-09 16:52:09 +010082 default='fake-hardware',
Dmitry Tantsur893b1a92018-04-26 16:12:45 +020083 help="Driver name to use for API tests"),
Thiago Paivaa7760932016-08-15 15:23:30 -030084 cfg.StrOpt('endpoint_type',
85 default='publicURL',
86 choices=['public', 'admin', 'internal',
87 'publicURL', 'adminURL', 'internalURL'],
88 help="The endpoint type to use for the baremetal provisioning"
89 " service"),
Kamlesh Chauvhan42656a02022-05-12 14:11:14 +000090 cfg.StrOpt('root_device_name',
91 default='/dev/md0',
92 help="Root device name to be used for node deployment"),
Mike Tureka7cb4be2016-01-18 19:35:29 +000093 cfg.IntOpt('deploywait_timeout',
94 default=15,
95 help="Timeout for Ironic node to reach the "
96 "wait-callback state after powering on."),
Thiago Paivaa7760932016-08-15 15:23:30 -030097 cfg.IntOpt('active_timeout',
98 default=300,
99 help="Timeout for Ironic node to completely provision"),
Julia Kreger982d1772022-03-30 16:40:44 -0700100 cfg.IntOpt('anaconda_active_timeout',
101 default=3600,
102 help="Timeout for Ironic node to completely provision "
103 "when using the anaconda deployment interface."),
Thiago Paivaa7760932016-08-15 15:23:30 -0300104 cfg.IntOpt('association_timeout',
105 default=30,
106 help="Timeout for association of Nova instance and Ironic "
107 "node"),
Kamlesh Chauvhan30d1f902022-11-28 08:35:17 +0000108 cfg.IntOpt('inspect_timeout',
Dmitry Tantsurb294d962024-08-08 15:00:50 +0200109 default=300,
Kamlesh Chauvhan30d1f902022-11-28 08:35:17 +0000110 help="Timeout for inspecting an Ironic node."),
Thiago Paivaa7760932016-08-15 15:23:30 -0300111 cfg.IntOpt('power_timeout',
112 default=60,
113 help="Timeout for Ironic power transitions."),
114 cfg.IntOpt('unprovision_timeout',
115 default=300,
116 help="Timeout for unprovisioning an Ironic node. "
117 "Takes longer since Kilo as Ironic performs an extra "
118 "step in Node cleaning."),
Dao Cong Tien4108a352018-01-26 09:38:46 +0700119 cfg.IntOpt('rescue_timeout',
120 default=300,
121 help="Timeout for rescuing an Ironic node."),
122 cfg.IntOpt('unrescue_timeout',
123 default=300,
124 help="Timeout for unrescuing an Ironic node."),
Yuiko Takadaff785002015-12-17 15:56:42 +0900125 cfg.StrOpt('min_microversion',
Yuiko Takadaff785002015-12-17 15:56:42 +0900126 help="Lower version of the test target microversion range. "
127 "The format is 'X.Y', where 'X' and 'Y' are int values. "
128 "Tempest selects tests based on the range between "
129 "min_microversion and max_microversion. "
130 "If both values are None, Tempest avoids tests which "
131 "require a microversion."),
132 cfg.StrOpt('max_microversion',
133 default='latest',
134 help="Upper version of the test target microversion range. "
135 "The format is 'X.Y', where 'X' and 'Y' are int values. "
136 "Tempest selects tests based on the range between "
137 "min_microversion and max_microversion. "
138 "If both values are None, Tempest avoids tests which "
139 "require a microversion."),
Yuriy Yekovenkoeb612d92016-01-18 17:49:47 +0200140 cfg.BoolOpt('use_provision_network',
141 default=False,
Vasyl Saienko4ddbeec2017-01-20 16:26:04 +0000142 help="Whether the Ironic/Neutron tenant isolation is enabled"),
143 cfg.StrOpt('whole_disk_image_ref',
144 help="UUID of the wholedisk image to use in the tests."),
Vasyl Saienkof46b9fa2017-02-23 13:06:56 -0500145 cfg.StrOpt('whole_disk_image_url',
146 help="An http link to the wholedisk image to use in the "
147 "tests."),
148 cfg.StrOpt('whole_disk_image_checksum',
Julia Kregerec74c1c2023-05-02 12:57:45 -0700149 help="An checksum of the image. Recommend SHA256 or SHA512"
150 "as MD5 is deprecated."),
Vasyl Saienko4ddbeec2017-01-20 16:26:04 +0000151 cfg.StrOpt('partition_image_ref',
152 help="UUID of the partitioned image to use in the tests."),
Julia Kregerff9f8742020-06-17 13:47:34 -0700153 cfg.StrOpt('ramdisk_iso_image_ref',
154 help=("UUID (or url) of an ISO image for the ramdisk boot "
155 "tests.")),
Kamlesh Chauvhan42656a02022-05-12 14:11:14 +0000156 cfg.StrOpt('storage_inventory_file',
157 help="Path to storage inventory file for RAID cleaning tests."),
Kamlesh Chauvhan78562052022-09-03 06:22:08 +0000158 cfg.StrOpt('export_location',
159 help="Export config location for configuration molds."),
160 cfg.StrOpt('import_location',
161 help="Import config location for configuration molds."),
162 cfg.StrOpt('rollback_import_location',
163 help="Rollback import config location for configuration "
164 "molds. Optional. If not provided, rollback is skipped."),
Julia Kreger982d1772022-03-30 16:40:44 -0700165 # TODO(TheJulia): For now, anaconda can be url based and we can move in
166 # to being tested with glance as soon as we get a public stage2 image.
167 cfg.StrOpt('anaconda_image_ref',
168 help="URL of an anaconda repository to set as image_source"),
169 cfg.StrOpt('anaconda_kernel_ref',
170 help="URL of the kernel to utilize for anaconda deploys."),
171 cfg.StrOpt('anaconda_initial_ramdisk_ref',
172 help="URL of the initial ramdisk to utilize for anaconda "
173 "deploy operations."),
174 cfg.StrOpt('anaconda_stage2_ramdisk_ref',
175 help="URL of the anaconda second stage ramdisk. Presence of "
176 "this setting will also determine if a stage2 specific "
177 "anaconda test is run, or not."),
178 cfg.StrOpt('anaconda_exit_test_at',
179 default='heartbeat',
180 choices=['heartbeat', 'active'],
181 help='When to end the anaconda test job at. Due to '
182 'the use model of the anaconda driver, as well '
183 'as the performance profile, the anaconda test is '
184 'normally only executed until we observe a heartbeat '
185 'operation indicating that anaconda *has* booted and '
186 'successfully parsed the URL.'),
Vasyl Saienko4ddbeec2017-01-20 16:26:04 +0000187 cfg.ListOpt('enabled_drivers',
188 default=['fake', 'pxe_ipmitool', 'agent_ipmitool'],
189 help="List of Ironic enabled drivers."),
190 cfg.ListOpt('enabled_hardware_types',
191 default=['ipmi'],
192 help="List of Ironic enabled hardware types."),
Yolanda Roblaeef49ea2018-05-15 12:54:58 +0200193 cfg.ListOpt('enabled_bios_interfaces',
194 default=['fake'],
195 help="List of Ironic enabled bios interfaces."),
Pavlo Shchelokovskyy12e62752017-12-21 16:11:28 +0000196 cfg.ListOpt('enabled_deploy_interfaces',
197 default=['iscsi', 'direct'],
198 help="List of Ironic enabled deploy interfaces."),
Dao Cong Tien4108a352018-01-26 09:38:46 +0700199 cfg.ListOpt('enabled_rescue_interfaces',
200 default=['no-rescue'],
201 help="List of Ironic enabled rescue interfaces."),
ankitbf770e52018-01-19 07:39:01 +0000202 cfg.ListOpt('enabled_boot_interfaces',
203 default=['fake', 'pxe'],
204 help="List of Ironic enabled boot interfaces."),
Dmitry Tantsur65abaca2019-08-07 11:07:48 +0200205 cfg.ListOpt('enabled_raid_interfaces',
206 default=['no-raid', 'agent'],
207 help="List of Ironic enabled RAID interfaces."),
Ameya Raut64ad5572022-01-27 11:26:27 +0000208 cfg.ListOpt('enabled_management_interfaces',
209 default=['fake', 'ipmitool', 'noop'],
210 help="List of Ironic enabled management interfaces."),
211 cfg.ListOpt('enabled_power_interfaces',
212 default=['fake', 'ipmitool'],
213 help="List of Ironic enabled power interfaces."),
Dmitry Tantsurb294d962024-08-08 15:00:50 +0200214 cfg.ListOpt('enabled_inspect_interfaces',
215 default=['no-inspect'],
216 help="List of Ironic enabled inspect interfaces."),
Dao Cong Tiend6ce6672017-12-18 19:04:48 +0700217 cfg.StrOpt('default_rescue_interface',
218 help="Ironic default rescue interface."),
Kamlesh Chauvhan853164a2022-08-18 10:42:42 +0000219 cfg.StrOpt('firmware_image_url',
220 help="Image URL of firmware image file supported by "
221 "update_firmware clean step."),
222 cfg.StrOpt('firmware_image_checksum',
223 help="SHA1 checksum of firmware image file."),
224 cfg.StrOpt('firmware_rollback_image_url',
225 help="Image URL of firmware update cleaning step's "
226 "rollback image. Optional. If not provided, "
227 "rollback is skipped."),
228 cfg.StrOpt('firmware_rollback_image_checksum',
229 help="SHA1 checksum of firmware rollback image file. "
230 "This is required if firmware_rollback_image_url is set."),
Vasyl Saienko4ddbeec2017-01-20 16:26:04 +0000231 cfg.IntOpt('adjusted_root_disk_size_gb',
232 min=0,
233 help="Ironic adjusted disk size to use in the standalone tests "
234 "as instance_info/root_gb value."),
Julia Kregercd85f202019-08-26 14:48:17 -0400235 cfg.BoolOpt('partition_netboot',
236 default=True,
237 help="Treat partition images as netbooted as opposed to "
238 "attempting to populate a boot loader. IF cirros is "
239 "being used, this option should be set to True as "
240 "it lacks the needed components to make it locally "
241 "from a partition image."),
Iury Gregory Melo Ferreirad180a3e2020-06-16 18:17:44 +0200242 cfg.StrOpt('boot_mode',
243 default='bios',
244 choices=['bios', 'uefi'],
245 help="The desired boot_mode to be used on testing nodes."),
Dmitry Tantsurfd43dcc2022-02-01 20:19:36 +0100246 cfg.StrOpt('default_boot_option',
247 # No good default here, we need to actually set it.
248 help="The default boot option the testing nodes are using."),
Julia Kreger793608a2023-10-11 12:40:31 -0700249 cfg.BoolOpt("rebuild_remote_dhcpless",
250 default=True,
251 help="If we should issue a rebuild request when testing "
252 "dhcpless virtual media deployments. This may be useful "
Julia Kreger56b16312024-04-28 08:50:39 -0700253 "if bug 2032377 is not fixed in the agent ramdisk. This "
254 "test is functionally incompatible with Temporary URLs "
255 "as they may timeout while the test is running."),
Julia Kreger793608a2023-10-11 12:40:31 -0700256 cfg.StrOpt("public_subnet_id",
257 help="The public subnet ID where routers will be bound for "
258 "testing purposes with the dhcp-less test scenario."),
259 cfg.StrOpt("public_subnet_ip",
260 help="The public subnet IP to bind the public router to for "
261 "dhcp-less testing.")
Mike Tureka7cb4be2016-01-18 19:35:29 +0000262]
Vasyl Saienkof46b9fa2017-02-23 13:06:56 -0500263
264BaremetalFeaturesGroup = [
265 cfg.BoolOpt('ipxe_enabled',
266 default=True,
267 help="Defines if IPXE is enabled"),
Dmitry Tantsur52ca0092019-07-23 15:09:09 +0200268 cfg.BoolOpt('adoption',
269 # Defaults to False since it's a destructive operation AND it
270 # requires the plugin to be able to read ipmi_password.
271 default=False,
272 help="Defines if adoption is enabled"),
Dmitry Tantsur65abaca2019-08-07 11:07:48 +0200273 cfg.BoolOpt('software_raid',
274 default=False,
275 help="Defines if software RAID is enabled (available "
276 "starting with Train). Requires at least two disks "
277 "on testing nodes."),
Dmitry Tantsur0cc7aa92020-05-07 12:01:56 +0200278 cfg.BoolOpt('deploy_time_raid',
279 default=False,
280 help="Defines if in-band RAID can be built in deploy time "
281 "(possible starting with Victoria)."),
Julia Kreger793608a2023-10-11 12:40:31 -0700282 cfg.BoolOpt('dhcpless_vmedia',
283 default=False,
284 help="Defines if it is possible to execute DHCP-Less "
285 "deployment of baremetal nodes through virtual media. "
286 "This test requires full OS images with configuration "
287 "support for embedded network metadata through glean "
288 "or cloud-init, and thus cannot be executed with "
289 "most default job configurations."),
Vasyl Saienkobf454e42025-02-08 01:41:02 +0000290 cfg.BoolOpt('trunks_supported',
291 default=False,
292 help="Define if trunks are supported by networking driver "
293 "with baremetal nodes."),
Vasyl Saienkof46b9fa2017-02-23 13:06:56 -0500294]
Dmitry Tantsurb609cea2017-12-12 08:06:44 +0100295
Anton Arefiev6dc82792016-08-03 11:50:49 +0300296BaremetalIntrospectionGroup = [
297 cfg.StrOpt('catalog_type',
298 default='baremetal-introspection',
Takashi Kajinami5933b562025-11-18 20:47:06 +0900299 deprecated_for_removal=True,
300 deprecated_reason=_INSPECTOR_REASON,
Anton Arefiev6dc82792016-08-03 11:50:49 +0300301 help="Catalog type of the baremetal provisioning service"),
302 cfg.StrOpt('endpoint_type',
303 default='publicURL',
304 choices=['public', 'admin', 'internal',
305 'publicURL', 'adminURL', 'internalURL'],
Takashi Kajinami5933b562025-11-18 20:47:06 +0900306 deprecated_for_removal=True,
307 deprecated_reason=_INSPECTOR_REASON,
Anton Arefiev6dc82792016-08-03 11:50:49 +0300308 help="The endpoint type to use for the baremetal introspection"
309 " service"),
310 cfg.IntOpt('introspection_sleep',
311 default=30,
Takashi Kajinami5933b562025-11-18 20:47:06 +0900312 deprecated_for_removal=True,
313 deprecated_reason=_INSPECTOR_REASON,
Anton Arefiev6dc82792016-08-03 11:50:49 +0300314 help="Introspection sleep before check status"),
315 cfg.IntOpt('introspection_timeout',
316 default=600,
Takashi Kajinami5933b562025-11-18 20:47:06 +0900317 deprecated_for_removal=True,
318 deprecated_reason=_INSPECTOR_REASON,
Anton Arefiev6dc82792016-08-03 11:50:49 +0300319 help="Introspection time out"),
Dmitry Tantsurdeab6ec2019-10-18 17:29:52 +0200320 cfg.IntOpt('introspection_start_timeout',
321 default=90,
Takashi Kajinami5933b562025-11-18 20:47:06 +0900322 deprecated_for_removal=True,
323 deprecated_reason=_INSPECTOR_REASON,
Dmitry Tantsurdeab6ec2019-10-18 17:29:52 +0200324 help="Timeout to start introspection"),
Anton Arefiev6dc82792016-08-03 11:50:49 +0300325 cfg.IntOpt('hypervisor_update_sleep',
326 default=60,
Takashi Kajinami5933b562025-11-18 20:47:06 +0900327 deprecated_for_removal=True,
328 deprecated_reason=_INSPECTOR_REASON,
Anton Arefiev6dc82792016-08-03 11:50:49 +0300329 help="Time to wait until nova becomes aware of "
330 "bare metal instances"),
331 cfg.IntOpt('hypervisor_update_timeout',
332 default=300,
Takashi Kajinami5933b562025-11-18 20:47:06 +0900333 deprecated_for_removal=True,
334 deprecated_reason=_INSPECTOR_REASON,
Anton Arefiev6dc82792016-08-03 11:50:49 +0300335 help="Time out for wait until nova becomes aware of "
336 "bare metal instances"),
337 # NOTE(aarefiev): status_check_period default is 60s, but checking
338 # node state takes some time(API call), so races appear here,
339 # 80s would be enough to make one more check.
340 cfg.IntOpt('ironic_sync_timeout',
341 default=80,
Takashi Kajinami5933b562025-11-18 20:47:06 +0900342 deprecated_for_removal=True,
343 deprecated_reason=_INSPECTOR_REASON,
Anton Arefiev6dc82792016-08-03 11:50:49 +0300344 help="Time it might take for Ironic--Inspector "
345 "sync to happen"),
Anton Arefiev6b003562016-09-13 12:17:29 +0300346 cfg.IntOpt('discovery_timeout',
347 default=300,
Takashi Kajinami5933b562025-11-18 20:47:06 +0900348 deprecated_for_removal=True,
349 deprecated_reason=_INSPECTOR_REASON,
Anton Arefiev6b003562016-09-13 12:17:29 +0300350 help="Time to wait until new node would enrolled in "
351 "ironic"),
352 cfg.BoolOpt('auto_discovery_feature',
353 default=False,
Takashi Kajinami5933b562025-11-18 20:47:06 +0900354 deprecated_for_removal=True,
355 deprecated_reason=_INSPECTOR_REASON,
Anton Arefiev6b003562016-09-13 12:17:29 +0300356 help="Is the auto-discovery feature enabled. Enroll hook "
357 "should be specified in node_not_found_hook - processing "
358 "section of inspector.conf"),
Dmitry Tantsur39579c62018-03-28 12:46:48 +0200359 cfg.StrOpt('auto_discovery_default_driver',
360 # TODO(dtantsur): change to fake-hardware when Queens is no
361 # longer supported.
362 default='fake',
Takashi Kajinami5933b562025-11-18 20:47:06 +0900363 deprecated_for_removal=True,
364 deprecated_reason=_INSPECTOR_REASON,
Dmitry Tantsur39579c62018-03-28 12:46:48 +0200365 help="The driver expected to be set on newly discovered nodes. "
366 "Only has effect with auto_discovery_feature is True."),
Dmitry Tantsur0812cc72019-03-14 10:56:45 +0100367 cfg.StrOpt('auto_discovery_target_driver',
Takashi Kajinami5933b562025-11-18 20:47:06 +0900368 deprecated_for_removal=True,
369 deprecated_reason=_INSPECTOR_REASON,
Dmitry Tantsur0812cc72019-03-14 10:56:45 +0100370 help="The driver to set on the newly discovered nodes. "
371 "Only has effect with auto_discovery_feature is True."),
Dongcan Ye2d992ed2019-05-10 01:55:29 +0000372 cfg.StrOpt('data_store',
Takashi Kajinami5933b562025-11-18 20:47:06 +0900373 deprecated_for_removal=True,
374 deprecated_reason=_INSPECTOR_REASON,
Dongcan Ye2d992ed2019-05-10 01:55:29 +0000375 help="The storage backend for storing introspection data."),
Anton Arefiev6dc82792016-08-03 11:50:49 +0300376]