blob: bb35558fa2c004ead45e0e6ad0dbb08d634bf296 [file] [log] [blame]
Marc Koderer0abc93b2015-07-15 09:18:35 +02001# 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 Koderer0abc93b2015-07-15 09:18:35 +020016from oslo_config import cfg
debeltrami1753a592020-05-11 18:27:30 +000017from oslo_config import types
Marc Koderer0abc93b2015-07-15 09:18:35 +020018
Nishant Kumar02278302016-10-01 12:50:39 +053019service_option = cfg.BoolOpt("manila",
20 default=True,
21 help="Whether or not manila is expected to be "
22 "available")
Marc Koderer0abc93b2015-07-15 09:18:35 +020023
24share_group = cfg.OptGroup(name="share", title="Share Service Options")
25
26ShareGroup = [
27 cfg.StrOpt("min_api_microversion",
Clinton Knighte5c8f092015-08-27 15:00:23 -040028 default="2.0",
Marc Koderer0abc93b2015-07-15 09:18:35 +020029 help="The minimum api microversion is configured to be the "
Goutham Pacha Ravib60fdda2021-04-07 23:24:56 -070030 "value of the minimum microversion supported by Manila. "
31 "This value is only used to validate the versions "
32 "response from Manila."),
Marc Koderer0abc93b2015-07-15 09:18:35 +020033 cfg.StrOpt("max_api_microversion",
haixin9f552272021-03-06 15:26:06 +080034 default="2.61",
Marc Koderer0abc93b2015-07-15 09:18:35 +020035 help="The maximum api microversion is configured to be the "
36 "value of the latest microversion supported by Manila."),
37 cfg.StrOpt("region",
38 default="",
39 help="The share region name to use. If empty, the value "
40 "of identity.region is used instead. If no such region "
41 "is found in the service catalog, the first found one is "
42 "used."),
43 cfg.StrOpt("catalog_type",
44 default="share",
45 help="Catalog type of the Share service."),
46 cfg.StrOpt('endpoint_type',
47 default='publicURL',
48 choices=['public', 'admin', 'internal',
49 'publicURL', 'adminURL', 'internalURL'],
50 help="The endpoint type to use for the share service."),
51 cfg.BoolOpt("multitenancy_enabled",
52 default=True,
53 help="This option used to determine backend driver type, "
54 "multitenant driver uses share-networks, but "
55 "single-tenant doesn't."),
Valeriy Ponomaryovc5dae272016-06-10 18:29:24 +030056 cfg.BoolOpt("create_networks_when_multitenancy_enabled",
57 default=True,
58 help="This option is used only when other "
59 "'multitenancy_enabled' option is set to 'True'. "
60 "If this one is set to True, then tempest will create "
61 "neutron networks for each new manila share-network "
62 "it creates. Else it will use manila share-networks with "
63 "empty values (case of StandAloneNetworkPlugin and "
64 "NeutronSingleNetworkPlugin)."),
Marc Koderer0abc93b2015-07-15 09:18:35 +020065 cfg.ListOpt("enable_protocols",
66 default=["nfs", "cifs"],
67 help="First value of list is protocol by default, "
68 "items of list show enabled protocols at all."),
69 cfg.ListOpt("enable_ip_rules_for_protocols",
70 default=["nfs", "cifs", ],
71 help="Selection of protocols, that should "
72 "be covered with ip rule tests"),
73 cfg.ListOpt("enable_user_rules_for_protocols",
74 default=[],
75 help="Selection of protocols, that should "
76 "be covered with user rule tests"),
77 cfg.ListOpt("enable_cert_rules_for_protocols",
78 default=["glusterfs", ],
79 help="Protocols that should be covered with cert rule tests."),
John Spray061b1452015-11-18 13:15:32 +000080 cfg.ListOpt("enable_cephx_rules_for_protocols",
81 default=["cephfs", ],
82 help="Protocols to be covered with cephx rule tests."),
Marc Koderer0abc93b2015-07-15 09:18:35 +020083 cfg.StrOpt("username_for_user_rules",
84 default="Administrator",
85 help="Username, that will be used in user tests."),
Rodrigo Barbieri797257e2017-11-21 11:00:45 -020086 cfg.StrOpt("override_ip_for_nfs_access",
87 help="Forces access rules to be as specified on NFS scenario"
88 " tests. This can used for working around multiple "
89 "NATs between the VMs and the storage controller."),
Goutham Pacha Ravi37ee6772019-10-18 12:53:22 -070090 cfg.StrOpt("storage_network",
91 help="Name or UUID of a neutron network that is used to access "
92 "shared file systems over. If specified, test virtual "
93 "machines are created with two NICs, the primary NIC is "
94 "attached to the private project network and the "
95 "secondary NIC is attached to the specified storage "
96 "network. If using NFS, access control is done with the "
97 "help of the IP address assigned to the virtual machine's "
98 "storage network NIC."),
Marc Koderer0abc93b2015-07-15 09:18:35 +020099 cfg.ListOpt("enable_ro_access_level_for_protocols",
100 default=["nfs", ],
101 help="List of protocols to run tests with ro access level."),
Valeriy Ponomaryovad55dc52015-09-23 13:54:00 +0300102
103 # Capabilities
104 cfg.StrOpt("capability_storage_protocol",
105 deprecated_name="storage_protocol",
Marc Koderer0abc93b2015-07-15 09:18:35 +0200106 default="NFS_CIFS",
107 help="Backend protocol to target when creating volume types."),
Valeriy Ponomaryovad55dc52015-09-23 13:54:00 +0300108 cfg.BoolOpt("capability_snapshot_support",
109 help="Defines extra spec that satisfies specific back end "
110 "capability called 'snapshot_support' and will be used "
111 "for setting up custom share type. Defaults to value of "
112 "other config option 'run_snapshot_tests'."),
Clinton Knight4699a8c2016-08-16 22:36:13 -0400113 cfg.BoolOpt("capability_create_share_from_snapshot_support",
114 help="Defines extra spec that satisfies specific back end "
115 "capability called 'create_share_from_snapshot_support' "
116 "and will be used for setting up a custom share type. "
117 "Defaults to the value of run_snapshot_tests. Set it to "
118 "False if the driver being tested does not support "
119 "creating shares from snapshots."),
Clinton Knight7f16b8c2016-06-08 13:46:51 -0700120 cfg.BoolOpt("capability_revert_to_snapshot_support",
Rodrigo Barbieri1a1b91a2017-02-01 10:15:41 -0200121 deprecated_for_removal=True,
122 deprecated_reason="Redundant configuration option. Please use "
123 "'run_revert_to_snapshot_tests' config "
124 "option instead.",
Clinton Knight7f16b8c2016-06-08 13:46:51 -0700125 help="Defines extra spec that satisfies specific back end "
126 "capability called 'revert_to_snapshot_support' "
127 "and will be used for setting up custom share type. "
128 "Defaults to the value of run_revert_to_snapshot_tests."),
Valeriy Ponomaryov3c188932017-03-15 19:06:23 +0300129 cfg.StrOpt("capability_sg_consistent_snapshot_support",
130 choices=["host", "pool", None],
131 help="Backend capability to create consistent snapshots of "
132 "share group members. Will be used with creation "
133 "of new share group types as group spec."),
Felipe Rodrigues6e566772021-08-23 14:57:50 -0300134 cfg.BoolOpt("capability_thin_provisioned",
135 default=False,
136 help="Defines whether to create shares as thin provisioned, "
137 "adding the extra spec 'thin_provisioning' as 'True' for "
138 "setting up the custom share types. It may be useful to "
139 "run tempest with back end storage systems without much "
140 "space. Take care enabling it, the manila scheduler "
141 "capability filter will request this capability in all "
142 "share types and the the capacity filter will allow "
143 "oversubscription."),
Marc Koderer0abc93b2015-07-15 09:18:35 +0200144 cfg.StrOpt("share_network_id",
145 default="",
146 help="Some backend drivers requires share network "
147 "for share creation. Share network id, that will be "
Goutham Pacha Ravi90c354b2019-06-12 13:18:51 -0700148 "used for shares. If not set, it won't be used. Setting "
149 "this option to a valid share network ID will mean that "
150 "the value of create_networks_when_multitenancy_enabled "
151 "should be False."),
Marc Koderer0abc93b2015-07-15 09:18:35 +0200152 cfg.StrOpt("alt_share_network_id",
153 default="",
154 help="Share network id, that will be used for shares"
Goutham Pacha Ravi90c354b2019-06-12 13:18:51 -0700155 " in alt tenant. If not set, it won't be used. Setting "
156 "this option to a valid share network ID will mean that "
157 "the value of create_networks_when_multitenancy_enabled "
158 "should be False."),
Marc Koderer0abc93b2015-07-15 09:18:35 +0200159 cfg.StrOpt("admin_share_network_id",
160 default="",
161 help="Share network id, that will be used for shares"
Goutham Pacha Ravi90c354b2019-06-12 13:18:51 -0700162 " in admin tenant. If not set, it won't be used. Setting "
163 "this option to a valid share network ID will mean that "
164 "the value of create_networks_when_multitenancy_enabled "
165 "should be False."),
Marc Koderer0abc93b2015-07-15 09:18:35 +0200166 cfg.BoolOpt("multi_backend",
167 default=False,
168 help="Runs Manila multi-backend tests."),
169 cfg.ListOpt("backend_names",
170 default=[],
171 help="Names of share backends, that will be used with "
172 "multibackend tests. Tempest will use first two values."),
173 cfg.IntOpt("share_creation_retry_number",
174 default=0,
175 help="Defines number of retries for share creation. "
176 "It is useful to avoid failures caused by unstable "
177 "environment."),
178 cfg.IntOpt("build_interval",
179 default=3,
180 help="Time in seconds between share availability checks."),
181 cfg.IntOpt("build_timeout",
182 default=500,
183 help="Timeout in seconds to wait for a share to become"
184 "available."),
185 cfg.BoolOpt("suppress_errors_in_cleanup",
186 default=False,
187 help="Whether to suppress errors with clean up operation "
188 "or not. There are cases when we may want to skip "
189 "such errors and catch only test errors."),
debeltrami1753a592020-05-11 18:27:30 +0000190 cfg.MultiOpt("security_service",
191 item_type=types.Dict(),
192 secret=True,
193 help="This option enables specifying security service "
194 "parameters needed to create security services "
195 "dynamically in order to run the tempest tests. "
196 "The configured security service must be reachable by "
197 "the project share networks created by the tests. So, "
198 "ideally project networks must be able to route to the "
199 "network where the pre-existing security services has "
200 "been deployed. The set of parameters that can be "
201 "configured is the same used in the security service "
202 "creation. You can repeat this option many times, and "
203 "each entry takes the standard dict config parameters: "
204 "security_service = "
205 "ss_type:<ldap, kerberos or active_directory>, "
206 "ss_dns_ip:value, ss_user:value, ss_password=value, "
207 "ss_domain:value, ss_server:value"),
Valeriy Ponomaryovad55dc52015-09-23 13:54:00 +0300208
209 # Switching ON/OFF test suites filtered by features
Valeriy Ponomaryov9e56c992016-02-17 21:19:39 +0200210 cfg.BoolOpt("run_quota_tests",
211 default=True,
212 help="Defines whether to run quota tests or not."),
Marc Koderer0abc93b2015-07-15 09:18:35 +0200213 cfg.BoolOpt("run_extend_tests",
214 default=True,
215 help="Defines whether to run share extend tests or not. "
216 "Disable this feature if used driver doesn't "
217 "support it."),
218 cfg.BoolOpt("run_shrink_tests",
219 default=True,
220 help="Defines whether to run share shrink tests or not. "
221 "Disable this feature if used driver doesn't "
222 "support it."),
223 cfg.BoolOpt("run_snapshot_tests",
224 default=True,
225 help="Defines whether to run tests that use share snapshots "
226 "or not. Disable this feature if used driver doesn't "
227 "support it."),
Clinton Knight7f16b8c2016-06-08 13:46:51 -0700228 cfg.BoolOpt("run_revert_to_snapshot_tests",
229 default=False,
230 help="Defines whether to run tests that revert shares "
231 "to snapshots or not. Enable this feature if used "
232 "driver supports it."),
Andrew Kerrb8436922016-06-01 15:32:43 -0400233 cfg.BoolOpt("run_share_group_tests",
234 default=True,
235 deprecated_name="run_consistency_group_tests",
236 help="Defines whether to run share group tests or not."),
Yogeshbdb88102015-09-29 23:41:02 -0400237 cfg.BoolOpt("run_replication_tests",
238 default=False,
239 help="Defines whether to run replication tests or not. "
240 "Enable this feature if the driver is configured "
241 "for replication."),
zhaohua46366492016-06-20 17:51:47 +0800242 cfg.BoolOpt("run_multiple_share_replicas_tests",
243 default=True,
244 help="Defines whether to run multiple replicas creation test "
245 "or not. Enable this if the driver can create more than "
246 "one replica for a share."),
Rodrigo Barbieri427bc052016-06-06 17:10:06 -0300247 cfg.BoolOpt("run_host_assisted_migration_tests",
248 deprecated_name="run_migration_tests",
Rodrigo Barbieri2aafa262015-09-09 15:52:16 -0300249 default=False,
Rodrigo Barbieri427bc052016-06-06 17:10:06 -0300250 help="Enable or disable host-assisted migration tests."),
251 cfg.BoolOpt("run_driver_assisted_migration_tests",
252 deprecated_name="run_migration_tests",
253 default=False,
254 help="Enable or disable driver-assisted migration tests."),
yogeshf5bc6532016-10-25 14:57:11 -0400255 cfg.BoolOpt("run_migration_with_preserve_snapshots_tests",
256 default=False,
257 help="Enable or disable migration with "
258 "preserve_snapshots tests set to True."),
Xing Yang69b00b52015-11-22 16:10:44 -0500259 cfg.BoolOpt("run_manage_unmanage_tests",
260 default=False,
261 help="Defines whether to run manage/unmanage tests or not. "
262 "These test may leave orphaned resources, so be careful "
263 "enabling this opt."),
264 cfg.BoolOpt("run_manage_unmanage_snapshot_tests",
265 default=False,
266 help="Defines whether to run manage/unmanage snapshot tests "
267 "or not. These tests may leave orphaned resources, so be "
268 "careful enabling this opt."),
tpsilva6c776542016-07-08 14:41:35 -0300269 cfg.BoolOpt("run_mount_snapshot_tests",
270 default=False,
271 help="Enable or disable mountable snapshot tests."),
andrebeltrami3b4d4852020-02-04 19:11:54 +0000272 cfg.BoolOpt("run_create_share_from_snapshot_in_another_pool_or_az_tests",
273 default=False,
274 help="Defines whether to run tests that create share from "
275 "snapshots in another pool or az. Enable this "
276 "option if the used driver supports it."),
debeltramib3089a72020-09-15 21:06:04 +0000277 cfg.BoolOpt("run_share_server_migration_tests",
debeltrami0d523bb2020-08-20 12:48:49 +0000278 default=False,
279 help="Defines whether to run share servers migration tests. "
280 "Enable this option if the used driver supports it."),
Valeriy Ponomaryovad55dc52015-09-23 13:54:00 +0300281
Marc Koderer0abc93b2015-07-15 09:18:35 +0200282 cfg.StrOpt("image_with_share_tools",
Alexey Ovchinnikovb535a5b2016-09-22 10:20:58 +0300283 default="manila-service-image-master",
Marc Koderer0abc93b2015-07-15 09:18:35 +0200284 help="Image name for vm booting with nfs/smb clients tool."),
285 cfg.StrOpt("image_username",
286 default="manila",
287 help="Image username."),
288 cfg.StrOpt("image_password",
289 help="Image password. Should be used for "
290 "'image_with_share_tools' without Nova Metadata support."),
291 cfg.StrOpt("client_vm_flavor_ref",
292 default="100",
293 help="Flavor used for client vm in scenario tests."),
Rodrigo Barbierib7137ad2015-09-06 22:53:16 -0300294 cfg.IntOpt("migration_timeout",
Rodrigo Barbierie3305122016-02-03 14:32:24 -0200295 default=1500,
Rodrigo Barbierib7137ad2015-09-06 22:53:16 -0300296 help="Time to wait for share migration before "
297 "timing out (seconds)."),
debeltrami0d523bb2020-08-20 12:48:49 +0000298 cfg.IntOpt("share_server_migration_timeout",
299 default="1500",
300 help="Time to wait for share server migration before "
301 "timing out (seconds)."),
Julia Varlamovad10a4a92015-08-31 06:28:28 -0400302 cfg.StrOpt("default_share_type_name",
Julia Varlamovad10a4a92015-08-31 06:28:28 -0400303 help="Default share type name to use in tempest tests."),
Yogeshbdb88102015-09-29 23:41:02 -0400304 cfg.StrOpt("backend_replication_type",
305 default='none',
306 choices=['none', 'writable', 'readable', 'dr'],
307 help="Specify the replication type supported by the backend."),
marcusvrne0d7cfd2016-06-24 12:27:55 -0300308 cfg.IntOpt("share_size",
309 default=1,
310 help="Default size in GB for shares created by share tests."),
Rodrigo Barbieri797257e2017-11-21 11:00:45 -0200311 cfg.BoolOpt("run_ipv6_tests",
312 default=False,
Goutham Pacha Ravi2b308742020-08-20 23:47:11 -0700313 help="Enable or disable running IPv6 NFS scenario tests. "
314 "These tests validate that IPv6 export locations work, "
315 "and that access can be provided to IPv6 clients. When "
316 "you do not specify a storage_network, the tests will "
317 "attempt to create an IPv6 subnet on the project network "
318 "they create for ping and SSH to the client test VM "
319 "where data path testing is performed."),
Marc Koderer0abc93b2015-07-15 09:18:35 +0200320]