Mike Turek | a7cb4be | 2016-01-18 19:35:29 +0000 | [diff] [blame] | 1 | # Copyright 2015 NEC Corporation |
| 2 | # All Rights Reserved. |
| 3 | # |
Ameya Raut | 64ad557 | 2022-01-27 11:26:27 +0000 | [diff] [blame] | 4 | # Copyright (c) 2022 Dell Inc. or its subsidiaries. |
| 5 | # |
Mike Turek | a7cb4be | 2016-01-18 19:35:29 +0000 | [diff] [blame] | 6 | # 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 | |
| 18 | from oslo_config import cfg |
| 19 | |
| 20 | from tempest import config # noqa |
| 21 | |
| 22 | |
Julia Kreger | 3a07c4d | 2021-06-22 10:27:56 -0700 | [diff] [blame] | 23 | # NOTE(TheJulia): The following options are loaded into a tempest |
| 24 | # plugin configuration option via plugin.py. |
Dmitry Tantsur | b609cea | 2017-12-12 08:06:44 +0100 | [diff] [blame] | 25 | ironic_service_option = cfg.BoolOpt('ironic', |
| 26 | default=False, |
| 27 | help='Whether or not ironic is expected ' |
| 28 | 'to be available') |
Jim Rollenhagen | 1c11bdf | 2016-11-29 16:57:30 -0500 | [diff] [blame] | 29 | |
John L. Villalovos | 25be117 | 2017-12-13 16:08:34 -0800 | [diff] [blame] | 30 | inspector_service_option = cfg.BoolOpt("ironic_inspector", |
| 31 | default=False, |
Dmitry Tantsur | b609cea | 2017-12-12 08:06:44 +0100 | [diff] [blame] | 32 | help="Whether or not ironic-inspector " |
| 33 | "is expected to be available") |
Jim Rollenhagen | 1c11bdf | 2016-11-29 16:57:30 -0500 | [diff] [blame] | 34 | |
Julia Kreger | 3a07c4d | 2021-06-22 10:27:56 -0700 | [diff] [blame] | 35 | ironic_scope_enforcement = cfg.BoolOpt('ironic', |
| 36 | default=False, |
| 37 | help='Wheter or not ironic is ' |
| 38 | 'exepcted to enforce auth ' |
| 39 | 'scope.') |
| 40 | |
| 41 | inspector_scope_enforcement = cfg.BoolOpt('ironic_inspector', |
| 42 | default=False, |
| 43 | help='Whether or not ' |
| 44 | 'ironic-inspector is expected ' |
| 45 | 'to enforce auth scope.') |
| 46 | |
Mike Turek | a7cb4be | 2016-01-18 19:35:29 +0000 | [diff] [blame] | 47 | baremetal_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 Kreger | 3a07c4d | 2021-06-22 10:27:56 -0700 | [diff] [blame] | 57 | # The bulk of the embedded configuration is below. |
| 58 | |
Anton Arefiev | 6dc8279 | 2016-08-03 11:50:49 +0300 | [diff] [blame] | 59 | baremetal_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 Saienko | f46b9fa | 2017-02-23 13:06:56 -0500 | [diff] [blame] | 65 | baremetal_features_group = cfg.OptGroup( |
| 66 | name='baremetal_feature_enabled', |
| 67 | title="Enabled Baremetal Service Features") |
| 68 | |
Mike Turek | a7cb4be | 2016-01-18 19:35:29 +0000 | [diff] [blame] | 69 | BaremetalGroup = [ |
Thiago Paiva | a776093 | 2016-08-15 15:23:30 -0300 | [diff] [blame] | 70 | cfg.StrOpt('catalog_type', |
| 71 | default='baremetal', |
| 72 | help="Catalog type of the baremetal provisioning service"), |
| 73 | cfg.StrOpt('driver', |
Iury Gregory Melo Ferreira | 4569ada | 2020-03-09 16:52:09 +0100 | [diff] [blame] | 74 | default='fake-hardware', |
Dmitry Tantsur | 893b1a9 | 2018-04-26 16:12:45 +0200 | [diff] [blame] | 75 | help="Driver name to use for API tests"), |
Thiago Paiva | a776093 | 2016-08-15 15:23:30 -0300 | [diff] [blame] | 76 | 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"), |
Mike Turek | a7cb4be | 2016-01-18 19:35:29 +0000 | [diff] [blame] | 82 | cfg.IntOpt('deploywait_timeout', |
| 83 | default=15, |
| 84 | help="Timeout for Ironic node to reach the " |
| 85 | "wait-callback state after powering on."), |
Thiago Paiva | a776093 | 2016-08-15 15:23:30 -0300 | [diff] [blame] | 86 | cfg.IntOpt('active_timeout', |
| 87 | default=300, |
| 88 | help="Timeout for Ironic node to completely provision"), |
| 89 | cfg.IntOpt('association_timeout', |
| 90 | default=30, |
| 91 | help="Timeout for association of Nova instance and Ironic " |
| 92 | "node"), |
| 93 | cfg.IntOpt('power_timeout', |
| 94 | default=60, |
| 95 | help="Timeout for Ironic power transitions."), |
| 96 | cfg.IntOpt('unprovision_timeout', |
| 97 | default=300, |
| 98 | help="Timeout for unprovisioning an Ironic node. " |
| 99 | "Takes longer since Kilo as Ironic performs an extra " |
| 100 | "step in Node cleaning."), |
Dao Cong Tien | 4108a35 | 2018-01-26 09:38:46 +0700 | [diff] [blame] | 101 | cfg.IntOpt('rescue_timeout', |
| 102 | default=300, |
| 103 | help="Timeout for rescuing an Ironic node."), |
| 104 | cfg.IntOpt('unrescue_timeout', |
| 105 | default=300, |
| 106 | help="Timeout for unrescuing an Ironic node."), |
Yuiko Takada | ff78500 | 2015-12-17 15:56:42 +0900 | [diff] [blame] | 107 | cfg.StrOpt('min_microversion', |
Yuiko Takada | ff78500 | 2015-12-17 15:56:42 +0900 | [diff] [blame] | 108 | help="Lower version of the test target microversion range. " |
| 109 | "The format is 'X.Y', where 'X' and 'Y' are int values. " |
| 110 | "Tempest selects tests based on the range between " |
| 111 | "min_microversion and max_microversion. " |
| 112 | "If both values are None, Tempest avoids tests which " |
| 113 | "require a microversion."), |
| 114 | cfg.StrOpt('max_microversion', |
| 115 | default='latest', |
| 116 | help="Upper version of the test target microversion range. " |
| 117 | "The format is 'X.Y', where 'X' and 'Y' are int values. " |
| 118 | "Tempest selects tests based on the range between " |
| 119 | "min_microversion and max_microversion. " |
| 120 | "If both values are None, Tempest avoids tests which " |
| 121 | "require a microversion."), |
Yuriy Yekovenko | eb612d9 | 2016-01-18 17:49:47 +0200 | [diff] [blame] | 122 | cfg.BoolOpt('use_provision_network', |
| 123 | default=False, |
Vasyl Saienko | 4ddbeec | 2017-01-20 16:26:04 +0000 | [diff] [blame] | 124 | help="Whether the Ironic/Neutron tenant isolation is enabled"), |
| 125 | cfg.StrOpt('whole_disk_image_ref', |
| 126 | help="UUID of the wholedisk image to use in the tests."), |
Vasyl Saienko | f46b9fa | 2017-02-23 13:06:56 -0500 | [diff] [blame] | 127 | cfg.StrOpt('whole_disk_image_url', |
| 128 | help="An http link to the wholedisk image to use in the " |
| 129 | "tests."), |
| 130 | cfg.StrOpt('whole_disk_image_checksum', |
| 131 | help="An MD5 checksum of the image."), |
Vasyl Saienko | 4ddbeec | 2017-01-20 16:26:04 +0000 | [diff] [blame] | 132 | cfg.StrOpt('partition_image_ref', |
| 133 | help="UUID of the partitioned image to use in the tests."), |
Julia Kreger | ff9f874 | 2020-06-17 13:47:34 -0700 | [diff] [blame] | 134 | cfg.StrOpt('ramdisk_iso_image_ref', |
| 135 | help=("UUID (or url) of an ISO image for the ramdisk boot " |
| 136 | "tests.")), |
Vasyl Saienko | 4ddbeec | 2017-01-20 16:26:04 +0000 | [diff] [blame] | 137 | cfg.ListOpt('enabled_drivers', |
| 138 | default=['fake', 'pxe_ipmitool', 'agent_ipmitool'], |
| 139 | help="List of Ironic enabled drivers."), |
| 140 | cfg.ListOpt('enabled_hardware_types', |
| 141 | default=['ipmi'], |
| 142 | help="List of Ironic enabled hardware types."), |
Yolanda Robla | eef49ea | 2018-05-15 12:54:58 +0200 | [diff] [blame] | 143 | cfg.ListOpt('enabled_bios_interfaces', |
| 144 | default=['fake'], |
| 145 | help="List of Ironic enabled bios interfaces."), |
Pavlo Shchelokovskyy | 12e6275 | 2017-12-21 16:11:28 +0000 | [diff] [blame] | 146 | cfg.ListOpt('enabled_deploy_interfaces', |
| 147 | default=['iscsi', 'direct'], |
| 148 | help="List of Ironic enabled deploy interfaces."), |
Dao Cong Tien | 4108a35 | 2018-01-26 09:38:46 +0700 | [diff] [blame] | 149 | cfg.ListOpt('enabled_rescue_interfaces', |
| 150 | default=['no-rescue'], |
| 151 | help="List of Ironic enabled rescue interfaces."), |
ankit | bf770e5 | 2018-01-19 07:39:01 +0000 | [diff] [blame] | 152 | cfg.ListOpt('enabled_boot_interfaces', |
| 153 | default=['fake', 'pxe'], |
| 154 | help="List of Ironic enabled boot interfaces."), |
Dmitry Tantsur | 65abaca | 2019-08-07 11:07:48 +0200 | [diff] [blame] | 155 | cfg.ListOpt('enabled_raid_interfaces', |
| 156 | default=['no-raid', 'agent'], |
| 157 | help="List of Ironic enabled RAID interfaces."), |
Ameya Raut | 64ad557 | 2022-01-27 11:26:27 +0000 | [diff] [blame] | 158 | cfg.ListOpt('enabled_management_interfaces', |
| 159 | default=['fake', 'ipmitool', 'noop'], |
| 160 | help="List of Ironic enabled management interfaces."), |
| 161 | cfg.ListOpt('enabled_power_interfaces', |
| 162 | default=['fake', 'ipmitool'], |
| 163 | help="List of Ironic enabled power interfaces."), |
Dao Cong Tien | d6ce667 | 2017-12-18 19:04:48 +0700 | [diff] [blame] | 164 | cfg.StrOpt('default_rescue_interface', |
| 165 | help="Ironic default rescue interface."), |
Vasyl Saienko | 4ddbeec | 2017-01-20 16:26:04 +0000 | [diff] [blame] | 166 | cfg.IntOpt('adjusted_root_disk_size_gb', |
| 167 | min=0, |
| 168 | help="Ironic adjusted disk size to use in the standalone tests " |
| 169 | "as instance_info/root_gb value."), |
Sam Betts | f31abcc | 2018-02-06 17:34:08 +0000 | [diff] [blame] | 170 | cfg.IntOpt('available_nodes', min=0, default=None, |
| 171 | help="The number of baremetal hosts available to use for " |
Julia Kreger | cd85f20 | 2019-08-26 14:48:17 -0400 | [diff] [blame] | 172 | "the tests."), |
| 173 | cfg.BoolOpt('partition_netboot', |
| 174 | default=True, |
| 175 | help="Treat partition images as netbooted as opposed to " |
| 176 | "attempting to populate a boot loader. IF cirros is " |
| 177 | "being used, this option should be set to True as " |
| 178 | "it lacks the needed components to make it locally " |
| 179 | "from a partition image."), |
Iury Gregory Melo Ferreira | d180a3e | 2020-06-16 18:17:44 +0200 | [diff] [blame] | 180 | cfg.StrOpt('boot_mode', |
| 181 | default='bios', |
| 182 | choices=['bios', 'uefi'], |
| 183 | help="The desired boot_mode to be used on testing nodes."), |
Dmitry Tantsur | fd43dcc | 2022-02-01 20:19:36 +0100 | [diff] [blame] | 184 | cfg.StrOpt('default_boot_option', |
| 185 | # No good default here, we need to actually set it. |
| 186 | help="The default boot option the testing nodes are using."), |
Mike Turek | a7cb4be | 2016-01-18 19:35:29 +0000 | [diff] [blame] | 187 | ] |
Vasyl Saienko | f46b9fa | 2017-02-23 13:06:56 -0500 | [diff] [blame] | 188 | |
| 189 | BaremetalFeaturesGroup = [ |
| 190 | cfg.BoolOpt('ipxe_enabled', |
| 191 | default=True, |
| 192 | help="Defines if IPXE is enabled"), |
Dmitry Tantsur | 52ca009 | 2019-07-23 15:09:09 +0200 | [diff] [blame] | 193 | cfg.BoolOpt('adoption', |
| 194 | # Defaults to False since it's a destructive operation AND it |
| 195 | # requires the plugin to be able to read ipmi_password. |
| 196 | default=False, |
| 197 | help="Defines if adoption is enabled"), |
Dmitry Tantsur | 65abaca | 2019-08-07 11:07:48 +0200 | [diff] [blame] | 198 | cfg.BoolOpt('software_raid', |
| 199 | default=False, |
| 200 | help="Defines if software RAID is enabled (available " |
| 201 | "starting with Train). Requires at least two disks " |
| 202 | "on testing nodes."), |
Dmitry Tantsur | 0cc7aa9 | 2020-05-07 12:01:56 +0200 | [diff] [blame] | 203 | cfg.BoolOpt('deploy_time_raid', |
| 204 | default=False, |
| 205 | help="Defines if in-band RAID can be built in deploy time " |
| 206 | "(possible starting with Victoria)."), |
Vasyl Saienko | f46b9fa | 2017-02-23 13:06:56 -0500 | [diff] [blame] | 207 | ] |
Dmitry Tantsur | b609cea | 2017-12-12 08:06:44 +0100 | [diff] [blame] | 208 | |
Anton Arefiev | 6dc8279 | 2016-08-03 11:50:49 +0300 | [diff] [blame] | 209 | BaremetalIntrospectionGroup = [ |
| 210 | cfg.StrOpt('catalog_type', |
| 211 | default='baremetal-introspection', |
| 212 | help="Catalog type of the baremetal provisioning service"), |
| 213 | cfg.StrOpt('endpoint_type', |
| 214 | default='publicURL', |
| 215 | choices=['public', 'admin', 'internal', |
| 216 | 'publicURL', 'adminURL', 'internalURL'], |
| 217 | help="The endpoint type to use for the baremetal introspection" |
| 218 | " service"), |
| 219 | cfg.IntOpt('introspection_sleep', |
| 220 | default=30, |
| 221 | help="Introspection sleep before check status"), |
| 222 | cfg.IntOpt('introspection_timeout', |
| 223 | default=600, |
| 224 | help="Introspection time out"), |
Dmitry Tantsur | deab6ec | 2019-10-18 17:29:52 +0200 | [diff] [blame] | 225 | cfg.IntOpt('introspection_start_timeout', |
| 226 | default=90, |
| 227 | help="Timeout to start introspection"), |
Anton Arefiev | 6dc8279 | 2016-08-03 11:50:49 +0300 | [diff] [blame] | 228 | cfg.IntOpt('hypervisor_update_sleep', |
| 229 | default=60, |
| 230 | help="Time to wait until nova becomes aware of " |
| 231 | "bare metal instances"), |
| 232 | cfg.IntOpt('hypervisor_update_timeout', |
| 233 | default=300, |
| 234 | help="Time out for wait until nova becomes aware of " |
| 235 | "bare metal instances"), |
| 236 | # NOTE(aarefiev): status_check_period default is 60s, but checking |
| 237 | # node state takes some time(API call), so races appear here, |
| 238 | # 80s would be enough to make one more check. |
| 239 | cfg.IntOpt('ironic_sync_timeout', |
| 240 | default=80, |
| 241 | help="Time it might take for Ironic--Inspector " |
| 242 | "sync to happen"), |
Anton Arefiev | 6b00356 | 2016-09-13 12:17:29 +0300 | [diff] [blame] | 243 | cfg.IntOpt('discovery_timeout', |
| 244 | default=300, |
| 245 | help="Time to wait until new node would enrolled in " |
| 246 | "ironic"), |
| 247 | cfg.BoolOpt('auto_discovery_feature', |
| 248 | default=False, |
| 249 | help="Is the auto-discovery feature enabled. Enroll hook " |
| 250 | "should be specified in node_not_found_hook - processing " |
| 251 | "section of inspector.conf"), |
Dmitry Tantsur | 39579c6 | 2018-03-28 12:46:48 +0200 | [diff] [blame] | 252 | cfg.StrOpt('auto_discovery_default_driver', |
| 253 | # TODO(dtantsur): change to fake-hardware when Queens is no |
| 254 | # longer supported. |
| 255 | default='fake', |
| 256 | help="The driver expected to be set on newly discovered nodes. " |
| 257 | "Only has effect with auto_discovery_feature is True."), |
Dmitry Tantsur | 0812cc7 | 2019-03-14 10:56:45 +0100 | [diff] [blame] | 258 | cfg.StrOpt('auto_discovery_target_driver', |
| 259 | help="The driver to set on the newly discovered nodes. " |
| 260 | "Only has effect with auto_discovery_feature is True."), |
Dongcan Ye | 2d992ed | 2019-05-10 01:55:29 +0000 | [diff] [blame] | 261 | cfg.StrOpt('data_store', |
Dongcan Ye | 2d992ed | 2019-05-10 01:55:29 +0000 | [diff] [blame] | 262 | help="The storage backend for storing introspection data."), |
Anton Arefiev | 6dc8279 | 2016-08-03 11:50:49 +0300 | [diff] [blame] | 263 | ] |