blob: f1f705395f0b6d78a95235dc90c100c6c1e238b6 [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 Drokb809a2b2020-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
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
Mike Tureka7cb4be2016-01-18 19:35:29 +000035baremetal_group = cfg.OptGroup(name='baremetal',
36 title='Baremetal provisioning service options',
37 help='When enabling baremetal tests, Nova '
38 'must be configured to use the Ironic '
39 'driver. The following parameters for the '
40 '[compute] section must be disabled: '
41 'console_output, interface_attach, '
42 'live_migration, pause, rescue, resize, '
43 'shelve, snapshot, and suspend')
44
Anton Arefiev6dc82792016-08-03 11:50:49 +030045baremetal_introspection_group = cfg.OptGroup(
46 name="baremetal_introspection",
47 title="Baremetal introspection service options",
48 help="When enabling baremetal introspection tests,"
49 "Ironic must be configured.")
50
Vasyl Saienkof46b9fa2017-02-23 13:06:56 -050051baremetal_features_group = cfg.OptGroup(
52 name='baremetal_feature_enabled',
53 title="Enabled Baremetal Service Features")
54
Mike Tureka7cb4be2016-01-18 19:35:29 +000055BaremetalGroup = [
Thiago Paivaa7760932016-08-15 15:23:30 -030056 cfg.StrOpt('catalog_type',
57 default='baremetal',
58 help="Catalog type of the baremetal provisioning service"),
59 cfg.StrOpt('driver',
Iury Gregory Melo Ferreira4569ada2020-03-09 16:52:09 +010060 default='fake-hardware',
Dmitry Tantsur893b1a92018-04-26 16:12:45 +020061 help="Driver name to use for API tests"),
Thiago Paivaa7760932016-08-15 15:23:30 -030062 cfg.StrOpt('endpoint_type',
63 default='publicURL',
64 choices=['public', 'admin', 'internal',
65 'publicURL', 'adminURL', 'internalURL'],
66 help="The endpoint type to use for the baremetal provisioning"
67 " service"),
Mike Tureka7cb4be2016-01-18 19:35:29 +000068 cfg.IntOpt('deploywait_timeout',
69 default=15,
70 help="Timeout for Ironic node to reach the "
71 "wait-callback state after powering on."),
Thiago Paivaa7760932016-08-15 15:23:30 -030072 cfg.IntOpt('active_timeout',
73 default=300,
74 help="Timeout for Ironic node to completely provision"),
75 cfg.IntOpt('association_timeout',
76 default=30,
77 help="Timeout for association of Nova instance and Ironic "
78 "node"),
79 cfg.IntOpt('power_timeout',
80 default=60,
81 help="Timeout for Ironic power transitions."),
82 cfg.IntOpt('unprovision_timeout',
83 default=300,
84 help="Timeout for unprovisioning an Ironic node. "
85 "Takes longer since Kilo as Ironic performs an extra "
86 "step in Node cleaning."),
Dao Cong Tien4108a352018-01-26 09:38:46 +070087 cfg.IntOpt('rescue_timeout',
88 default=300,
89 help="Timeout for rescuing an Ironic node."),
90 cfg.IntOpt('unrescue_timeout',
91 default=300,
92 help="Timeout for unrescuing an Ironic node."),
Yuiko Takadaff785002015-12-17 15:56:42 +090093 cfg.StrOpt('min_microversion',
Yuiko Takadaff785002015-12-17 15:56:42 +090094 help="Lower version of the test target microversion range. "
95 "The format is 'X.Y', where 'X' and 'Y' are int values. "
96 "Tempest selects tests based on the range between "
97 "min_microversion and max_microversion. "
98 "If both values are None, Tempest avoids tests which "
99 "require a microversion."),
100 cfg.StrOpt('max_microversion',
101 default='latest',
102 help="Upper version of the test target microversion range. "
103 "The format is 'X.Y', where 'X' and 'Y' are int values. "
104 "Tempest selects tests based on the range between "
105 "min_microversion and max_microversion. "
106 "If both values are None, Tempest avoids tests which "
107 "require a microversion."),
Yuriy Yekovenkoeb612d92016-01-18 17:49:47 +0200108 cfg.BoolOpt('use_provision_network',
109 default=False,
Vasyl Saienko4ddbeec2017-01-20 16:26:04 +0000110 help="Whether the Ironic/Neutron tenant isolation is enabled"),
111 cfg.StrOpt('whole_disk_image_ref',
112 help="UUID of the wholedisk image to use in the tests."),
Vasyl Saienkof46b9fa2017-02-23 13:06:56 -0500113 cfg.StrOpt('whole_disk_image_url',
114 help="An http link to the wholedisk image to use in the "
115 "tests."),
116 cfg.StrOpt('whole_disk_image_checksum',
117 help="An MD5 checksum of the image."),
Vasyl Saienko4ddbeec2017-01-20 16:26:04 +0000118 cfg.StrOpt('partition_image_ref',
119 help="UUID of the partitioned image to use in the tests."),
120 cfg.ListOpt('enabled_drivers',
121 default=['fake', 'pxe_ipmitool', 'agent_ipmitool'],
122 help="List of Ironic enabled drivers."),
123 cfg.ListOpt('enabled_hardware_types',
124 default=['ipmi'],
125 help="List of Ironic enabled hardware types."),
Yolanda Roblaeef49ea2018-05-15 12:54:58 +0200126 cfg.ListOpt('enabled_bios_interfaces',
127 default=['fake'],
128 help="List of Ironic enabled bios interfaces."),
Pavlo Shchelokovskyy12e62752017-12-21 16:11:28 +0000129 cfg.ListOpt('enabled_deploy_interfaces',
130 default=['iscsi', 'direct'],
131 help="List of Ironic enabled deploy interfaces."),
Dao Cong Tien4108a352018-01-26 09:38:46 +0700132 cfg.ListOpt('enabled_rescue_interfaces',
133 default=['no-rescue'],
134 help="List of Ironic enabled rescue interfaces."),
ankitbf770e52018-01-19 07:39:01 +0000135 cfg.ListOpt('enabled_boot_interfaces',
136 default=['fake', 'pxe'],
137 help="List of Ironic enabled boot interfaces."),
Dmitry Tantsur65abaca2019-08-07 11:07:48 +0200138 cfg.ListOpt('enabled_raid_interfaces',
139 default=['no-raid', 'agent'],
140 help="List of Ironic enabled RAID interfaces."),
Vladyslav Drokb809a2b2020-12-14 13:46:59 +0100141 cfg.StrOpt('default_bios_interface',
142 help=_DEFAULT_IFACE_HELP.format('bios')),
143 cfg.StrOpt('default_boot_interface',
144 help=_DEFAULT_IFACE_HELP.format('boot')),
145 cfg.StrOpt('default_console_interface',
146 help=_DEFAULT_IFACE_HELP.format('console')),
147 cfg.StrOpt('default_deploy_interface',
148 help=_DEFAULT_IFACE_HELP.format('deploy')),
149 cfg.StrOpt('default_inspect_interface',
150 help=_DEFAULT_IFACE_HELP.format('inspect')),
151 cfg.StrOpt('default_management_interface',
152 help=_DEFAULT_IFACE_HELP.format('management')),
153 cfg.StrOpt('default_network_interface',
154 help=_DEFAULT_IFACE_HELP.format('network')),
155 cfg.StrOpt('default_power_interface',
156 help=_DEFAULT_IFACE_HELP.format('power')),
157 cfg.StrOpt('default_raid_interface',
158 help=_DEFAULT_IFACE_HELP.format('raid')),
Dao Cong Tiend6ce6672017-12-18 19:04:48 +0700159 cfg.StrOpt('default_rescue_interface',
Vladyslav Drokb809a2b2020-12-14 13:46:59 +0100160 help=_DEFAULT_IFACE_HELP.format('rescue')),
161 cfg.StrOpt('default_storage_interface',
162 help=_DEFAULT_IFACE_HELP.format('storage')),
163 cfg.StrOpt('default_vendor_interface',
164 help=_DEFAULT_IFACE_HELP.format('vendor')),
Vasyl Saienko4ddbeec2017-01-20 16:26:04 +0000165 cfg.IntOpt('adjusted_root_disk_size_gb',
166 min=0,
167 help="Ironic adjusted disk size to use in the standalone tests "
168 "as instance_info/root_gb value."),
Sam Bettsf31abcc2018-02-06 17:34:08 +0000169 cfg.IntOpt('available_nodes', min=0, default=None,
170 help="The number of baremetal hosts available to use for "
Julia Kregercd85f202019-08-26 14:48:17 -0400171 "the tests."),
172 cfg.BoolOpt('partition_netboot',
173 default=True,
174 help="Treat partition images as netbooted as opposed to "
175 "attempting to populate a boot loader. IF cirros is "
176 "being used, this option should be set to True as "
177 "it lacks the needed components to make it locally "
178 "from a partition image."),
Mike Tureka7cb4be2016-01-18 19:35:29 +0000179]
Vasyl Saienkof46b9fa2017-02-23 13:06:56 -0500180
181BaremetalFeaturesGroup = [
182 cfg.BoolOpt('ipxe_enabled',
183 default=True,
184 help="Defines if IPXE is enabled"),
Dmitry Tantsur52ca0092019-07-23 15:09:09 +0200185 cfg.BoolOpt('adoption',
186 # Defaults to False since it's a destructive operation AND it
187 # requires the plugin to be able to read ipmi_password.
188 default=False,
189 help="Defines if adoption is enabled"),
Dmitry Tantsur65abaca2019-08-07 11:07:48 +0200190 cfg.BoolOpt('software_raid',
191 default=False,
192 help="Defines if software RAID is enabled (available "
193 "starting with Train). Requires at least two disks "
194 "on testing nodes."),
Vasyl Saienkof46b9fa2017-02-23 13:06:56 -0500195]
Dmitry Tantsurb609cea2017-12-12 08:06:44 +0100196
Anton Arefiev6dc82792016-08-03 11:50:49 +0300197BaremetalIntrospectionGroup = [
198 cfg.StrOpt('catalog_type',
199 default='baremetal-introspection',
200 help="Catalog type of the baremetal provisioning service"),
201 cfg.StrOpt('endpoint_type',
202 default='publicURL',
203 choices=['public', 'admin', 'internal',
204 'publicURL', 'adminURL', 'internalURL'],
205 help="The endpoint type to use for the baremetal introspection"
206 " service"),
207 cfg.IntOpt('introspection_sleep',
208 default=30,
209 help="Introspection sleep before check status"),
210 cfg.IntOpt('introspection_timeout',
211 default=600,
212 help="Introspection time out"),
Dmitry Tantsurdeab6ec2019-10-18 17:29:52 +0200213 cfg.IntOpt('introspection_start_timeout',
214 default=90,
215 help="Timeout to start introspection"),
Anton Arefiev6dc82792016-08-03 11:50:49 +0300216 cfg.IntOpt('hypervisor_update_sleep',
217 default=60,
218 help="Time to wait until nova becomes aware of "
219 "bare metal instances"),
220 cfg.IntOpt('hypervisor_update_timeout',
221 default=300,
222 help="Time out for wait until nova becomes aware of "
223 "bare metal instances"),
224 # NOTE(aarefiev): status_check_period default is 60s, but checking
225 # node state takes some time(API call), so races appear here,
226 # 80s would be enough to make one more check.
227 cfg.IntOpt('ironic_sync_timeout',
228 default=80,
229 help="Time it might take for Ironic--Inspector "
230 "sync to happen"),
Anton Arefiev6b003562016-09-13 12:17:29 +0300231 cfg.IntOpt('discovery_timeout',
232 default=300,
233 help="Time to wait until new node would enrolled in "
234 "ironic"),
235 cfg.BoolOpt('auto_discovery_feature',
236 default=False,
237 help="Is the auto-discovery feature enabled. Enroll hook "
238 "should be specified in node_not_found_hook - processing "
239 "section of inspector.conf"),
Dmitry Tantsur39579c62018-03-28 12:46:48 +0200240 cfg.StrOpt('auto_discovery_default_driver',
241 # TODO(dtantsur): change to fake-hardware when Queens is no
242 # longer supported.
243 default='fake',
244 help="The driver expected to be set on newly discovered nodes. "
245 "Only has effect with auto_discovery_feature is True."),
Dmitry Tantsur0812cc72019-03-14 10:56:45 +0100246 cfg.StrOpt('auto_discovery_target_driver',
247 help="The driver to set on the newly discovered nodes. "
248 "Only has effect with auto_discovery_feature is True."),
Dongcan Ye2d992ed2019-05-10 01:55:29 +0000249 cfg.StrOpt('data_store',
Dongcan Ye2d992ed2019-05-10 01:55:29 +0000250 help="The storage backend for storing introspection data."),
Anton Arefiev6dc82792016-08-03 11:50:49 +0300251]