blob: decf2ac409c8f4a1afbda72ed758ce56f4d7e6f7 [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
lkuchlan2d0c8692021-11-25 20:16:00 +020024manila_scope_enforcement = cfg.BoolOpt('manila',
25 default=False,
26 help="Does the Share service API "
27 "policies enforce scope? "
28 "This configuration value should "
29 "be same as manila.conf: "
30 "[oslo_policy].enforce_scope "
31 "option.")
32
Marc Koderer0abc93b2015-07-15 09:18:35 +020033share_group = cfg.OptGroup(name="share", title="Share Service Options")
34
35ShareGroup = [
36 cfg.StrOpt("min_api_microversion",
Clinton Knighte5c8f092015-08-27 15:00:23 -040037 default="2.0",
Marc Koderer0abc93b2015-07-15 09:18:35 +020038 help="The minimum api microversion is configured to be the "
Goutham Pacha Ravib60fdda2021-04-07 23:24:56 -070039 "value of the minimum microversion supported by Manila. "
40 "This value is only used to validate the versions "
41 "response from Manila."),
Marc Koderer0abc93b2015-07-15 09:18:35 +020042 cfg.StrOpt("max_api_microversion",
agireesh077fd3d2024-03-11 20:43:00 +053043 default="2.85",
Marc Koderer0abc93b2015-07-15 09:18:35 +020044 help="The maximum api microversion is configured to be the "
45 "value of the latest microversion supported by Manila."),
46 cfg.StrOpt("region",
47 default="",
48 help="The share region name to use. If empty, the value "
49 "of identity.region is used instead. If no such region "
50 "is found in the service catalog, the first found one is "
51 "used."),
52 cfg.StrOpt("catalog_type",
53 default="share",
54 help="Catalog type of the Share service."),
55 cfg.StrOpt('endpoint_type',
56 default='publicURL',
57 choices=['public', 'admin', 'internal',
58 'publicURL', 'adminURL', 'internalURL'],
59 help="The endpoint type to use for the share service."),
60 cfg.BoolOpt("multitenancy_enabled",
61 default=True,
62 help="This option used to determine backend driver type, "
63 "multitenant driver uses share-networks, but "
64 "single-tenant doesn't."),
Valeriy Ponomaryovc5dae272016-06-10 18:29:24 +030065 cfg.BoolOpt("create_networks_when_multitenancy_enabled",
66 default=True,
67 help="This option is used only when other "
68 "'multitenancy_enabled' option is set to 'True'. "
69 "If this one is set to True, then tempest will create "
70 "neutron networks for each new manila share-network "
71 "it creates. Else it will use manila share-networks with "
72 "empty values (case of StandAloneNetworkPlugin and "
73 "NeutronSingleNetworkPlugin)."),
Marc Koderer0abc93b2015-07-15 09:18:35 +020074 cfg.ListOpt("enable_protocols",
75 default=["nfs", "cifs"],
76 help="First value of list is protocol by default, "
77 "items of list show enabled protocols at all."),
78 cfg.ListOpt("enable_ip_rules_for_protocols",
79 default=["nfs", "cifs", ],
80 help="Selection of protocols, that should "
81 "be covered with ip rule tests"),
82 cfg.ListOpt("enable_user_rules_for_protocols",
83 default=[],
84 help="Selection of protocols, that should "
85 "be covered with user rule tests"),
86 cfg.ListOpt("enable_cert_rules_for_protocols",
87 default=["glusterfs", ],
88 help="Protocols that should be covered with cert rule tests."),
John Spray061b1452015-11-18 13:15:32 +000089 cfg.ListOpt("enable_cephx_rules_for_protocols",
90 default=["cephfs", ],
91 help="Protocols to be covered with cephx rule tests."),
Marc Koderer0abc93b2015-07-15 09:18:35 +020092 cfg.StrOpt("username_for_user_rules",
93 default="Administrator",
94 help="Username, that will be used in user tests."),
Rodrigo Barbieri797257e2017-11-21 11:00:45 -020095 cfg.StrOpt("override_ip_for_nfs_access",
96 help="Forces access rules to be as specified on NFS scenario"
97 " tests. This can used for working around multiple "
98 "NATs between the VMs and the storage controller."),
Goutham Pacha Ravi37ee6772019-10-18 12:53:22 -070099 cfg.StrOpt("storage_network",
100 help="Name or UUID of a neutron network that is used to access "
101 "shared file systems over. If specified, test virtual "
102 "machines are created with two NICs, the primary NIC is "
103 "attached to the private project network and the "
104 "secondary NIC is attached to the specified storage "
105 "network. If using NFS, access control is done with the "
106 "help of the IP address assigned to the virtual machine's "
107 "storage network NIC."),
Marc Koderer0abc93b2015-07-15 09:18:35 +0200108 cfg.ListOpt("enable_ro_access_level_for_protocols",
109 default=["nfs", ],
110 help="List of protocols to run tests with ro access level."),
lkuchlanb5d6f292024-11-09 19:54:47 +0200111 cfg.ListOpt("nfs_versions",
112 default=["4", ],
113 help="Specifies the NFS protocol version to use when mounting "
114 "an NFS share. Set to '3' for NFSv3, and '4' or '4.1' "
115 "for NFSv4. Leave it blank to use the default version."),
116
Valeriy Ponomaryovad55dc52015-09-23 13:54:00 +0300117
118 # Capabilities
119 cfg.StrOpt("capability_storage_protocol",
120 deprecated_name="storage_protocol",
Marc Koderer0abc93b2015-07-15 09:18:35 +0200121 default="NFS_CIFS",
122 help="Backend protocol to target when creating volume types."),
Valeriy Ponomaryovad55dc52015-09-23 13:54:00 +0300123 cfg.BoolOpt("capability_snapshot_support",
124 help="Defines extra spec that satisfies specific back end "
125 "capability called 'snapshot_support' and will be used "
126 "for setting up custom share type. Defaults to value of "
127 "other config option 'run_snapshot_tests'."),
Clinton Knight4699a8c2016-08-16 22:36:13 -0400128 cfg.BoolOpt("capability_create_share_from_snapshot_support",
129 help="Defines extra spec that satisfies specific back end "
130 "capability called 'create_share_from_snapshot_support' "
131 "and will be used for setting up a custom share type. "
132 "Defaults to the value of run_snapshot_tests. Set it to "
133 "False if the driver being tested does not support "
134 "creating shares from snapshots."),
Clinton Knight7f16b8c2016-06-08 13:46:51 -0700135 cfg.BoolOpt("capability_revert_to_snapshot_support",
Rodrigo Barbieri1a1b91a2017-02-01 10:15:41 -0200136 deprecated_for_removal=True,
137 deprecated_reason="Redundant configuration option. Please use "
138 "'run_revert_to_snapshot_tests' config "
139 "option instead.",
Clinton Knight7f16b8c2016-06-08 13:46:51 -0700140 help="Defines extra spec that satisfies specific back end "
141 "capability called 'revert_to_snapshot_support' "
142 "and will be used for setting up custom share type. "
143 "Defaults to the value of run_revert_to_snapshot_tests."),
Valeriy Ponomaryov3c188932017-03-15 19:06:23 +0300144 cfg.StrOpt("capability_sg_consistent_snapshot_support",
145 choices=["host", "pool", None],
146 help="Backend capability to create consistent snapshots of "
147 "share group members. Will be used with creation "
148 "of new share group types as group spec."),
Felipe Rodrigues6e566772021-08-23 14:57:50 -0300149 cfg.BoolOpt("capability_thin_provisioned",
150 default=False,
151 help="Defines whether to create shares as thin provisioned, "
152 "adding the extra spec 'thin_provisioning' as 'True' for "
153 "setting up the custom share types. It may be useful to "
154 "run tempest with back end storage systems without much "
155 "space. Take care enabling it, the manila scheduler "
156 "capability filter will request this capability in all "
157 "share types and the the capacity filter will allow "
158 "oversubscription."),
Marc Koderer0abc93b2015-07-15 09:18:35 +0200159 cfg.StrOpt("share_network_id",
160 default="",
161 help="Some backend drivers requires share network "
162 "for share creation. Share network id, that will be "
Goutham Pacha Ravi90c354b2019-06-12 13:18:51 -0700163 "used for shares. If not set, it won't be used. Setting "
164 "this option to a valid share network ID will mean that "
165 "the value of create_networks_when_multitenancy_enabled "
166 "should be False."),
Marc Koderer0abc93b2015-07-15 09:18:35 +0200167 cfg.StrOpt("alt_share_network_id",
168 default="",
169 help="Share network id, that will be used for shares"
Goutham Pacha Ravi90c354b2019-06-12 13:18:51 -0700170 " in alt tenant. If not set, it won't be used. Setting "
171 "this option to a valid share network ID will mean that "
172 "the value of create_networks_when_multitenancy_enabled "
173 "should be False."),
Marc Koderer0abc93b2015-07-15 09:18:35 +0200174 cfg.StrOpt("admin_share_network_id",
175 default="",
176 help="Share network id, that will be used for shares"
Goutham Pacha Ravi90c354b2019-06-12 13:18:51 -0700177 " in admin tenant. If not set, it won't be used. Setting "
178 "this option to a valid share network ID will mean that "
179 "the value of create_networks_when_multitenancy_enabled "
180 "should be False."),
Marc Koderer0abc93b2015-07-15 09:18:35 +0200181 cfg.BoolOpt("multi_backend",
182 default=False,
183 help="Runs Manila multi-backend tests."),
184 cfg.ListOpt("backend_names",
185 default=[],
186 help="Names of share backends, that will be used with "
187 "multibackend tests. Tempest will use first two values."),
188 cfg.IntOpt("share_creation_retry_number",
189 default=0,
190 help="Defines number of retries for share creation. "
191 "It is useful to avoid failures caused by unstable "
192 "environment."),
193 cfg.IntOpt("build_interval",
194 default=3,
195 help="Time in seconds between share availability checks."),
196 cfg.IntOpt("build_timeout",
197 default=500,
198 help="Timeout in seconds to wait for a share to become"
199 "available."),
200 cfg.BoolOpt("suppress_errors_in_cleanup",
201 default=False,
202 help="Whether to suppress errors with clean up operation "
203 "or not. There are cases when we may want to skip "
204 "such errors and catch only test errors."),
debeltrami1753a592020-05-11 18:27:30 +0000205 cfg.MultiOpt("security_service",
206 item_type=types.Dict(),
207 secret=True,
208 help="This option enables specifying security service "
209 "parameters needed to create security services "
210 "dynamically in order to run the tempest tests. "
211 "The configured security service must be reachable by "
212 "the project share networks created by the tests. So, "
213 "ideally project networks must be able to route to the "
214 "network where the pre-existing security services has "
215 "been deployed. The set of parameters that can be "
216 "configured is the same used in the security service "
217 "creation. You can repeat this option many times, and "
218 "each entry takes the standard dict config parameters: "
219 "security_service = "
220 "ss_type:<ldap, kerberos or active_directory>, "
221 "ss_dns_ip:value, ss_user:value, ss_password=value, "
222 "ss_domain:value, ss_server:value"),
Valeriy Ponomaryovad55dc52015-09-23 13:54:00 +0300223
224 # Switching ON/OFF test suites filtered by features
Valeriy Ponomaryov9e56c992016-02-17 21:19:39 +0200225 cfg.BoolOpt("run_quota_tests",
226 default=True,
227 help="Defines whether to run quota tests or not."),
Marc Koderer0abc93b2015-07-15 09:18:35 +0200228 cfg.BoolOpt("run_extend_tests",
229 default=True,
230 help="Defines whether to run share extend tests or not. "
231 "Disable this feature if used driver doesn't "
232 "support it."),
233 cfg.BoolOpt("run_shrink_tests",
234 default=True,
235 help="Defines whether to run share shrink tests or not. "
236 "Disable this feature if used driver doesn't "
237 "support it."),
238 cfg.BoolOpt("run_snapshot_tests",
239 default=True,
240 help="Defines whether to run tests that use share snapshots "
241 "or not. Disable this feature if used driver doesn't "
242 "support it."),
Clinton Knight7f16b8c2016-06-08 13:46:51 -0700243 cfg.BoolOpt("run_revert_to_snapshot_tests",
244 default=False,
245 help="Defines whether to run tests that revert shares "
246 "to snapshots or not. Enable this feature if used "
247 "driver supports it."),
Andrew Kerrb8436922016-06-01 15:32:43 -0400248 cfg.BoolOpt("run_share_group_tests",
249 default=True,
250 deprecated_name="run_consistency_group_tests",
251 help="Defines whether to run share group tests or not."),
Yogeshbdb88102015-09-29 23:41:02 -0400252 cfg.BoolOpt("run_replication_tests",
253 default=False,
254 help="Defines whether to run replication tests or not. "
255 "Enable this feature if the driver is configured "
256 "for replication."),
zhaohua46366492016-06-20 17:51:47 +0800257 cfg.BoolOpt("run_multiple_share_replicas_tests",
258 default=True,
259 help="Defines whether to run multiple replicas creation test "
260 "or not. Enable this if the driver can create more than "
261 "one replica for a share."),
Rodrigo Barbieri427bc052016-06-06 17:10:06 -0300262 cfg.BoolOpt("run_host_assisted_migration_tests",
263 deprecated_name="run_migration_tests",
Rodrigo Barbieri2aafa262015-09-09 15:52:16 -0300264 default=False,
Rodrigo Barbieri427bc052016-06-06 17:10:06 -0300265 help="Enable or disable host-assisted migration tests."),
266 cfg.BoolOpt("run_driver_assisted_migration_tests",
267 deprecated_name="run_migration_tests",
268 default=False,
269 help="Enable or disable driver-assisted migration tests."),
yogeshf5bc6532016-10-25 14:57:11 -0400270 cfg.BoolOpt("run_migration_with_preserve_snapshots_tests",
271 default=False,
272 help="Enable or disable migration with "
273 "preserve_snapshots tests set to True."),
Kiran Pawaredd82c72022-05-07 14:48:36 +0000274 cfg.BoolOpt("run_driver_assisted_backup_tests",
275 default=False,
276 help="Enable or disable share backup tests."),
Xing Yang69b00b52015-11-22 16:10:44 -0500277 cfg.BoolOpt("run_manage_unmanage_tests",
278 default=False,
279 help="Defines whether to run manage/unmanage tests or not. "
280 "These test may leave orphaned resources, so be careful "
281 "enabling this opt."),
282 cfg.BoolOpt("run_manage_unmanage_snapshot_tests",
283 default=False,
284 help="Defines whether to run manage/unmanage snapshot tests "
285 "or not. These tests may leave orphaned resources, so be "
286 "careful enabling this opt."),
tpsilva6c776542016-07-08 14:41:35 -0300287 cfg.BoolOpt("run_mount_snapshot_tests",
288 default=False,
289 help="Enable or disable mountable snapshot tests."),
andrebeltrami3b4d4852020-02-04 19:11:54 +0000290 cfg.BoolOpt("run_create_share_from_snapshot_in_another_pool_or_az_tests",
291 default=False,
292 help="Defines whether to run tests that create share from "
293 "snapshots in another pool or az. Enable this "
294 "option if the used driver supports it."),
debeltramib3089a72020-09-15 21:06:04 +0000295 cfg.BoolOpt("run_share_server_migration_tests",
debeltrami0d523bb2020-08-20 12:48:49 +0000296 default=False,
297 help="Defines whether to run share servers migration tests. "
298 "Enable this option if the used driver supports it."),
Andrec1a3c0e2022-01-29 14:46:53 +0000299 cfg.BoolOpt("run_share_server_multiple_subnet_tests",
300 default=False,
301 help="Defines whether to run the share server multiple "
302 "subnets tests. Enable this option if the used driver "
303 "supports it."),
304 cfg.BoolOpt("run_network_allocation_update_tests",
305 default=False,
306 help="Defines whether to run the network allocation update "
307 "tests. Enable this option if the used driver "
308 "supports it."),
Valeriy Ponomaryovad55dc52015-09-23 13:54:00 +0300309
Marc Koderer0abc93b2015-07-15 09:18:35 +0200310 cfg.StrOpt("image_with_share_tools",
Alexey Ovchinnikovb535a5b2016-09-22 10:20:58 +0300311 default="manila-service-image-master",
Marc Koderer0abc93b2015-07-15 09:18:35 +0200312 help="Image name for vm booting with nfs/smb clients tool."),
313 cfg.StrOpt("image_username",
314 default="manila",
315 help="Image username."),
316 cfg.StrOpt("image_password",
Takashi Kajinamie0390772024-10-25 14:13:45 +0900317 secret=True,
Marc Koderer0abc93b2015-07-15 09:18:35 +0200318 help="Image password. Should be used for "
319 "'image_with_share_tools' without Nova Metadata support."),
320 cfg.StrOpt("client_vm_flavor_ref",
321 default="100",
322 help="Flavor used for client vm in scenario tests."),
Rodrigo Barbierib7137ad2015-09-06 22:53:16 -0300323 cfg.IntOpt("migration_timeout",
Rodrigo Barbierie3305122016-02-03 14:32:24 -0200324 default=1500,
Rodrigo Barbierib7137ad2015-09-06 22:53:16 -0300325 help="Time to wait for share migration before "
326 "timing out (seconds)."),
Kiran Pawaredd82c72022-05-07 14:48:36 +0000327 cfg.IntOpt("share_backup_timeout",
328 default=1500,
329 help="Time to wait for share backup before "
330 "timing out (seconds)."),
debeltrami0d523bb2020-08-20 12:48:49 +0000331 cfg.IntOpt("share_server_migration_timeout",
Takashi Kajinamif72b0e92024-10-25 14:09:49 +0900332 default=1500,
debeltrami0d523bb2020-08-20 12:48:49 +0000333 help="Time to wait for share server migration before "
334 "timing out (seconds)."),
Julia Varlamovad10a4a92015-08-31 06:28:28 -0400335 cfg.StrOpt("default_share_type_name",
Julia Varlamovad10a4a92015-08-31 06:28:28 -0400336 help="Default share type name to use in tempest tests."),
Yogeshbdb88102015-09-29 23:41:02 -0400337 cfg.StrOpt("backend_replication_type",
338 default='none',
339 choices=['none', 'writable', 'readable', 'dr'],
340 help="Specify the replication type supported by the backend."),
marcusvrne0d7cfd2016-06-24 12:27:55 -0300341 cfg.IntOpt("share_size",
342 default=1,
343 help="Default size in GB for shares created by share tests."),
Volodymyr Boikocaf8b902024-06-06 08:29:30 +0300344 cfg.IntOpt("additional_overflow_blocks",
345 default=0,
346 help="Additional blocks to be written "
347 "to share in scenario tests."),
348 cfg.IntOpt("share_resize_sync_delay",
349 default=0,
350 help="Time to wait before the changes to the share size"
351 " are propagated to the storage system."),
352 cfg.IntOpt("share_growth_size",
353 default=1,
354 help="The default increase in size sought by tests"
355 " when validating share resizing within scenario tests."),
Rodrigo Barbieri797257e2017-11-21 11:00:45 -0200356 cfg.BoolOpt("run_ipv6_tests",
357 default=False,
Goutham Pacha Ravi2b308742020-08-20 23:47:11 -0700358 help="Enable or disable running IPv6 NFS scenario tests. "
359 "These tests validate that IPv6 export locations work, "
360 "and that access can be provided to IPv6 clients. When "
361 "you do not specify a storage_network, the tests will "
362 "attempt to create an IPv6 subnet on the project network "
363 "they create for ping and SSH to the client test VM "
364 "where data path testing is performed."),
lkuchlan192d4082023-09-07 13:44:31 +0300365 cfg.StrOpt("dd_input_file",
366 default="/dev/zero",
367 help="The input file (if) in the dd command specifies the "
368 "source of data that dd will read and process, which can "
369 "be a device, a regular file, or even standard input "
370 "(stdin). dd copies, transforms, or performs actions on "
371 "this data based on provided options and then writes it "
372 "to an output file or device (of). When using /dev/zero "
373 "in storage systems with default compression, although "
374 "it generates highly compressible null bytes (zeros), "
375 "writing data from /dev/zero might not yield significant "
376 "space savings as these systems are already optimized for "
377 "efficient compression."),
Kiran Pawaredd82c72022-05-07 14:48:36 +0000378 cfg.DictOpt("driver_assisted_backup_test_driver_options",
379 default={'dummy': True},
380 help="Share backup driver options specified as dict."),
Marc Koderer0abc93b2015-07-15 09:18:35 +0200381]