blob: de517dc354d7db7159264dee437199fb876c731b [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
Julia Kreger3a07c4d2021-06-22 10:27:56 -070021# NOTE(TheJulia): The following options are loaded into a tempest
22# plugin configuration option via plugin.py.
Dmitry Tantsurb609cea2017-12-12 08:06:44 +010023ironic_service_option = cfg.BoolOpt('ironic',
24 default=False,
25 help='Whether or not ironic is expected '
26 'to be available')
Jim Rollenhagen1c11bdf2016-11-29 16:57:30 -050027
John L. Villalovos25be1172017-12-13 16:08:34 -080028inspector_service_option = cfg.BoolOpt("ironic_inspector",
29 default=False,
Dmitry Tantsurb609cea2017-12-12 08:06:44 +010030 help="Whether or not ironic-inspector "
31 "is expected to be available")
Jim Rollenhagen1c11bdf2016-11-29 16:57:30 -050032
Julia Kreger3a07c4d2021-06-22 10:27:56 -070033ironic_scope_enforcement = cfg.BoolOpt('ironic',
34 default=False,
35 help='Wheter or not ironic is '
36 'exepcted to enforce auth '
37 'scope.')
38
39inspector_scope_enforcement = cfg.BoolOpt('ironic_inspector',
40 default=False,
41 help='Whether or not '
42 'ironic-inspector is expected '
43 'to enforce auth scope.')
44
Mike Tureka7cb4be2016-01-18 19:35:29 +000045baremetal_group = cfg.OptGroup(name='baremetal',
46 title='Baremetal provisioning service options',
47 help='When enabling baremetal tests, Nova '
48 'must be configured to use the Ironic '
49 'driver. The following parameters for the '
50 '[compute] section must be disabled: '
51 'console_output, interface_attach, '
52 'live_migration, pause, rescue, resize, '
53 'shelve, snapshot, and suspend')
54
Julia Kreger3a07c4d2021-06-22 10:27:56 -070055# The bulk of the embedded configuration is below.
56
Anton Arefiev6dc82792016-08-03 11:50:49 +030057baremetal_introspection_group = cfg.OptGroup(
58 name="baremetal_introspection",
59 title="Baremetal introspection service options",
60 help="When enabling baremetal introspection tests,"
61 "Ironic must be configured.")
62
Vasyl Saienkof46b9fa2017-02-23 13:06:56 -050063baremetal_features_group = cfg.OptGroup(
64 name='baremetal_feature_enabled',
65 title="Enabled Baremetal Service Features")
66
Mike Tureka7cb4be2016-01-18 19:35:29 +000067BaremetalGroup = [
Thiago Paivaa7760932016-08-15 15:23:30 -030068 cfg.StrOpt('catalog_type',
69 default='baremetal',
70 help="Catalog type of the baremetal provisioning service"),
71 cfg.StrOpt('driver',
Iury Gregory Melo Ferreira4569ada2020-03-09 16:52:09 +010072 default='fake-hardware',
Dmitry Tantsur893b1a92018-04-26 16:12:45 +020073 help="Driver name to use for API tests"),
Thiago Paivaa7760932016-08-15 15:23:30 -030074 cfg.StrOpt('endpoint_type',
75 default='publicURL',
76 choices=['public', 'admin', 'internal',
77 'publicURL', 'adminURL', 'internalURL'],
78 help="The endpoint type to use for the baremetal provisioning"
79 " service"),
Mike Tureka7cb4be2016-01-18 19:35:29 +000080 cfg.IntOpt('deploywait_timeout',
81 default=15,
82 help="Timeout for Ironic node to reach the "
83 "wait-callback state after powering on."),
Thiago Paivaa7760932016-08-15 15:23:30 -030084 cfg.IntOpt('active_timeout',
85 default=300,
86 help="Timeout for Ironic node to completely provision"),
87 cfg.IntOpt('association_timeout',
88 default=30,
89 help="Timeout for association of Nova instance and Ironic "
90 "node"),
91 cfg.IntOpt('power_timeout',
92 default=60,
93 help="Timeout for Ironic power transitions."),
94 cfg.IntOpt('unprovision_timeout',
95 default=300,
96 help="Timeout for unprovisioning an Ironic node. "
97 "Takes longer since Kilo as Ironic performs an extra "
98 "step in Node cleaning."),
Dao Cong Tien4108a352018-01-26 09:38:46 +070099 cfg.IntOpt('rescue_timeout',
100 default=300,
101 help="Timeout for rescuing an Ironic node."),
102 cfg.IntOpt('unrescue_timeout',
103 default=300,
104 help="Timeout for unrescuing an Ironic node."),
Yuiko Takadaff785002015-12-17 15:56:42 +0900105 cfg.StrOpt('min_microversion',
Yuiko Takadaff785002015-12-17 15:56:42 +0900106 help="Lower version of the test target microversion range. "
107 "The format is 'X.Y', where 'X' and 'Y' are int values. "
108 "Tempest selects tests based on the range between "
109 "min_microversion and max_microversion. "
110 "If both values are None, Tempest avoids tests which "
111 "require a microversion."),
112 cfg.StrOpt('max_microversion',
113 default='latest',
114 help="Upper version of the test target microversion range. "
115 "The format is 'X.Y', where 'X' and 'Y' are int values. "
116 "Tempest selects tests based on the range between "
117 "min_microversion and max_microversion. "
118 "If both values are None, Tempest avoids tests which "
119 "require a microversion."),
Yuriy Yekovenkoeb612d92016-01-18 17:49:47 +0200120 cfg.BoolOpt('use_provision_network',
121 default=False,
Vasyl Saienko4ddbeec2017-01-20 16:26:04 +0000122 help="Whether the Ironic/Neutron tenant isolation is enabled"),
123 cfg.StrOpt('whole_disk_image_ref',
124 help="UUID of the wholedisk image to use in the tests."),
Vasyl Saienkof46b9fa2017-02-23 13:06:56 -0500125 cfg.StrOpt('whole_disk_image_url',
126 help="An http link to the wholedisk image to use in the "
127 "tests."),
128 cfg.StrOpt('whole_disk_image_checksum',
129 help="An MD5 checksum of the image."),
Vasyl Saienko4ddbeec2017-01-20 16:26:04 +0000130 cfg.StrOpt('partition_image_ref',
131 help="UUID of the partitioned image to use in the tests."),
Julia Kregerff9f8742020-06-17 13:47:34 -0700132 cfg.StrOpt('ramdisk_iso_image_ref',
133 help=("UUID (or url) of an ISO image for the ramdisk boot "
134 "tests.")),
Vasyl Saienko4ddbeec2017-01-20 16:26:04 +0000135 cfg.ListOpt('enabled_drivers',
136 default=['fake', 'pxe_ipmitool', 'agent_ipmitool'],
137 help="List of Ironic enabled drivers."),
138 cfg.ListOpt('enabled_hardware_types',
139 default=['ipmi'],
140 help="List of Ironic enabled hardware types."),
Yolanda Roblaeef49ea2018-05-15 12:54:58 +0200141 cfg.ListOpt('enabled_bios_interfaces',
142 default=['fake'],
143 help="List of Ironic enabled bios interfaces."),
Pavlo Shchelokovskyy12e62752017-12-21 16:11:28 +0000144 cfg.ListOpt('enabled_deploy_interfaces',
145 default=['iscsi', 'direct'],
146 help="List of Ironic enabled deploy interfaces."),
Dao Cong Tien4108a352018-01-26 09:38:46 +0700147 cfg.ListOpt('enabled_rescue_interfaces',
148 default=['no-rescue'],
149 help="List of Ironic enabled rescue interfaces."),
ankitbf770e52018-01-19 07:39:01 +0000150 cfg.ListOpt('enabled_boot_interfaces',
151 default=['fake', 'pxe'],
152 help="List of Ironic enabled boot interfaces."),
Dmitry Tantsur65abaca2019-08-07 11:07:48 +0200153 cfg.ListOpt('enabled_raid_interfaces',
154 default=['no-raid', 'agent'],
155 help="List of Ironic enabled RAID interfaces."),
Dao Cong Tiend6ce6672017-12-18 19:04:48 +0700156 cfg.StrOpt('default_rescue_interface',
157 help="Ironic default rescue interface."),
Vasyl Saienko4ddbeec2017-01-20 16:26:04 +0000158 cfg.IntOpt('adjusted_root_disk_size_gb',
159 min=0,
160 help="Ironic adjusted disk size to use in the standalone tests "
161 "as instance_info/root_gb value."),
Sam Bettsf31abcc2018-02-06 17:34:08 +0000162 cfg.IntOpt('available_nodes', min=0, default=None,
163 help="The number of baremetal hosts available to use for "
Julia Kregercd85f202019-08-26 14:48:17 -0400164 "the tests."),
165 cfg.BoolOpt('partition_netboot',
166 default=True,
167 help="Treat partition images as netbooted as opposed to "
168 "attempting to populate a boot loader. IF cirros is "
169 "being used, this option should be set to True as "
170 "it lacks the needed components to make it locally "
171 "from a partition image."),
Iury Gregory Melo Ferreirad180a3e2020-06-16 18:17:44 +0200172 cfg.StrOpt('boot_mode',
173 default='bios',
174 choices=['bios', 'uefi'],
175 help="The desired boot_mode to be used on testing nodes."),
Mike Tureka7cb4be2016-01-18 19:35:29 +0000176]
Vasyl Saienkof46b9fa2017-02-23 13:06:56 -0500177
178BaremetalFeaturesGroup = [
179 cfg.BoolOpt('ipxe_enabled',
180 default=True,
181 help="Defines if IPXE is enabled"),
Dmitry Tantsur52ca0092019-07-23 15:09:09 +0200182 cfg.BoolOpt('adoption',
183 # Defaults to False since it's a destructive operation AND it
184 # requires the plugin to be able to read ipmi_password.
185 default=False,
186 help="Defines if adoption is enabled"),
Dmitry Tantsur65abaca2019-08-07 11:07:48 +0200187 cfg.BoolOpt('software_raid',
188 default=False,
189 help="Defines if software RAID is enabled (available "
190 "starting with Train). Requires at least two disks "
191 "on testing nodes."),
Dmitry Tantsur0cc7aa92020-05-07 12:01:56 +0200192 cfg.BoolOpt('deploy_time_raid',
193 default=False,
194 help="Defines if in-band RAID can be built in deploy time "
195 "(possible starting with Victoria)."),
Vasyl Saienkof46b9fa2017-02-23 13:06:56 -0500196]
Dmitry Tantsurb609cea2017-12-12 08:06:44 +0100197
Anton Arefiev6dc82792016-08-03 11:50:49 +0300198BaremetalIntrospectionGroup = [
199 cfg.StrOpt('catalog_type',
200 default='baremetal-introspection',
201 help="Catalog type of the baremetal provisioning service"),
202 cfg.StrOpt('endpoint_type',
203 default='publicURL',
204 choices=['public', 'admin', 'internal',
205 'publicURL', 'adminURL', 'internalURL'],
206 help="The endpoint type to use for the baremetal introspection"
207 " service"),
208 cfg.IntOpt('introspection_sleep',
209 default=30,
210 help="Introspection sleep before check status"),
211 cfg.IntOpt('introspection_timeout',
212 default=600,
213 help="Introspection time out"),
Dmitry Tantsurdeab6ec2019-10-18 17:29:52 +0200214 cfg.IntOpt('introspection_start_timeout',
215 default=90,
216 help="Timeout to start introspection"),
Anton Arefiev6dc82792016-08-03 11:50:49 +0300217 cfg.IntOpt('hypervisor_update_sleep',
218 default=60,
219 help="Time to wait until nova becomes aware of "
220 "bare metal instances"),
221 cfg.IntOpt('hypervisor_update_timeout',
222 default=300,
223 help="Time out for wait until nova becomes aware of "
224 "bare metal instances"),
225 # NOTE(aarefiev): status_check_period default is 60s, but checking
226 # node state takes some time(API call), so races appear here,
227 # 80s would be enough to make one more check.
228 cfg.IntOpt('ironic_sync_timeout',
229 default=80,
230 help="Time it might take for Ironic--Inspector "
231 "sync to happen"),
Anton Arefiev6b003562016-09-13 12:17:29 +0300232 cfg.IntOpt('discovery_timeout',
233 default=300,
234 help="Time to wait until new node would enrolled in "
235 "ironic"),
236 cfg.BoolOpt('auto_discovery_feature',
237 default=False,
238 help="Is the auto-discovery feature enabled. Enroll hook "
239 "should be specified in node_not_found_hook - processing "
240 "section of inspector.conf"),
Dmitry Tantsur39579c62018-03-28 12:46:48 +0200241 cfg.StrOpt('auto_discovery_default_driver',
242 # TODO(dtantsur): change to fake-hardware when Queens is no
243 # longer supported.
244 default='fake',
245 help="The driver expected to be set on newly discovered nodes. "
246 "Only has effect with auto_discovery_feature is True."),
Dmitry Tantsur0812cc72019-03-14 10:56:45 +0100247 cfg.StrOpt('auto_discovery_target_driver',
248 help="The driver to set on the newly discovered nodes. "
249 "Only has effect with auto_discovery_feature is True."),
Dongcan Ye2d992ed2019-05-10 01:55:29 +0000250 cfg.StrOpt('data_store',
Dongcan Ye2d992ed2019-05-10 01:55:29 +0000251 help="The storage backend for storing introspection data."),
Anton Arefiev6dc82792016-08-03 11:50:49 +0300252]