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