Mike Turek | a7cb4be | 2016-01-18 19:35:29 +0000 | [diff] [blame] | 1 | # 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 | |
| 16 | from oslo_config import cfg |
| 17 | |
| 18 | from tempest import config # noqa |
| 19 | |
| 20 | |
Vladyslav Drok | b809a2b | 2020-12-14 13:46:59 +0100 | [diff] [blame^] | 21 | _DEFAULT_IFACE_HELP = ('Default {0} interface to be used for nodes that ' |
| 22 | 'do not have {0}_interface field set.') |
| 23 | |
| 24 | |
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 | |
Mike Turek | a7cb4be | 2016-01-18 19:35:29 +0000 | [diff] [blame] | 35 | baremetal_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 Arefiev | 6dc8279 | 2016-08-03 11:50:49 +0300 | [diff] [blame] | 45 | baremetal_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 Saienko | f46b9fa | 2017-02-23 13:06:56 -0500 | [diff] [blame] | 51 | baremetal_features_group = cfg.OptGroup( |
| 52 | name='baremetal_feature_enabled', |
| 53 | title="Enabled Baremetal Service Features") |
| 54 | |
Mike Turek | a7cb4be | 2016-01-18 19:35:29 +0000 | [diff] [blame] | 55 | BaremetalGroup = [ |
Thiago Paiva | a776093 | 2016-08-15 15:23:30 -0300 | [diff] [blame] | 56 | cfg.StrOpt('catalog_type', |
| 57 | default='baremetal', |
| 58 | help="Catalog type of the baremetal provisioning service"), |
| 59 | cfg.StrOpt('driver', |
Iury Gregory Melo Ferreira | 4569ada | 2020-03-09 16:52:09 +0100 | [diff] [blame] | 60 | default='fake-hardware', |
Dmitry Tantsur | 893b1a9 | 2018-04-26 16:12:45 +0200 | [diff] [blame] | 61 | help="Driver name to use for API tests"), |
Thiago Paiva | a776093 | 2016-08-15 15:23:30 -0300 | [diff] [blame] | 62 | 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 Turek | a7cb4be | 2016-01-18 19:35:29 +0000 | [diff] [blame] | 68 | cfg.IntOpt('deploywait_timeout', |
| 69 | default=15, |
| 70 | help="Timeout for Ironic node to reach the " |
| 71 | "wait-callback state after powering on."), |
Thiago Paiva | a776093 | 2016-08-15 15:23:30 -0300 | [diff] [blame] | 72 | 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 Tien | 4108a35 | 2018-01-26 09:38:46 +0700 | [diff] [blame] | 87 | 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 Takada | ff78500 | 2015-12-17 15:56:42 +0900 | [diff] [blame] | 93 | cfg.StrOpt('min_microversion', |
Yuiko Takada | ff78500 | 2015-12-17 15:56:42 +0900 | [diff] [blame] | 94 | 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 Yekovenko | eb612d9 | 2016-01-18 17:49:47 +0200 | [diff] [blame] | 108 | cfg.BoolOpt('use_provision_network', |
| 109 | default=False, |
Vasyl Saienko | 4ddbeec | 2017-01-20 16:26:04 +0000 | [diff] [blame] | 110 | 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 Saienko | f46b9fa | 2017-02-23 13:06:56 -0500 | [diff] [blame] | 113 | 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 Saienko | 4ddbeec | 2017-01-20 16:26:04 +0000 | [diff] [blame] | 118 | 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 Robla | eef49ea | 2018-05-15 12:54:58 +0200 | [diff] [blame] | 126 | cfg.ListOpt('enabled_bios_interfaces', |
| 127 | default=['fake'], |
| 128 | help="List of Ironic enabled bios interfaces."), |
Pavlo Shchelokovskyy | 12e6275 | 2017-12-21 16:11:28 +0000 | [diff] [blame] | 129 | cfg.ListOpt('enabled_deploy_interfaces', |
| 130 | default=['iscsi', 'direct'], |
| 131 | help="List of Ironic enabled deploy interfaces."), |
Dao Cong Tien | 4108a35 | 2018-01-26 09:38:46 +0700 | [diff] [blame] | 132 | cfg.ListOpt('enabled_rescue_interfaces', |
| 133 | default=['no-rescue'], |
| 134 | help="List of Ironic enabled rescue interfaces."), |
ankit | bf770e5 | 2018-01-19 07:39:01 +0000 | [diff] [blame] | 135 | cfg.ListOpt('enabled_boot_interfaces', |
| 136 | default=['fake', 'pxe'], |
| 137 | help="List of Ironic enabled boot interfaces."), |
Dmitry Tantsur | 65abaca | 2019-08-07 11:07:48 +0200 | [diff] [blame] | 138 | cfg.ListOpt('enabled_raid_interfaces', |
| 139 | default=['no-raid', 'agent'], |
| 140 | help="List of Ironic enabled RAID interfaces."), |
Vladyslav Drok | b809a2b | 2020-12-14 13:46:59 +0100 | [diff] [blame^] | 141 | 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 Tien | d6ce667 | 2017-12-18 19:04:48 +0700 | [diff] [blame] | 159 | cfg.StrOpt('default_rescue_interface', |
Vladyslav Drok | b809a2b | 2020-12-14 13:46:59 +0100 | [diff] [blame^] | 160 | 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 Saienko | 4ddbeec | 2017-01-20 16:26:04 +0000 | [diff] [blame] | 165 | 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 Betts | f31abcc | 2018-02-06 17:34:08 +0000 | [diff] [blame] | 169 | cfg.IntOpt('available_nodes', min=0, default=None, |
| 170 | help="The number of baremetal hosts available to use for " |
Julia Kreger | cd85f20 | 2019-08-26 14:48:17 -0400 | [diff] [blame] | 171 | "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 Turek | a7cb4be | 2016-01-18 19:35:29 +0000 | [diff] [blame] | 179 | ] |
Vasyl Saienko | f46b9fa | 2017-02-23 13:06:56 -0500 | [diff] [blame] | 180 | |
| 181 | BaremetalFeaturesGroup = [ |
| 182 | cfg.BoolOpt('ipxe_enabled', |
| 183 | default=True, |
| 184 | help="Defines if IPXE is enabled"), |
Dmitry Tantsur | 52ca009 | 2019-07-23 15:09:09 +0200 | [diff] [blame] | 185 | 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 Tantsur | 65abaca | 2019-08-07 11:07:48 +0200 | [diff] [blame] | 190 | 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 Saienko | f46b9fa | 2017-02-23 13:06:56 -0500 | [diff] [blame] | 195 | ] |
Dmitry Tantsur | b609cea | 2017-12-12 08:06:44 +0100 | [diff] [blame] | 196 | |
Anton Arefiev | 6dc8279 | 2016-08-03 11:50:49 +0300 | [diff] [blame] | 197 | BaremetalIntrospectionGroup = [ |
| 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 Tantsur | deab6ec | 2019-10-18 17:29:52 +0200 | [diff] [blame] | 213 | cfg.IntOpt('introspection_start_timeout', |
| 214 | default=90, |
| 215 | help="Timeout to start introspection"), |
Anton Arefiev | 6dc8279 | 2016-08-03 11:50:49 +0300 | [diff] [blame] | 216 | 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 Arefiev | 6b00356 | 2016-09-13 12:17:29 +0300 | [diff] [blame] | 231 | 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 Tantsur | 39579c6 | 2018-03-28 12:46:48 +0200 | [diff] [blame] | 240 | 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 Tantsur | 0812cc7 | 2019-03-14 10:56:45 +0100 | [diff] [blame] | 246 | 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 Ye | 2d992ed | 2019-05-10 01:55:29 +0000 | [diff] [blame] | 249 | cfg.StrOpt('data_store', |
Dongcan Ye | 2d992ed | 2019-05-10 01:55:29 +0000 | [diff] [blame] | 250 | help="The storage backend for storing introspection data."), |
Anton Arefiev | 6dc8279 | 2016-08-03 11:50:49 +0300 | [diff] [blame] | 251 | ] |