blob: 8213b61bc2fa794c8fbdfcaa907f361850ccef29 [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
Vladyslav Drok0f830192020-12-14 13:46:59 +010023_DEFAULT_IFACE_HELP = ('Default {0} interface to be used for nodes that '
24 'do not have {0}_interface field set.')
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,
Dmitry Tantsurb609cea2017-12-12 08:06:44 +010036 help="Whether or not ironic-inspector "
37 "is expected to be available")
Jim Rollenhagen1c11bdf2016-11-29 16:57:30 -050038
Julia Kreger3a07c4d2021-06-22 10:27:56 -070039ironic_scope_enforcement = cfg.BoolOpt('ironic',
Julia Kreger638dcb72024-01-23 15:16:40 -080040 default=True,
Julia Kreger3a07c4d2021-06-22 10:27:56 -070041 help='Wheter or not ironic is '
42 'exepcted to enforce auth '
43 'scope.')
44
45inspector_scope_enforcement = cfg.BoolOpt('ironic_inspector',
Julia Kreger638dcb72024-01-23 15:16:40 -080046 default=True,
Julia Kreger3a07c4d2021-06-22 10:27:56 -070047 help='Whether or not '
48 'ironic-inspector is expected '
49 'to enforce auth scope.')
50
Mike Tureka7cb4be2016-01-18 19:35:29 +000051baremetal_group = cfg.OptGroup(name='baremetal',
52 title='Baremetal provisioning service options',
53 help='When enabling baremetal tests, Nova '
54 'must be configured to use the Ironic '
55 'driver. The following parameters for the '
56 '[compute] section must be disabled: '
57 'console_output, interface_attach, '
58 'live_migration, pause, rescue, resize, '
59 'shelve, snapshot, and suspend')
60
Julia Kreger3a07c4d2021-06-22 10:27:56 -070061# The bulk of the embedded configuration is below.
62
Anton Arefiev6dc82792016-08-03 11:50:49 +030063baremetal_introspection_group = cfg.OptGroup(
64 name="baremetal_introspection",
65 title="Baremetal introspection service options",
66 help="When enabling baremetal introspection tests,"
67 "Ironic must be configured.")
68
Vasyl Saienkof46b9fa2017-02-23 13:06:56 -050069baremetal_features_group = cfg.OptGroup(
70 name='baremetal_feature_enabled',
71 title="Enabled Baremetal Service Features")
72
Mike Tureka7cb4be2016-01-18 19:35:29 +000073BaremetalGroup = [
Thiago Paivaa7760932016-08-15 15:23:30 -030074 cfg.StrOpt('catalog_type',
75 default='baremetal',
76 help="Catalog type of the baremetal provisioning service"),
77 cfg.StrOpt('driver',
Iury Gregory Melo Ferreira4569ada2020-03-09 16:52:09 +010078 default='fake-hardware',
Dmitry Tantsur893b1a92018-04-26 16:12:45 +020079 help="Driver name to use for API tests"),
Thiago Paivaa7760932016-08-15 15:23:30 -030080 cfg.StrOpt('endpoint_type',
81 default='publicURL',
82 choices=['public', 'admin', 'internal',
83 'publicURL', 'adminURL', 'internalURL'],
84 help="The endpoint type to use for the baremetal provisioning"
85 " service"),
Kamlesh Chauvhan42656a02022-05-12 14:11:14 +000086 cfg.StrOpt('root_device_name',
87 default='/dev/md0',
88 help="Root device name to be used for node deployment"),
Mike Tureka7cb4be2016-01-18 19:35:29 +000089 cfg.IntOpt('deploywait_timeout',
90 default=15,
91 help="Timeout for Ironic node to reach the "
92 "wait-callback state after powering on."),
Thiago Paivaa7760932016-08-15 15:23:30 -030093 cfg.IntOpt('active_timeout',
94 default=300,
95 help="Timeout for Ironic node to completely provision"),
Julia Kreger982d1772022-03-30 16:40:44 -070096 cfg.IntOpt('anaconda_active_timeout',
97 default=3600,
98 help="Timeout for Ironic node to completely provision "
99 "when using the anaconda deployment interface."),
Thiago Paivaa7760932016-08-15 15:23:30 -0300100 cfg.IntOpt('association_timeout',
101 default=30,
102 help="Timeout for association of Nova instance and Ironic "
103 "node"),
Kamlesh Chauvhan30d1f902022-11-28 08:35:17 +0000104 cfg.IntOpt('inspect_timeout',
105 default=10,
106 help="Timeout for inspecting an Ironic node."),
Thiago Paivaa7760932016-08-15 15:23:30 -0300107 cfg.IntOpt('power_timeout',
108 default=60,
109 help="Timeout for Ironic power transitions."),
110 cfg.IntOpt('unprovision_timeout',
111 default=300,
112 help="Timeout for unprovisioning an Ironic node. "
113 "Takes longer since Kilo as Ironic performs an extra "
114 "step in Node cleaning."),
Dao Cong Tien4108a352018-01-26 09:38:46 +0700115 cfg.IntOpt('rescue_timeout',
116 default=300,
117 help="Timeout for rescuing an Ironic node."),
118 cfg.IntOpt('unrescue_timeout',
119 default=300,
120 help="Timeout for unrescuing an Ironic node."),
Yuiko Takadaff785002015-12-17 15:56:42 +0900121 cfg.StrOpt('min_microversion',
Yuiko Takadaff785002015-12-17 15:56:42 +0900122 help="Lower version of the test target microversion range. "
123 "The format is 'X.Y', where 'X' and 'Y' are int values. "
124 "Tempest selects tests based on the range between "
125 "min_microversion and max_microversion. "
126 "If both values are None, Tempest avoids tests which "
127 "require a microversion."),
128 cfg.StrOpt('max_microversion',
129 default='latest',
130 help="Upper version of the test target microversion range. "
131 "The format is 'X.Y', where 'X' and 'Y' are int values. "
132 "Tempest selects tests based on the range between "
133 "min_microversion and max_microversion. "
134 "If both values are None, Tempest avoids tests which "
135 "require a microversion."),
Yuriy Yekovenkoeb612d92016-01-18 17:49:47 +0200136 cfg.BoolOpt('use_provision_network',
137 default=False,
Vasyl Saienko4ddbeec2017-01-20 16:26:04 +0000138 help="Whether the Ironic/Neutron tenant isolation is enabled"),
139 cfg.StrOpt('whole_disk_image_ref',
140 help="UUID of the wholedisk image to use in the tests."),
Vasyl Saienkof46b9fa2017-02-23 13:06:56 -0500141 cfg.StrOpt('whole_disk_image_url',
142 help="An http link to the wholedisk image to use in the "
143 "tests."),
144 cfg.StrOpt('whole_disk_image_checksum',
Julia Kregerec74c1c2023-05-02 12:57:45 -0700145 help="An checksum of the image. Recommend SHA256 or SHA512"
146 "as MD5 is deprecated."),
Vasyl Saienko4ddbeec2017-01-20 16:26:04 +0000147 cfg.StrOpt('partition_image_ref',
148 help="UUID of the partitioned image to use in the tests."),
Julia Kregerff9f8742020-06-17 13:47:34 -0700149 cfg.StrOpt('ramdisk_iso_image_ref',
150 help=("UUID (or url) of an ISO image for the ramdisk boot "
151 "tests.")),
Kamlesh Chauvhan42656a02022-05-12 14:11:14 +0000152 cfg.StrOpt('storage_inventory_file',
153 help="Path to storage inventory file for RAID cleaning tests."),
Kamlesh Chauvhan78562052022-09-03 06:22:08 +0000154 cfg.StrOpt('export_location',
155 help="Export config location for configuration molds."),
156 cfg.StrOpt('import_location',
157 help="Import config location for configuration molds."),
158 cfg.StrOpt('rollback_import_location',
159 help="Rollback import config location for configuration "
160 "molds. Optional. If not provided, rollback is skipped."),
Julia Kreger982d1772022-03-30 16:40:44 -0700161 # TODO(TheJulia): For now, anaconda can be url based and we can move in
162 # to being tested with glance as soon as we get a public stage2 image.
163 cfg.StrOpt('anaconda_image_ref',
164 help="URL of an anaconda repository to set as image_source"),
165 cfg.StrOpt('anaconda_kernel_ref',
166 help="URL of the kernel to utilize for anaconda deploys."),
167 cfg.StrOpt('anaconda_initial_ramdisk_ref',
168 help="URL of the initial ramdisk to utilize for anaconda "
169 "deploy operations."),
170 cfg.StrOpt('anaconda_stage2_ramdisk_ref',
171 help="URL of the anaconda second stage ramdisk. Presence of "
172 "this setting will also determine if a stage2 specific "
173 "anaconda test is run, or not."),
174 cfg.StrOpt('anaconda_exit_test_at',
175 default='heartbeat',
176 choices=['heartbeat', 'active'],
177 help='When to end the anaconda test job at. Due to '
178 'the use model of the anaconda driver, as well '
179 'as the performance profile, the anaconda test is '
180 'normally only executed until we observe a heartbeat '
181 'operation indicating that anaconda *has* booted and '
182 'successfully parsed the URL.'),
Vasyl Saienko4ddbeec2017-01-20 16:26:04 +0000183 cfg.ListOpt('enabled_drivers',
184 default=['fake', 'pxe_ipmitool', 'agent_ipmitool'],
185 help="List of Ironic enabled drivers."),
186 cfg.ListOpt('enabled_hardware_types',
187 default=['ipmi'],
188 help="List of Ironic enabled hardware types."),
Yolanda Roblaeef49ea2018-05-15 12:54:58 +0200189 cfg.ListOpt('enabled_bios_interfaces',
190 default=['fake'],
191 help="List of Ironic enabled bios interfaces."),
Pavlo Shchelokovskyy12e62752017-12-21 16:11:28 +0000192 cfg.ListOpt('enabled_deploy_interfaces',
193 default=['iscsi', 'direct'],
194 help="List of Ironic enabled deploy interfaces."),
Dao Cong Tien4108a352018-01-26 09:38:46 +0700195 cfg.ListOpt('enabled_rescue_interfaces',
196 default=['no-rescue'],
197 help="List of Ironic enabled rescue interfaces."),
ankitbf770e52018-01-19 07:39:01 +0000198 cfg.ListOpt('enabled_boot_interfaces',
199 default=['fake', 'pxe'],
200 help="List of Ironic enabled boot interfaces."),
Dmitry Tantsur65abaca2019-08-07 11:07:48 +0200201 cfg.ListOpt('enabled_raid_interfaces',
202 default=['no-raid', 'agent'],
203 help="List of Ironic enabled RAID interfaces."),
Ameya Raut64ad5572022-01-27 11:26:27 +0000204 cfg.ListOpt('enabled_management_interfaces',
205 default=['fake', 'ipmitool', 'noop'],
206 help="List of Ironic enabled management interfaces."),
207 cfg.ListOpt('enabled_power_interfaces',
208 default=['fake', 'ipmitool'],
209 help="List of Ironic enabled power interfaces."),
Vladyslav Drok0f830192020-12-14 13:46:59 +0100210 cfg.StrOpt('default_bios_interface',
211 help=_DEFAULT_IFACE_HELP.format('bios')),
212 cfg.StrOpt('default_boot_interface',
213 help=_DEFAULT_IFACE_HELP.format('boot')),
214 cfg.StrOpt('default_console_interface',
215 help=_DEFAULT_IFACE_HELP.format('console')),
216 cfg.StrOpt('default_deploy_interface',
217 help=_DEFAULT_IFACE_HELP.format('deploy')),
218 cfg.StrOpt('default_inspect_interface',
219 help=_DEFAULT_IFACE_HELP.format('inspect')),
220 cfg.StrOpt('default_management_interface',
221 help=_DEFAULT_IFACE_HELP.format('management')),
222 cfg.StrOpt('default_network_interface',
223 help=_DEFAULT_IFACE_HELP.format('network')),
224 cfg.StrOpt('default_power_interface',
225 help=_DEFAULT_IFACE_HELP.format('power')),
226 cfg.StrOpt('default_raid_interface',
227 help=_DEFAULT_IFACE_HELP.format('raid')),
Dao Cong Tiend6ce6672017-12-18 19:04:48 +0700228 cfg.StrOpt('default_rescue_interface',
Vladyslav Drok0f830192020-12-14 13:46:59 +0100229 help=_DEFAULT_IFACE_HELP.format('rescue')),
230 cfg.StrOpt('default_storage_interface',
231 help=_DEFAULT_IFACE_HELP.format('storage')),
232 cfg.StrOpt('default_vendor_interface',
233 help=_DEFAULT_IFACE_HELP.format('vendor')),
Kamlesh Chauvhan853164a2022-08-18 10:42:42 +0000234 cfg.StrOpt('firmware_image_url',
235 help="Image URL of firmware image file supported by "
236 "update_firmware clean step."),
237 cfg.StrOpt('firmware_image_checksum',
238 help="SHA1 checksum of firmware image file."),
239 cfg.StrOpt('firmware_rollback_image_url',
240 help="Image URL of firmware update cleaning step's "
241 "rollback image. Optional. If not provided, "
242 "rollback is skipped."),
243 cfg.StrOpt('firmware_rollback_image_checksum',
244 help="SHA1 checksum of firmware rollback image file. "
245 "This is required if firmware_rollback_image_url is set."),
Vasyl Saienko4ddbeec2017-01-20 16:26:04 +0000246 cfg.IntOpt('adjusted_root_disk_size_gb',
247 min=0,
248 help="Ironic adjusted disk size to use in the standalone tests "
249 "as instance_info/root_gb value."),
Sam Bettsf31abcc2018-02-06 17:34:08 +0000250 cfg.IntOpt('available_nodes', min=0, default=None,
251 help="The number of baremetal hosts available to use for "
Julia Kregercd85f202019-08-26 14:48:17 -0400252 "the tests."),
253 cfg.BoolOpt('partition_netboot',
254 default=True,
255 help="Treat partition images as netbooted as opposed to "
256 "attempting to populate a boot loader. IF cirros is "
257 "being used, this option should be set to True as "
258 "it lacks the needed components to make it locally "
259 "from a partition image."),
Iury Gregory Melo Ferreirad180a3e2020-06-16 18:17:44 +0200260 cfg.StrOpt('boot_mode',
261 default='bios',
262 choices=['bios', 'uefi'],
263 help="The desired boot_mode to be used on testing nodes."),
Dmitry Tantsurfd43dcc2022-02-01 20:19:36 +0100264 cfg.StrOpt('default_boot_option',
265 # No good default here, we need to actually set it.
266 help="The default boot option the testing nodes are using."),
Julia Kreger793608a2023-10-11 12:40:31 -0700267 cfg.BoolOpt("rebuild_remote_dhcpless",
268 default=True,
269 help="If we should issue a rebuild request when testing "
270 "dhcpless virtual media deployments. This may be useful "
271 "if bug 2032377 is not fixed in the agent ramdisk."),
272 cfg.StrOpt("public_subnet_id",
273 help="The public subnet ID where routers will be bound for "
274 "testing purposes with the dhcp-less test scenario."),
275 cfg.StrOpt("public_subnet_ip",
276 help="The public subnet IP to bind the public router to for "
277 "dhcp-less testing.")
Mike Tureka7cb4be2016-01-18 19:35:29 +0000278]
Vasyl Saienkof46b9fa2017-02-23 13:06:56 -0500279
280BaremetalFeaturesGroup = [
281 cfg.BoolOpt('ipxe_enabled',
282 default=True,
283 help="Defines if IPXE is enabled"),
Dmitry Tantsur52ca0092019-07-23 15:09:09 +0200284 cfg.BoolOpt('adoption',
285 # Defaults to False since it's a destructive operation AND it
286 # requires the plugin to be able to read ipmi_password.
287 default=False,
288 help="Defines if adoption is enabled"),
Dmitry Tantsur65abaca2019-08-07 11:07:48 +0200289 cfg.BoolOpt('software_raid',
290 default=False,
291 help="Defines if software RAID is enabled (available "
292 "starting with Train). Requires at least two disks "
293 "on testing nodes."),
Dmitry Tantsur0cc7aa92020-05-07 12:01:56 +0200294 cfg.BoolOpt('deploy_time_raid',
295 default=False,
296 help="Defines if in-band RAID can be built in deploy time "
297 "(possible starting with Victoria)."),
Julia Kreger793608a2023-10-11 12:40:31 -0700298 cfg.BoolOpt('dhcpless_vmedia',
299 default=False,
300 help="Defines if it is possible to execute DHCP-Less "
301 "deployment of baremetal nodes through virtual media. "
302 "This test requires full OS images with configuration "
303 "support for embedded network metadata through glean "
304 "or cloud-init, and thus cannot be executed with "
305 "most default job configurations."),
Vasyl Saienkof46b9fa2017-02-23 13:06:56 -0500306]
Dmitry Tantsurb609cea2017-12-12 08:06:44 +0100307
Anton Arefiev6dc82792016-08-03 11:50:49 +0300308BaremetalIntrospectionGroup = [
309 cfg.StrOpt('catalog_type',
310 default='baremetal-introspection',
311 help="Catalog type of the baremetal provisioning service"),
312 cfg.StrOpt('endpoint_type',
313 default='publicURL',
314 choices=['public', 'admin', 'internal',
315 'publicURL', 'adminURL', 'internalURL'],
316 help="The endpoint type to use for the baremetal introspection"
317 " service"),
318 cfg.IntOpt('introspection_sleep',
319 default=30,
320 help="Introspection sleep before check status"),
321 cfg.IntOpt('introspection_timeout',
322 default=600,
323 help="Introspection time out"),
Dmitry Tantsurdeab6ec2019-10-18 17:29:52 +0200324 cfg.IntOpt('introspection_start_timeout',
325 default=90,
326 help="Timeout to start introspection"),
Anton Arefiev6dc82792016-08-03 11:50:49 +0300327 cfg.IntOpt('hypervisor_update_sleep',
328 default=60,
329 help="Time to wait until nova becomes aware of "
330 "bare metal instances"),
331 cfg.IntOpt('hypervisor_update_timeout',
332 default=300,
333 help="Time out for wait until nova becomes aware of "
334 "bare metal instances"),
335 # NOTE(aarefiev): status_check_period default is 60s, but checking
336 # node state takes some time(API call), so races appear here,
337 # 80s would be enough to make one more check.
338 cfg.IntOpt('ironic_sync_timeout',
339 default=80,
340 help="Time it might take for Ironic--Inspector "
341 "sync to happen"),
Anton Arefiev6b003562016-09-13 12:17:29 +0300342 cfg.IntOpt('discovery_timeout',
343 default=300,
344 help="Time to wait until new node would enrolled in "
345 "ironic"),
346 cfg.BoolOpt('auto_discovery_feature',
347 default=False,
348 help="Is the auto-discovery feature enabled. Enroll hook "
349 "should be specified in node_not_found_hook - processing "
350 "section of inspector.conf"),
Dmitry Tantsur39579c62018-03-28 12:46:48 +0200351 cfg.StrOpt('auto_discovery_default_driver',
352 # TODO(dtantsur): change to fake-hardware when Queens is no
353 # longer supported.
354 default='fake',
355 help="The driver expected to be set on newly discovered nodes. "
356 "Only has effect with auto_discovery_feature is True."),
Dmitry Tantsur0812cc72019-03-14 10:56:45 +0100357 cfg.StrOpt('auto_discovery_target_driver',
358 help="The driver to set on the newly discovered nodes. "
359 "Only has effect with auto_discovery_feature is True."),
Dongcan Ye2d992ed2019-05-10 01:55:29 +0000360 cfg.StrOpt('data_store',
Dongcan Ye2d992ed2019-05-10 01:55:29 +0000361 help="The storage backend for storing introspection data."),
Anton Arefiev6dc82792016-08-03 11:50:49 +0300362]