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"), |
Dmitry Tantsur | 893b1a9 | 2018-04-26 16:12:45 +0200 | [diff] [blame] | 55 | # TODO(dtantsur): change to fake-hardware when Ocata is no longer supported |
Thiago Paiva | a776093 | 2016-08-15 15:23:30 -0300 | [diff] [blame] | 56 | cfg.StrOpt('driver', |
| 57 | default='fake', |
Dmitry Tantsur | 893b1a9 | 2018-04-26 16:12:45 +0200 | [diff] [blame] | 58 | help="Driver name to use for API tests"), |
Thiago Paiva | a776093 | 2016-08-15 15:23:30 -0300 | [diff] [blame] | 59 | cfg.StrOpt('endpoint_type', |
| 60 | default='publicURL', |
| 61 | choices=['public', 'admin', 'internal', |
| 62 | 'publicURL', 'adminURL', 'internalURL'], |
| 63 | help="The endpoint type to use for the baremetal provisioning" |
| 64 | " service"), |
Mike Turek | a7cb4be | 2016-01-18 19:35:29 +0000 | [diff] [blame] | 65 | cfg.IntOpt('deploywait_timeout', |
| 66 | default=15, |
| 67 | help="Timeout for Ironic node to reach the " |
| 68 | "wait-callback state after powering on."), |
Thiago Paiva | a776093 | 2016-08-15 15:23:30 -0300 | [diff] [blame] | 69 | cfg.IntOpt('active_timeout', |
| 70 | default=300, |
| 71 | help="Timeout for Ironic node to completely provision"), |
| 72 | cfg.IntOpt('association_timeout', |
| 73 | default=30, |
| 74 | help="Timeout for association of Nova instance and Ironic " |
| 75 | "node"), |
| 76 | cfg.IntOpt('power_timeout', |
| 77 | default=60, |
| 78 | help="Timeout for Ironic power transitions."), |
| 79 | cfg.IntOpt('unprovision_timeout', |
| 80 | default=300, |
| 81 | help="Timeout for unprovisioning an Ironic node. " |
| 82 | "Takes longer since Kilo as Ironic performs an extra " |
| 83 | "step in Node cleaning."), |
Dao Cong Tien | 4108a35 | 2018-01-26 09:38:46 +0700 | [diff] [blame] | 84 | cfg.IntOpt('rescue_timeout', |
| 85 | default=300, |
| 86 | help="Timeout for rescuing an Ironic node."), |
| 87 | cfg.IntOpt('unrescue_timeout', |
| 88 | default=300, |
| 89 | help="Timeout for unrescuing an Ironic node."), |
Yuiko Takada | ff78500 | 2015-12-17 15:56:42 +0900 | [diff] [blame] | 90 | cfg.StrOpt('min_microversion', |
Yuiko Takada | ff78500 | 2015-12-17 15:56:42 +0900 | [diff] [blame] | 91 | help="Lower version of the test target microversion range. " |
| 92 | "The format is 'X.Y', where 'X' and 'Y' are int values. " |
| 93 | "Tempest selects tests based on the range between " |
| 94 | "min_microversion and max_microversion. " |
| 95 | "If both values are None, Tempest avoids tests which " |
| 96 | "require a microversion."), |
| 97 | cfg.StrOpt('max_microversion', |
| 98 | default='latest', |
| 99 | help="Upper version of the test target microversion range. " |
| 100 | "The format is 'X.Y', where 'X' and 'Y' are int values. " |
| 101 | "Tempest selects tests based on the range between " |
| 102 | "min_microversion and max_microversion. " |
| 103 | "If both values are None, Tempest avoids tests which " |
| 104 | "require a microversion."), |
Yuriy Yekovenko | eb612d9 | 2016-01-18 17:49:47 +0200 | [diff] [blame] | 105 | cfg.BoolOpt('use_provision_network', |
| 106 | default=False, |
Vasyl Saienko | 4ddbeec | 2017-01-20 16:26:04 +0000 | [diff] [blame] | 107 | help="Whether the Ironic/Neutron tenant isolation is enabled"), |
| 108 | cfg.StrOpt('whole_disk_image_ref', |
| 109 | help="UUID of the wholedisk image to use in the tests."), |
Vasyl Saienko | f46b9fa | 2017-02-23 13:06:56 -0500 | [diff] [blame] | 110 | cfg.StrOpt('whole_disk_image_url', |
| 111 | help="An http link to the wholedisk image to use in the " |
| 112 | "tests."), |
| 113 | cfg.StrOpt('whole_disk_image_checksum', |
| 114 | help="An MD5 checksum of the image."), |
Vasyl Saienko | 4ddbeec | 2017-01-20 16:26:04 +0000 | [diff] [blame] | 115 | cfg.StrOpt('partition_image_ref', |
| 116 | help="UUID of the partitioned image to use in the tests."), |
| 117 | cfg.ListOpt('enabled_drivers', |
| 118 | default=['fake', 'pxe_ipmitool', 'agent_ipmitool'], |
| 119 | help="List of Ironic enabled drivers."), |
| 120 | cfg.ListOpt('enabled_hardware_types', |
| 121 | default=['ipmi'], |
| 122 | help="List of Ironic enabled hardware types."), |
Yolanda Robla | eef49ea | 2018-05-15 12:54:58 +0200 | [diff] [blame] | 123 | cfg.ListOpt('enabled_bios_interfaces', |
| 124 | default=['fake'], |
| 125 | help="List of Ironic enabled bios interfaces."), |
Pavlo Shchelokovskyy | 12e6275 | 2017-12-21 16:11:28 +0000 | [diff] [blame] | 126 | cfg.ListOpt('enabled_deploy_interfaces', |
| 127 | default=['iscsi', 'direct'], |
| 128 | help="List of Ironic enabled deploy interfaces."), |
Dao Cong Tien | 4108a35 | 2018-01-26 09:38:46 +0700 | [diff] [blame] | 129 | cfg.ListOpt('enabled_rescue_interfaces', |
| 130 | default=['no-rescue'], |
| 131 | help="List of Ironic enabled rescue interfaces."), |
Dao Cong Tien | d6ce667 | 2017-12-18 19:04:48 +0700 | [diff] [blame^] | 132 | cfg.StrOpt('default_rescue_interface', |
| 133 | help="Ironic default rescue interface."), |
Vasyl Saienko | 4ddbeec | 2017-01-20 16:26:04 +0000 | [diff] [blame] | 134 | cfg.IntOpt('adjusted_root_disk_size_gb', |
| 135 | min=0, |
| 136 | help="Ironic adjusted disk size to use in the standalone tests " |
| 137 | "as instance_info/root_gb value."), |
Sam Betts | f31abcc | 2018-02-06 17:34:08 +0000 | [diff] [blame] | 138 | cfg.IntOpt('available_nodes', min=0, default=None, |
| 139 | help="The number of baremetal hosts available to use for " |
| 140 | "the tests.") |
Mike Turek | a7cb4be | 2016-01-18 19:35:29 +0000 | [diff] [blame] | 141 | ] |
Vasyl Saienko | f46b9fa | 2017-02-23 13:06:56 -0500 | [diff] [blame] | 142 | |
| 143 | BaremetalFeaturesGroup = [ |
| 144 | cfg.BoolOpt('ipxe_enabled', |
| 145 | default=True, |
| 146 | help="Defines if IPXE is enabled"), |
| 147 | ] |
Dmitry Tantsur | b609cea | 2017-12-12 08:06:44 +0100 | [diff] [blame] | 148 | |
Anton Arefiev | 6dc8279 | 2016-08-03 11:50:49 +0300 | [diff] [blame] | 149 | BaremetalIntrospectionGroup = [ |
| 150 | cfg.StrOpt('catalog_type', |
| 151 | default='baremetal-introspection', |
| 152 | help="Catalog type of the baremetal provisioning service"), |
| 153 | cfg.StrOpt('endpoint_type', |
| 154 | default='publicURL', |
| 155 | choices=['public', 'admin', 'internal', |
| 156 | 'publicURL', 'adminURL', 'internalURL'], |
| 157 | help="The endpoint type to use for the baremetal introspection" |
| 158 | " service"), |
| 159 | cfg.IntOpt('introspection_sleep', |
| 160 | default=30, |
| 161 | help="Introspection sleep before check status"), |
| 162 | cfg.IntOpt('introspection_timeout', |
| 163 | default=600, |
| 164 | help="Introspection time out"), |
| 165 | cfg.IntOpt('hypervisor_update_sleep', |
| 166 | default=60, |
| 167 | help="Time to wait until nova becomes aware of " |
| 168 | "bare metal instances"), |
| 169 | cfg.IntOpt('hypervisor_update_timeout', |
| 170 | default=300, |
| 171 | help="Time out for wait until nova becomes aware of " |
| 172 | "bare metal instances"), |
| 173 | # NOTE(aarefiev): status_check_period default is 60s, but checking |
| 174 | # node state takes some time(API call), so races appear here, |
| 175 | # 80s would be enough to make one more check. |
| 176 | cfg.IntOpt('ironic_sync_timeout', |
| 177 | default=80, |
| 178 | help="Time it might take for Ironic--Inspector " |
| 179 | "sync to happen"), |
Anton Arefiev | 6b00356 | 2016-09-13 12:17:29 +0300 | [diff] [blame] | 180 | cfg.IntOpt('discovery_timeout', |
| 181 | default=300, |
| 182 | help="Time to wait until new node would enrolled in " |
| 183 | "ironic"), |
| 184 | cfg.BoolOpt('auto_discovery_feature', |
| 185 | default=False, |
| 186 | help="Is the auto-discovery feature enabled. Enroll hook " |
| 187 | "should be specified in node_not_found_hook - processing " |
| 188 | "section of inspector.conf"), |
Dmitry Tantsur | 39579c6 | 2018-03-28 12:46:48 +0200 | [diff] [blame] | 189 | cfg.StrOpt('auto_discovery_default_driver', |
| 190 | # TODO(dtantsur): change to fake-hardware when Queens is no |
| 191 | # longer supported. |
| 192 | default='fake', |
| 193 | help="The driver expected to be set on newly discovered nodes. " |
| 194 | "Only has effect with auto_discovery_feature is True."), |
Anton Arefiev | 6dc8279 | 2016-08-03 11:50:49 +0300 | [diff] [blame] | 195 | ] |