blob: 5a71b84bc0af30b9a14dda4636c97cc590913cb9 [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
Julia Kreger3a07c4d2021-06-22 10:27:56 -070023# NOTE(TheJulia): The following options are loaded into a tempest
24# plugin configuration option via plugin.py.
Dmitry Tantsurb609cea2017-12-12 08:06:44 +010025ironic_service_option = cfg.BoolOpt('ironic',
26 default=False,
27 help='Whether or not ironic is expected '
28 'to be available')
Jim Rollenhagen1c11bdf2016-11-29 16:57:30 -050029
John L. Villalovos25be1172017-12-13 16:08:34 -080030inspector_service_option = cfg.BoolOpt("ironic_inspector",
31 default=False,
Dmitry Tantsurb609cea2017-12-12 08:06:44 +010032 help="Whether or not ironic-inspector "
33 "is expected to be available")
Jim Rollenhagen1c11bdf2016-11-29 16:57:30 -050034
Julia Kreger3a07c4d2021-06-22 10:27:56 -070035ironic_scope_enforcement = cfg.BoolOpt('ironic',
Julia Kreger638dcb72024-01-23 15:16:40 -080036 default=True,
Julia Kreger3a07c4d2021-06-22 10:27:56 -070037 help='Wheter or not ironic is '
38 'exepcted to enforce auth '
39 'scope.')
40
41inspector_scope_enforcement = cfg.BoolOpt('ironic_inspector',
Julia Kreger638dcb72024-01-23 15:16:40 -080042 default=True,
Julia Kreger3a07c4d2021-06-22 10:27:56 -070043 help='Whether or not '
44 'ironic-inspector is expected '
45 'to enforce auth scope.')
46
Mike Tureka7cb4be2016-01-18 19:35:29 +000047baremetal_group = cfg.OptGroup(name='baremetal',
48 title='Baremetal provisioning service options',
49 help='When enabling baremetal tests, Nova '
50 'must be configured to use the Ironic '
51 'driver. The following parameters for the '
52 '[compute] section must be disabled: '
53 'console_output, interface_attach, '
54 'live_migration, pause, rescue, resize, '
55 'shelve, snapshot, and suspend')
56
Julia Kreger3a07c4d2021-06-22 10:27:56 -070057# The bulk of the embedded configuration is below.
58
Anton Arefiev6dc82792016-08-03 11:50:49 +030059baremetal_introspection_group = cfg.OptGroup(
60 name="baremetal_introspection",
61 title="Baremetal introspection service options",
62 help="When enabling baremetal introspection tests,"
63 "Ironic must be configured.")
64
Vasyl Saienkof46b9fa2017-02-23 13:06:56 -050065baremetal_features_group = cfg.OptGroup(
66 name='baremetal_feature_enabled',
67 title="Enabled Baremetal Service Features")
68
Mike Tureka7cb4be2016-01-18 19:35:29 +000069BaremetalGroup = [
Thiago Paivaa7760932016-08-15 15:23:30 -030070 cfg.StrOpt('catalog_type',
71 default='baremetal',
72 help="Catalog type of the baremetal provisioning service"),
73 cfg.StrOpt('driver',
Iury Gregory Melo Ferreira4569ada2020-03-09 16:52:09 +010074 default='fake-hardware',
Dmitry Tantsur893b1a92018-04-26 16:12:45 +020075 help="Driver name to use for API tests"),
Thiago Paivaa7760932016-08-15 15:23:30 -030076 cfg.StrOpt('endpoint_type',
77 default='publicURL',
78 choices=['public', 'admin', 'internal',
79 'publicURL', 'adminURL', 'internalURL'],
80 help="The endpoint type to use for the baremetal provisioning"
81 " service"),
Kamlesh Chauvhan42656a02022-05-12 14:11:14 +000082 cfg.StrOpt('root_device_name',
83 default='/dev/md0',
84 help="Root device name to be used for node deployment"),
Mike Tureka7cb4be2016-01-18 19:35:29 +000085 cfg.IntOpt('deploywait_timeout',
86 default=15,
87 help="Timeout for Ironic node to reach the "
88 "wait-callback state after powering on."),
Thiago Paivaa7760932016-08-15 15:23:30 -030089 cfg.IntOpt('active_timeout',
90 default=300,
91 help="Timeout for Ironic node to completely provision"),
Julia Kreger982d1772022-03-30 16:40:44 -070092 cfg.IntOpt('anaconda_active_timeout',
93 default=3600,
94 help="Timeout for Ironic node to completely provision "
95 "when using the anaconda deployment interface."),
Thiago Paivaa7760932016-08-15 15:23:30 -030096 cfg.IntOpt('association_timeout',
97 default=30,
98 help="Timeout for association of Nova instance and Ironic "
99 "node"),
Kamlesh Chauvhan30d1f902022-11-28 08:35:17 +0000100 cfg.IntOpt('inspect_timeout',
101 default=10,
102 help="Timeout for inspecting an Ironic node."),
Thiago Paivaa7760932016-08-15 15:23:30 -0300103 cfg.IntOpt('power_timeout',
104 default=60,
105 help="Timeout for Ironic power transitions."),
106 cfg.IntOpt('unprovision_timeout',
107 default=300,
108 help="Timeout for unprovisioning an Ironic node. "
109 "Takes longer since Kilo as Ironic performs an extra "
110 "step in Node cleaning."),
Dao Cong Tien4108a352018-01-26 09:38:46 +0700111 cfg.IntOpt('rescue_timeout',
112 default=300,
113 help="Timeout for rescuing an Ironic node."),
114 cfg.IntOpt('unrescue_timeout',
115 default=300,
116 help="Timeout for unrescuing an Ironic node."),
Yuiko Takadaff785002015-12-17 15:56:42 +0900117 cfg.StrOpt('min_microversion',
Yuiko Takadaff785002015-12-17 15:56:42 +0900118 help="Lower 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."),
124 cfg.StrOpt('max_microversion',
125 default='latest',
126 help="Upper 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."),
Yuriy Yekovenkoeb612d92016-01-18 17:49:47 +0200132 cfg.BoolOpt('use_provision_network',
133 default=False,
Vasyl Saienko4ddbeec2017-01-20 16:26:04 +0000134 help="Whether the Ironic/Neutron tenant isolation is enabled"),
135 cfg.StrOpt('whole_disk_image_ref',
136 help="UUID of the wholedisk image to use in the tests."),
Vasyl Saienkof46b9fa2017-02-23 13:06:56 -0500137 cfg.StrOpt('whole_disk_image_url',
138 help="An http link to the wholedisk image to use in the "
139 "tests."),
140 cfg.StrOpt('whole_disk_image_checksum',
Julia Kregerec74c1c2023-05-02 12:57:45 -0700141 help="An checksum of the image. Recommend SHA256 or SHA512"
142 "as MD5 is deprecated."),
Vasyl Saienko4ddbeec2017-01-20 16:26:04 +0000143 cfg.StrOpt('partition_image_ref',
144 help="UUID of the partitioned image to use in the tests."),
Julia Kregerff9f8742020-06-17 13:47:34 -0700145 cfg.StrOpt('ramdisk_iso_image_ref',
146 help=("UUID (or url) of an ISO image for the ramdisk boot "
147 "tests.")),
Kamlesh Chauvhan42656a02022-05-12 14:11:14 +0000148 cfg.StrOpt('storage_inventory_file',
149 help="Path to storage inventory file for RAID cleaning tests."),
Kamlesh Chauvhan78562052022-09-03 06:22:08 +0000150 cfg.StrOpt('export_location',
151 help="Export config location for configuration molds."),
152 cfg.StrOpt('import_location',
153 help="Import config location for configuration molds."),
154 cfg.StrOpt('rollback_import_location',
155 help="Rollback import config location for configuration "
156 "molds. Optional. If not provided, rollback is skipped."),
Julia Kreger982d1772022-03-30 16:40:44 -0700157 # TODO(TheJulia): For now, anaconda can be url based and we can move in
158 # to being tested with glance as soon as we get a public stage2 image.
159 cfg.StrOpt('anaconda_image_ref',
160 help="URL of an anaconda repository to set as image_source"),
161 cfg.StrOpt('anaconda_kernel_ref',
162 help="URL of the kernel to utilize for anaconda deploys."),
163 cfg.StrOpt('anaconda_initial_ramdisk_ref',
164 help="URL of the initial ramdisk to utilize for anaconda "
165 "deploy operations."),
166 cfg.StrOpt('anaconda_stage2_ramdisk_ref',
167 help="URL of the anaconda second stage ramdisk. Presence of "
168 "this setting will also determine if a stage2 specific "
169 "anaconda test is run, or not."),
170 cfg.StrOpt('anaconda_exit_test_at',
171 default='heartbeat',
172 choices=['heartbeat', 'active'],
173 help='When to end the anaconda test job at. Due to '
174 'the use model of the anaconda driver, as well '
175 'as the performance profile, the anaconda test is '
176 'normally only executed until we observe a heartbeat '
177 'operation indicating that anaconda *has* booted and '
178 'successfully parsed the URL.'),
Vasyl Saienko4ddbeec2017-01-20 16:26:04 +0000179 cfg.ListOpt('enabled_drivers',
180 default=['fake', 'pxe_ipmitool', 'agent_ipmitool'],
181 help="List of Ironic enabled drivers."),
182 cfg.ListOpt('enabled_hardware_types',
183 default=['ipmi'],
184 help="List of Ironic enabled hardware types."),
Yolanda Roblaeef49ea2018-05-15 12:54:58 +0200185 cfg.ListOpt('enabled_bios_interfaces',
186 default=['fake'],
187 help="List of Ironic enabled bios interfaces."),
Pavlo Shchelokovskyy12e62752017-12-21 16:11:28 +0000188 cfg.ListOpt('enabled_deploy_interfaces',
189 default=['iscsi', 'direct'],
190 help="List of Ironic enabled deploy interfaces."),
Dao Cong Tien4108a352018-01-26 09:38:46 +0700191 cfg.ListOpt('enabled_rescue_interfaces',
192 default=['no-rescue'],
193 help="List of Ironic enabled rescue interfaces."),
ankitbf770e52018-01-19 07:39:01 +0000194 cfg.ListOpt('enabled_boot_interfaces',
195 default=['fake', 'pxe'],
196 help="List of Ironic enabled boot interfaces."),
Dmitry Tantsur65abaca2019-08-07 11:07:48 +0200197 cfg.ListOpt('enabled_raid_interfaces',
198 default=['no-raid', 'agent'],
199 help="List of Ironic enabled RAID interfaces."),
Ameya Raut64ad5572022-01-27 11:26:27 +0000200 cfg.ListOpt('enabled_management_interfaces',
201 default=['fake', 'ipmitool', 'noop'],
202 help="List of Ironic enabled management interfaces."),
203 cfg.ListOpt('enabled_power_interfaces',
204 default=['fake', 'ipmitool'],
205 help="List of Ironic enabled power interfaces."),
Dao Cong Tiend6ce6672017-12-18 19:04:48 +0700206 cfg.StrOpt('default_rescue_interface',
207 help="Ironic default rescue interface."),
Kamlesh Chauvhan853164a2022-08-18 10:42:42 +0000208 cfg.StrOpt('firmware_image_url',
209 help="Image URL of firmware image file supported by "
210 "update_firmware clean step."),
211 cfg.StrOpt('firmware_image_checksum',
212 help="SHA1 checksum of firmware image file."),
213 cfg.StrOpt('firmware_rollback_image_url',
214 help="Image URL of firmware update cleaning step's "
215 "rollback image. Optional. If not provided, "
216 "rollback is skipped."),
217 cfg.StrOpt('firmware_rollback_image_checksum',
218 help="SHA1 checksum of firmware rollback image file. "
219 "This is required if firmware_rollback_image_url is set."),
Vasyl Saienko4ddbeec2017-01-20 16:26:04 +0000220 cfg.IntOpt('adjusted_root_disk_size_gb',
221 min=0,
222 help="Ironic adjusted disk size to use in the standalone tests "
223 "as instance_info/root_gb value."),
Sam Bettsf31abcc2018-02-06 17:34:08 +0000224 cfg.IntOpt('available_nodes', min=0, default=None,
225 help="The number of baremetal hosts available to use for "
Julia Kregercd85f202019-08-26 14:48:17 -0400226 "the tests."),
227 cfg.BoolOpt('partition_netboot',
228 default=True,
229 help="Treat partition images as netbooted as opposed to "
230 "attempting to populate a boot loader. IF cirros is "
231 "being used, this option should be set to True as "
232 "it lacks the needed components to make it locally "
233 "from a partition image."),
Iury Gregory Melo Ferreirad180a3e2020-06-16 18:17:44 +0200234 cfg.StrOpt('boot_mode',
235 default='bios',
236 choices=['bios', 'uefi'],
237 help="The desired boot_mode to be used on testing nodes."),
Dmitry Tantsurfd43dcc2022-02-01 20:19:36 +0100238 cfg.StrOpt('default_boot_option',
239 # No good default here, we need to actually set it.
240 help="The default boot option the testing nodes are using."),
Julia Kreger793608a2023-10-11 12:40:31 -0700241 cfg.BoolOpt("rebuild_remote_dhcpless",
242 default=True,
243 help="If we should issue a rebuild request when testing "
244 "dhcpless virtual media deployments. This may be useful "
245 "if bug 2032377 is not fixed in the agent ramdisk."),
246 cfg.StrOpt("public_subnet_id",
247 help="The public subnet ID where routers will be bound for "
248 "testing purposes with the dhcp-less test scenario."),
249 cfg.StrOpt("public_subnet_ip",
250 help="The public subnet IP to bind the public router to for "
251 "dhcp-less testing.")
Mike Tureka7cb4be2016-01-18 19:35:29 +0000252]
Vasyl Saienkof46b9fa2017-02-23 13:06:56 -0500253
254BaremetalFeaturesGroup = [
255 cfg.BoolOpt('ipxe_enabled',
256 default=True,
257 help="Defines if IPXE is enabled"),
Dmitry Tantsur52ca0092019-07-23 15:09:09 +0200258 cfg.BoolOpt('adoption',
259 # Defaults to False since it's a destructive operation AND it
260 # requires the plugin to be able to read ipmi_password.
261 default=False,
262 help="Defines if adoption is enabled"),
Dmitry Tantsur65abaca2019-08-07 11:07:48 +0200263 cfg.BoolOpt('software_raid',
264 default=False,
265 help="Defines if software RAID is enabled (available "
266 "starting with Train). Requires at least two disks "
267 "on testing nodes."),
Dmitry Tantsur0cc7aa92020-05-07 12:01:56 +0200268 cfg.BoolOpt('deploy_time_raid',
269 default=False,
270 help="Defines if in-band RAID can be built in deploy time "
271 "(possible starting with Victoria)."),
Julia Kreger793608a2023-10-11 12:40:31 -0700272 cfg.BoolOpt('dhcpless_vmedia',
273 default=False,
274 help="Defines if it is possible to execute DHCP-Less "
275 "deployment of baremetal nodes through virtual media. "
276 "This test requires full OS images with configuration "
277 "support for embedded network metadata through glean "
278 "or cloud-init, and thus cannot be executed with "
279 "most default job configurations."),
Vasyl Saienkof46b9fa2017-02-23 13:06:56 -0500280]
Dmitry Tantsurb609cea2017-12-12 08:06:44 +0100281
Anton Arefiev6dc82792016-08-03 11:50:49 +0300282BaremetalIntrospectionGroup = [
283 cfg.StrOpt('catalog_type',
284 default='baremetal-introspection',
285 help="Catalog type of the baremetal provisioning service"),
286 cfg.StrOpt('endpoint_type',
287 default='publicURL',
288 choices=['public', 'admin', 'internal',
289 'publicURL', 'adminURL', 'internalURL'],
290 help="The endpoint type to use for the baremetal introspection"
291 " service"),
292 cfg.IntOpt('introspection_sleep',
293 default=30,
294 help="Introspection sleep before check status"),
295 cfg.IntOpt('introspection_timeout',
296 default=600,
297 help="Introspection time out"),
Dmitry Tantsurdeab6ec2019-10-18 17:29:52 +0200298 cfg.IntOpt('introspection_start_timeout',
299 default=90,
300 help="Timeout to start introspection"),
Anton Arefiev6dc82792016-08-03 11:50:49 +0300301 cfg.IntOpt('hypervisor_update_sleep',
302 default=60,
303 help="Time to wait until nova becomes aware of "
304 "bare metal instances"),
305 cfg.IntOpt('hypervisor_update_timeout',
306 default=300,
307 help="Time out for wait until nova becomes aware of "
308 "bare metal instances"),
309 # NOTE(aarefiev): status_check_period default is 60s, but checking
310 # node state takes some time(API call), so races appear here,
311 # 80s would be enough to make one more check.
312 cfg.IntOpt('ironic_sync_timeout',
313 default=80,
314 help="Time it might take for Ironic--Inspector "
315 "sync to happen"),
Anton Arefiev6b003562016-09-13 12:17:29 +0300316 cfg.IntOpt('discovery_timeout',
317 default=300,
318 help="Time to wait until new node would enrolled in "
319 "ironic"),
320 cfg.BoolOpt('auto_discovery_feature',
321 default=False,
322 help="Is the auto-discovery feature enabled. Enroll hook "
323 "should be specified in node_not_found_hook - processing "
324 "section of inspector.conf"),
Dmitry Tantsur39579c62018-03-28 12:46:48 +0200325 cfg.StrOpt('auto_discovery_default_driver',
326 # TODO(dtantsur): change to fake-hardware when Queens is no
327 # longer supported.
328 default='fake',
329 help="The driver expected to be set on newly discovered nodes. "
330 "Only has effect with auto_discovery_feature is True."),
Dmitry Tantsur0812cc72019-03-14 10:56:45 +0100331 cfg.StrOpt('auto_discovery_target_driver',
332 help="The driver to set on the newly discovered nodes. "
333 "Only has effect with auto_discovery_feature is True."),
Dongcan Ye2d992ed2019-05-10 01:55:29 +0000334 cfg.StrOpt('data_store',
Dongcan Ye2d992ed2019-05-10 01:55:29 +0000335 help="The storage backend for storing introspection data."),
Anton Arefiev6dc82792016-08-03 11:50:49 +0300336]