Marc Koderer | 0abc93b | 2015-07-15 09:18:35 +0200 | [diff] [blame] | 1 | # Copyright 2014 Mirantis Inc. |
| 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 | |
Marc Koderer | 0abc93b | 2015-07-15 09:18:35 +0200 | [diff] [blame] | 16 | from oslo_config import cfg |
debeltrami | 1753a59 | 2020-05-11 18:27:30 +0000 | [diff] [blame] | 17 | from oslo_config import types |
Marc Koderer | 0abc93b | 2015-07-15 09:18:35 +0200 | [diff] [blame] | 18 | |
Nishant Kumar | 0227830 | 2016-10-01 12:50:39 +0530 | [diff] [blame] | 19 | service_option = cfg.BoolOpt("manila", |
| 20 | default=True, |
| 21 | help="Whether or not manila is expected to be " |
| 22 | "available") |
Marc Koderer | 0abc93b | 2015-07-15 09:18:35 +0200 | [diff] [blame] | 23 | |
| 24 | share_group = cfg.OptGroup(name="share", title="Share Service Options") |
| 25 | |
| 26 | ShareGroup = [ |
| 27 | cfg.StrOpt("min_api_microversion", |
Clinton Knight | e5c8f09 | 2015-08-27 15:00:23 -0400 | [diff] [blame] | 28 | default="2.0", |
Marc Koderer | 0abc93b | 2015-07-15 09:18:35 +0200 | [diff] [blame] | 29 | help="The minimum api microversion is configured to be the " |
| 30 | "value of the minimum microversion supported by Manila."), |
| 31 | cfg.StrOpt("max_api_microversion", |
silvacarloss | d354d67 | 2020-08-23 18:49:52 +0000 | [diff] [blame] | 32 | default="2.56", |
Marc Koderer | 0abc93b | 2015-07-15 09:18:35 +0200 | [diff] [blame] | 33 | help="The maximum api microversion is configured to be the " |
| 34 | "value of the latest microversion supported by Manila."), |
| 35 | cfg.StrOpt("region", |
| 36 | default="", |
| 37 | help="The share region name to use. If empty, the value " |
| 38 | "of identity.region is used instead. If no such region " |
| 39 | "is found in the service catalog, the first found one is " |
| 40 | "used."), |
| 41 | cfg.StrOpt("catalog_type", |
| 42 | default="share", |
| 43 | help="Catalog type of the Share service."), |
| 44 | cfg.StrOpt('endpoint_type', |
| 45 | default='publicURL', |
| 46 | choices=['public', 'admin', 'internal', |
| 47 | 'publicURL', 'adminURL', 'internalURL'], |
| 48 | help="The endpoint type to use for the share service."), |
| 49 | cfg.BoolOpt("multitenancy_enabled", |
| 50 | default=True, |
| 51 | help="This option used to determine backend driver type, " |
| 52 | "multitenant driver uses share-networks, but " |
| 53 | "single-tenant doesn't."), |
Valeriy Ponomaryov | c5dae27 | 2016-06-10 18:29:24 +0300 | [diff] [blame] | 54 | cfg.BoolOpt("create_networks_when_multitenancy_enabled", |
| 55 | default=True, |
| 56 | help="This option is used only when other " |
| 57 | "'multitenancy_enabled' option is set to 'True'. " |
| 58 | "If this one is set to True, then tempest will create " |
| 59 | "neutron networks for each new manila share-network " |
| 60 | "it creates. Else it will use manila share-networks with " |
| 61 | "empty values (case of StandAloneNetworkPlugin and " |
| 62 | "NeutronSingleNetworkPlugin)."), |
Marc Koderer | 0abc93b | 2015-07-15 09:18:35 +0200 | [diff] [blame] | 63 | cfg.ListOpt("enable_protocols", |
| 64 | default=["nfs", "cifs"], |
| 65 | help="First value of list is protocol by default, " |
| 66 | "items of list show enabled protocols at all."), |
| 67 | cfg.ListOpt("enable_ip_rules_for_protocols", |
| 68 | default=["nfs", "cifs", ], |
| 69 | help="Selection of protocols, that should " |
| 70 | "be covered with ip rule tests"), |
| 71 | cfg.ListOpt("enable_user_rules_for_protocols", |
| 72 | default=[], |
| 73 | help="Selection of protocols, that should " |
| 74 | "be covered with user rule tests"), |
| 75 | cfg.ListOpt("enable_cert_rules_for_protocols", |
| 76 | default=["glusterfs", ], |
| 77 | help="Protocols that should be covered with cert rule tests."), |
John Spray | 061b145 | 2015-11-18 13:15:32 +0000 | [diff] [blame] | 78 | cfg.ListOpt("enable_cephx_rules_for_protocols", |
| 79 | default=["cephfs", ], |
| 80 | help="Protocols to be covered with cephx rule tests."), |
Marc Koderer | 0abc93b | 2015-07-15 09:18:35 +0200 | [diff] [blame] | 81 | cfg.StrOpt("username_for_user_rules", |
| 82 | default="Administrator", |
| 83 | help="Username, that will be used in user tests."), |
Rodrigo Barbieri | 797257e | 2017-11-21 11:00:45 -0200 | [diff] [blame] | 84 | cfg.StrOpt("override_ip_for_nfs_access", |
| 85 | help="Forces access rules to be as specified on NFS scenario" |
| 86 | " tests. This can used for working around multiple " |
| 87 | "NATs between the VMs and the storage controller."), |
Goutham Pacha Ravi | 37ee677 | 2019-10-18 12:53:22 -0700 | [diff] [blame] | 88 | cfg.StrOpt("storage_network", |
| 89 | help="Name or UUID of a neutron network that is used to access " |
| 90 | "shared file systems over. If specified, test virtual " |
| 91 | "machines are created with two NICs, the primary NIC is " |
| 92 | "attached to the private project network and the " |
| 93 | "secondary NIC is attached to the specified storage " |
| 94 | "network. If using NFS, access control is done with the " |
| 95 | "help of the IP address assigned to the virtual machine's " |
| 96 | "storage network NIC."), |
Marc Koderer | 0abc93b | 2015-07-15 09:18:35 +0200 | [diff] [blame] | 97 | cfg.ListOpt("enable_ro_access_level_for_protocols", |
| 98 | default=["nfs", ], |
| 99 | help="List of protocols to run tests with ro access level."), |
Valeriy Ponomaryov | ad55dc5 | 2015-09-23 13:54:00 +0300 | [diff] [blame] | 100 | |
| 101 | # Capabilities |
| 102 | cfg.StrOpt("capability_storage_protocol", |
| 103 | deprecated_name="storage_protocol", |
Marc Koderer | 0abc93b | 2015-07-15 09:18:35 +0200 | [diff] [blame] | 104 | default="NFS_CIFS", |
| 105 | help="Backend protocol to target when creating volume types."), |
Valeriy Ponomaryov | ad55dc5 | 2015-09-23 13:54:00 +0300 | [diff] [blame] | 106 | cfg.BoolOpt("capability_snapshot_support", |
| 107 | help="Defines extra spec that satisfies specific back end " |
| 108 | "capability called 'snapshot_support' and will be used " |
| 109 | "for setting up custom share type. Defaults to value of " |
| 110 | "other config option 'run_snapshot_tests'."), |
Clinton Knight | 4699a8c | 2016-08-16 22:36:13 -0400 | [diff] [blame] | 111 | cfg.BoolOpt("capability_create_share_from_snapshot_support", |
| 112 | help="Defines extra spec that satisfies specific back end " |
| 113 | "capability called 'create_share_from_snapshot_support' " |
| 114 | "and will be used for setting up a custom share type. " |
| 115 | "Defaults to the value of run_snapshot_tests. Set it to " |
| 116 | "False if the driver being tested does not support " |
| 117 | "creating shares from snapshots."), |
Clinton Knight | 7f16b8c | 2016-06-08 13:46:51 -0700 | [diff] [blame] | 118 | cfg.BoolOpt("capability_revert_to_snapshot_support", |
Rodrigo Barbieri | 1a1b91a | 2017-02-01 10:15:41 -0200 | [diff] [blame] | 119 | deprecated_for_removal=True, |
| 120 | deprecated_reason="Redundant configuration option. Please use " |
| 121 | "'run_revert_to_snapshot_tests' config " |
| 122 | "option instead.", |
Clinton Knight | 7f16b8c | 2016-06-08 13:46:51 -0700 | [diff] [blame] | 123 | help="Defines extra spec that satisfies specific back end " |
| 124 | "capability called 'revert_to_snapshot_support' " |
| 125 | "and will be used for setting up custom share type. " |
| 126 | "Defaults to the value of run_revert_to_snapshot_tests."), |
Valeriy Ponomaryov | 3c18893 | 2017-03-15 19:06:23 +0300 | [diff] [blame] | 127 | cfg.StrOpt("capability_sg_consistent_snapshot_support", |
| 128 | choices=["host", "pool", None], |
| 129 | help="Backend capability to create consistent snapshots of " |
| 130 | "share group members. Will be used with creation " |
| 131 | "of new share group types as group spec."), |
Marc Koderer | 0abc93b | 2015-07-15 09:18:35 +0200 | [diff] [blame] | 132 | cfg.StrOpt("share_network_id", |
| 133 | default="", |
| 134 | help="Some backend drivers requires share network " |
| 135 | "for share creation. Share network id, that will be " |
Goutham Pacha Ravi | 90c354b | 2019-06-12 13:18:51 -0700 | [diff] [blame] | 136 | "used for shares. If not set, it won't be used. Setting " |
| 137 | "this option to a valid share network ID will mean that " |
| 138 | "the value of create_networks_when_multitenancy_enabled " |
| 139 | "should be False."), |
Marc Koderer | 0abc93b | 2015-07-15 09:18:35 +0200 | [diff] [blame] | 140 | cfg.StrOpt("alt_share_network_id", |
| 141 | default="", |
| 142 | help="Share network id, that will be used for shares" |
Goutham Pacha Ravi | 90c354b | 2019-06-12 13:18:51 -0700 | [diff] [blame] | 143 | " in alt tenant. If not set, it won't be used. Setting " |
| 144 | "this option to a valid share network ID will mean that " |
| 145 | "the value of create_networks_when_multitenancy_enabled " |
| 146 | "should be False."), |
Marc Koderer | 0abc93b | 2015-07-15 09:18:35 +0200 | [diff] [blame] | 147 | cfg.StrOpt("admin_share_network_id", |
| 148 | default="", |
| 149 | help="Share network id, that will be used for shares" |
Goutham Pacha Ravi | 90c354b | 2019-06-12 13:18:51 -0700 | [diff] [blame] | 150 | " in admin tenant. If not set, it won't be used. Setting " |
| 151 | "this option to a valid share network ID will mean that " |
| 152 | "the value of create_networks_when_multitenancy_enabled " |
| 153 | "should be False."), |
Marc Koderer | 0abc93b | 2015-07-15 09:18:35 +0200 | [diff] [blame] | 154 | cfg.BoolOpt("multi_backend", |
| 155 | default=False, |
| 156 | help="Runs Manila multi-backend tests."), |
| 157 | cfg.ListOpt("backend_names", |
| 158 | default=[], |
| 159 | help="Names of share backends, that will be used with " |
| 160 | "multibackend tests. Tempest will use first two values."), |
| 161 | cfg.IntOpt("share_creation_retry_number", |
| 162 | default=0, |
| 163 | help="Defines number of retries for share creation. " |
| 164 | "It is useful to avoid failures caused by unstable " |
| 165 | "environment."), |
| 166 | cfg.IntOpt("build_interval", |
| 167 | default=3, |
| 168 | help="Time in seconds between share availability checks."), |
| 169 | cfg.IntOpt("build_timeout", |
| 170 | default=500, |
| 171 | help="Timeout in seconds to wait for a share to become" |
| 172 | "available."), |
| 173 | cfg.BoolOpt("suppress_errors_in_cleanup", |
| 174 | default=False, |
| 175 | help="Whether to suppress errors with clean up operation " |
| 176 | "or not. There are cases when we may want to skip " |
| 177 | "such errors and catch only test errors."), |
debeltrami | 1753a59 | 2020-05-11 18:27:30 +0000 | [diff] [blame] | 178 | cfg.MultiOpt("security_service", |
| 179 | item_type=types.Dict(), |
| 180 | secret=True, |
| 181 | help="This option enables specifying security service " |
| 182 | "parameters needed to create security services " |
| 183 | "dynamically in order to run the tempest tests. " |
| 184 | "The configured security service must be reachable by " |
| 185 | "the project share networks created by the tests. So, " |
| 186 | "ideally project networks must be able to route to the " |
| 187 | "network where the pre-existing security services has " |
| 188 | "been deployed. The set of parameters that can be " |
| 189 | "configured is the same used in the security service " |
| 190 | "creation. You can repeat this option many times, and " |
| 191 | "each entry takes the standard dict config parameters: " |
| 192 | "security_service = " |
| 193 | "ss_type:<ldap, kerberos or active_directory>, " |
| 194 | "ss_dns_ip:value, ss_user:value, ss_password=value, " |
| 195 | "ss_domain:value, ss_server:value"), |
Valeriy Ponomaryov | ad55dc5 | 2015-09-23 13:54:00 +0300 | [diff] [blame] | 196 | |
| 197 | # Switching ON/OFF test suites filtered by features |
Valeriy Ponomaryov | 9e56c99 | 2016-02-17 21:19:39 +0200 | [diff] [blame] | 198 | cfg.BoolOpt("run_quota_tests", |
| 199 | default=True, |
| 200 | help="Defines whether to run quota tests or not."), |
Marc Koderer | 0abc93b | 2015-07-15 09:18:35 +0200 | [diff] [blame] | 201 | cfg.BoolOpt("run_extend_tests", |
| 202 | default=True, |
| 203 | help="Defines whether to run share extend tests or not. " |
| 204 | "Disable this feature if used driver doesn't " |
| 205 | "support it."), |
| 206 | cfg.BoolOpt("run_shrink_tests", |
| 207 | default=True, |
| 208 | help="Defines whether to run share shrink tests or not. " |
| 209 | "Disable this feature if used driver doesn't " |
| 210 | "support it."), |
| 211 | cfg.BoolOpt("run_snapshot_tests", |
| 212 | default=True, |
| 213 | help="Defines whether to run tests that use share snapshots " |
| 214 | "or not. Disable this feature if used driver doesn't " |
| 215 | "support it."), |
Clinton Knight | 7f16b8c | 2016-06-08 13:46:51 -0700 | [diff] [blame] | 216 | cfg.BoolOpt("run_revert_to_snapshot_tests", |
| 217 | default=False, |
| 218 | help="Defines whether to run tests that revert shares " |
| 219 | "to snapshots or not. Enable this feature if used " |
| 220 | "driver supports it."), |
Andrew Kerr | b843692 | 2016-06-01 15:32:43 -0400 | [diff] [blame] | 221 | cfg.BoolOpt("run_share_group_tests", |
| 222 | default=True, |
| 223 | deprecated_name="run_consistency_group_tests", |
| 224 | help="Defines whether to run share group tests or not."), |
Yogesh | bdb8810 | 2015-09-29 23:41:02 -0400 | [diff] [blame] | 225 | cfg.BoolOpt("run_replication_tests", |
| 226 | default=False, |
| 227 | help="Defines whether to run replication tests or not. " |
| 228 | "Enable this feature if the driver is configured " |
| 229 | "for replication."), |
zhaohua | 4636649 | 2016-06-20 17:51:47 +0800 | [diff] [blame] | 230 | cfg.BoolOpt("run_multiple_share_replicas_tests", |
| 231 | default=True, |
| 232 | help="Defines whether to run multiple replicas creation test " |
| 233 | "or not. Enable this if the driver can create more than " |
| 234 | "one replica for a share."), |
Rodrigo Barbieri | 427bc05 | 2016-06-06 17:10:06 -0300 | [diff] [blame] | 235 | cfg.BoolOpt("run_host_assisted_migration_tests", |
| 236 | deprecated_name="run_migration_tests", |
Rodrigo Barbieri | 2aafa26 | 2015-09-09 15:52:16 -0300 | [diff] [blame] | 237 | default=False, |
Rodrigo Barbieri | 427bc05 | 2016-06-06 17:10:06 -0300 | [diff] [blame] | 238 | help="Enable or disable host-assisted migration tests."), |
| 239 | cfg.BoolOpt("run_driver_assisted_migration_tests", |
| 240 | deprecated_name="run_migration_tests", |
| 241 | default=False, |
| 242 | help="Enable or disable driver-assisted migration tests."), |
yogesh | f5bc653 | 2016-10-25 14:57:11 -0400 | [diff] [blame] | 243 | cfg.BoolOpt("run_migration_with_preserve_snapshots_tests", |
| 244 | default=False, |
| 245 | help="Enable or disable migration with " |
| 246 | "preserve_snapshots tests set to True."), |
Xing Yang | 69b00b5 | 2015-11-22 16:10:44 -0500 | [diff] [blame] | 247 | cfg.BoolOpt("run_manage_unmanage_tests", |
| 248 | default=False, |
| 249 | help="Defines whether to run manage/unmanage tests or not. " |
| 250 | "These test may leave orphaned resources, so be careful " |
| 251 | "enabling this opt."), |
| 252 | cfg.BoolOpt("run_manage_unmanage_snapshot_tests", |
| 253 | default=False, |
| 254 | help="Defines whether to run manage/unmanage snapshot tests " |
| 255 | "or not. These tests may leave orphaned resources, so be " |
| 256 | "careful enabling this opt."), |
tpsilva | 6c77654 | 2016-07-08 14:41:35 -0300 | [diff] [blame] | 257 | cfg.BoolOpt("run_mount_snapshot_tests", |
| 258 | default=False, |
| 259 | help="Enable or disable mountable snapshot tests."), |
andrebeltrami | 3b4d485 | 2020-02-04 19:11:54 +0000 | [diff] [blame] | 260 | cfg.BoolOpt("run_create_share_from_snapshot_in_another_pool_or_az_tests", |
| 261 | default=False, |
| 262 | help="Defines whether to run tests that create share from " |
| 263 | "snapshots in another pool or az. Enable this " |
| 264 | "option if the used driver supports it."), |
Valeriy Ponomaryov | ad55dc5 | 2015-09-23 13:54:00 +0300 | [diff] [blame] | 265 | |
Marc Koderer | 0abc93b | 2015-07-15 09:18:35 +0200 | [diff] [blame] | 266 | cfg.StrOpt("image_with_share_tools", |
Alexey Ovchinnikov | b535a5b | 2016-09-22 10:20:58 +0300 | [diff] [blame] | 267 | default="manila-service-image-master", |
Marc Koderer | 0abc93b | 2015-07-15 09:18:35 +0200 | [diff] [blame] | 268 | help="Image name for vm booting with nfs/smb clients tool."), |
| 269 | cfg.StrOpt("image_username", |
| 270 | default="manila", |
| 271 | help="Image username."), |
| 272 | cfg.StrOpt("image_password", |
| 273 | help="Image password. Should be used for " |
| 274 | "'image_with_share_tools' without Nova Metadata support."), |
| 275 | cfg.StrOpt("client_vm_flavor_ref", |
| 276 | default="100", |
| 277 | help="Flavor used for client vm in scenario tests."), |
Rodrigo Barbieri | b7137ad | 2015-09-06 22:53:16 -0300 | [diff] [blame] | 278 | cfg.IntOpt("migration_timeout", |
Rodrigo Barbieri | e330512 | 2016-02-03 14:32:24 -0200 | [diff] [blame] | 279 | default=1500, |
Rodrigo Barbieri | b7137ad | 2015-09-06 22:53:16 -0300 | [diff] [blame] | 280 | help="Time to wait for share migration before " |
| 281 | "timing out (seconds)."), |
Julia Varlamova | d10a4a9 | 2015-08-31 06:28:28 -0400 | [diff] [blame] | 282 | cfg.StrOpt("default_share_type_name", |
Julia Varlamova | d10a4a9 | 2015-08-31 06:28:28 -0400 | [diff] [blame] | 283 | help="Default share type name to use in tempest tests."), |
Yogesh | bdb8810 | 2015-09-29 23:41:02 -0400 | [diff] [blame] | 284 | cfg.StrOpt("backend_replication_type", |
| 285 | default='none', |
| 286 | choices=['none', 'writable', 'readable', 'dr'], |
| 287 | help="Specify the replication type supported by the backend."), |
marcusvrn | e0d7cfd | 2016-06-24 12:27:55 -0300 | [diff] [blame] | 288 | cfg.IntOpt("share_size", |
| 289 | default=1, |
| 290 | help="Default size in GB for shares created by share tests."), |
Rodrigo Barbieri | 797257e | 2017-11-21 11:00:45 -0200 | [diff] [blame] | 291 | cfg.BoolOpt("run_ipv6_tests", |
| 292 | default=False, |
Goutham Pacha Ravi | 2b30874 | 2020-08-20 23:47:11 -0700 | [diff] [blame] | 293 | help="Enable or disable running IPv6 NFS scenario tests. " |
| 294 | "These tests validate that IPv6 export locations work, " |
| 295 | "and that access can be provided to IPv6 clients. When " |
| 296 | "you do not specify a storage_network, the tests will " |
| 297 | "attempt to create an IPv6 subnet on the project network " |
| 298 | "they create for ping and SSH to the client test VM " |
| 299 | "where data path testing is performed."), |
Marc Koderer | 0abc93b | 2015-07-15 09:18:35 +0200 | [diff] [blame] | 300 | ] |