blob: dc1610023cf070f4527eb082f40e0faedc5c1d74 [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."),
Valeriy Ponomaryovad55dc52015-09-23 13:54:00 +0300111
112 # Capabilities
113 cfg.StrOpt("capability_storage_protocol",
114 deprecated_name="storage_protocol",
Marc Koderer0abc93b2015-07-15 09:18:35 +0200115 default="NFS_CIFS",
116 help="Backend protocol to target when creating volume types."),
Valeriy Ponomaryovad55dc52015-09-23 13:54:00 +0300117 cfg.BoolOpt("capability_snapshot_support",
118 help="Defines extra spec that satisfies specific back end "
119 "capability called 'snapshot_support' and will be used "
120 "for setting up custom share type. Defaults to value of "
121 "other config option 'run_snapshot_tests'."),
Clinton Knight4699a8c2016-08-16 22:36:13 -0400122 cfg.BoolOpt("capability_create_share_from_snapshot_support",
123 help="Defines extra spec that satisfies specific back end "
124 "capability called 'create_share_from_snapshot_support' "
125 "and will be used for setting up a custom share type. "
126 "Defaults to the value of run_snapshot_tests. Set it to "
127 "False if the driver being tested does not support "
128 "creating shares from snapshots."),
Clinton Knight7f16b8c2016-06-08 13:46:51 -0700129 cfg.BoolOpt("capability_revert_to_snapshot_support",
Rodrigo Barbieri1a1b91a2017-02-01 10:15:41 -0200130 deprecated_for_removal=True,
131 deprecated_reason="Redundant configuration option. Please use "
132 "'run_revert_to_snapshot_tests' config "
133 "option instead.",
Clinton Knight7f16b8c2016-06-08 13:46:51 -0700134 help="Defines extra spec that satisfies specific back end "
135 "capability called 'revert_to_snapshot_support' "
136 "and will be used for setting up custom share type. "
137 "Defaults to the value of run_revert_to_snapshot_tests."),
Valeriy Ponomaryov3c188932017-03-15 19:06:23 +0300138 cfg.StrOpt("capability_sg_consistent_snapshot_support",
139 choices=["host", "pool", None],
140 help="Backend capability to create consistent snapshots of "
141 "share group members. Will be used with creation "
142 "of new share group types as group spec."),
Felipe Rodrigues6e566772021-08-23 14:57:50 -0300143 cfg.BoolOpt("capability_thin_provisioned",
144 default=False,
145 help="Defines whether to create shares as thin provisioned, "
146 "adding the extra spec 'thin_provisioning' as 'True' for "
147 "setting up the custom share types. It may be useful to "
148 "run tempest with back end storage systems without much "
149 "space. Take care enabling it, the manila scheduler "
150 "capability filter will request this capability in all "
151 "share types and the the capacity filter will allow "
152 "oversubscription."),
Marc Koderer0abc93b2015-07-15 09:18:35 +0200153 cfg.StrOpt("share_network_id",
154 default="",
155 help="Some backend drivers requires share network "
156 "for share creation. Share network id, that will be "
Goutham Pacha Ravi90c354b2019-06-12 13:18:51 -0700157 "used for shares. If not set, it won't be used. Setting "
158 "this option to a valid share network ID will mean that "
159 "the value of create_networks_when_multitenancy_enabled "
160 "should be False."),
Marc Koderer0abc93b2015-07-15 09:18:35 +0200161 cfg.StrOpt("alt_share_network_id",
162 default="",
163 help="Share network id, that will be used for shares"
Goutham Pacha Ravi90c354b2019-06-12 13:18:51 -0700164 " in alt tenant. If not set, it won't be used. Setting "
165 "this option to a valid share network ID will mean that "
166 "the value of create_networks_when_multitenancy_enabled "
167 "should be False."),
Marc Koderer0abc93b2015-07-15 09:18:35 +0200168 cfg.StrOpt("admin_share_network_id",
169 default="",
170 help="Share network id, that will be used for shares"
Goutham Pacha Ravi90c354b2019-06-12 13:18:51 -0700171 " in admin tenant. If not set, it won't be used. Setting "
172 "this option to a valid share network ID will mean that "
173 "the value of create_networks_when_multitenancy_enabled "
174 "should be False."),
Marc Koderer0abc93b2015-07-15 09:18:35 +0200175 cfg.BoolOpt("multi_backend",
176 default=False,
177 help="Runs Manila multi-backend tests."),
178 cfg.ListOpt("backend_names",
179 default=[],
180 help="Names of share backends, that will be used with "
181 "multibackend tests. Tempest will use first two values."),
182 cfg.IntOpt("share_creation_retry_number",
183 default=0,
184 help="Defines number of retries for share creation. "
185 "It is useful to avoid failures caused by unstable "
186 "environment."),
187 cfg.IntOpt("build_interval",
188 default=3,
189 help="Time in seconds between share availability checks."),
190 cfg.IntOpt("build_timeout",
191 default=500,
192 help="Timeout in seconds to wait for a share to become"
193 "available."),
194 cfg.BoolOpt("suppress_errors_in_cleanup",
195 default=False,
196 help="Whether to suppress errors with clean up operation "
197 "or not. There are cases when we may want to skip "
198 "such errors and catch only test errors."),
debeltrami1753a592020-05-11 18:27:30 +0000199 cfg.MultiOpt("security_service",
200 item_type=types.Dict(),
201 secret=True,
202 help="This option enables specifying security service "
203 "parameters needed to create security services "
204 "dynamically in order to run the tempest tests. "
205 "The configured security service must be reachable by "
206 "the project share networks created by the tests. So, "
207 "ideally project networks must be able to route to the "
208 "network where the pre-existing security services has "
209 "been deployed. The set of parameters that can be "
210 "configured is the same used in the security service "
211 "creation. You can repeat this option many times, and "
212 "each entry takes the standard dict config parameters: "
213 "security_service = "
214 "ss_type:<ldap, kerberos or active_directory>, "
215 "ss_dns_ip:value, ss_user:value, ss_password=value, "
216 "ss_domain:value, ss_server:value"),
Valeriy Ponomaryovad55dc52015-09-23 13:54:00 +0300217
218 # Switching ON/OFF test suites filtered by features
Valeriy Ponomaryov9e56c992016-02-17 21:19:39 +0200219 cfg.BoolOpt("run_quota_tests",
220 default=True,
221 help="Defines whether to run quota tests or not."),
Marc Koderer0abc93b2015-07-15 09:18:35 +0200222 cfg.BoolOpt("run_extend_tests",
223 default=True,
224 help="Defines whether to run share extend tests or not. "
225 "Disable this feature if used driver doesn't "
226 "support it."),
227 cfg.BoolOpt("run_shrink_tests",
228 default=True,
229 help="Defines whether to run share shrink tests or not. "
230 "Disable this feature if used driver doesn't "
231 "support it."),
232 cfg.BoolOpt("run_snapshot_tests",
233 default=True,
234 help="Defines whether to run tests that use share snapshots "
235 "or not. Disable this feature if used driver doesn't "
236 "support it."),
Clinton Knight7f16b8c2016-06-08 13:46:51 -0700237 cfg.BoolOpt("run_revert_to_snapshot_tests",
238 default=False,
239 help="Defines whether to run tests that revert shares "
240 "to snapshots or not. Enable this feature if used "
241 "driver supports it."),
Andrew Kerrb8436922016-06-01 15:32:43 -0400242 cfg.BoolOpt("run_share_group_tests",
243 default=True,
244 deprecated_name="run_consistency_group_tests",
245 help="Defines whether to run share group tests or not."),
Yogeshbdb88102015-09-29 23:41:02 -0400246 cfg.BoolOpt("run_replication_tests",
247 default=False,
248 help="Defines whether to run replication tests or not. "
249 "Enable this feature if the driver is configured "
250 "for replication."),
zhaohua46366492016-06-20 17:51:47 +0800251 cfg.BoolOpt("run_multiple_share_replicas_tests",
252 default=True,
253 help="Defines whether to run multiple replicas creation test "
254 "or not. Enable this if the driver can create more than "
255 "one replica for a share."),
Rodrigo Barbieri427bc052016-06-06 17:10:06 -0300256 cfg.BoolOpt("run_host_assisted_migration_tests",
257 deprecated_name="run_migration_tests",
Rodrigo Barbieri2aafa262015-09-09 15:52:16 -0300258 default=False,
Rodrigo Barbieri427bc052016-06-06 17:10:06 -0300259 help="Enable or disable host-assisted migration tests."),
260 cfg.BoolOpt("run_driver_assisted_migration_tests",
261 deprecated_name="run_migration_tests",
262 default=False,
263 help="Enable or disable driver-assisted migration tests."),
yogeshf5bc6532016-10-25 14:57:11 -0400264 cfg.BoolOpt("run_migration_with_preserve_snapshots_tests",
265 default=False,
266 help="Enable or disable migration with "
267 "preserve_snapshots tests set to True."),
Kiran Pawaredd82c72022-05-07 14:48:36 +0000268 cfg.BoolOpt("run_driver_assisted_backup_tests",
269 default=False,
270 help="Enable or disable share backup tests."),
Xing Yang69b00b52015-11-22 16:10:44 -0500271 cfg.BoolOpt("run_manage_unmanage_tests",
272 default=False,
273 help="Defines whether to run manage/unmanage tests or not. "
274 "These test may leave orphaned resources, so be careful "
275 "enabling this opt."),
276 cfg.BoolOpt("run_manage_unmanage_snapshot_tests",
277 default=False,
278 help="Defines whether to run manage/unmanage snapshot tests "
279 "or not. These tests may leave orphaned resources, so be "
280 "careful enabling this opt."),
tpsilva6c776542016-07-08 14:41:35 -0300281 cfg.BoolOpt("run_mount_snapshot_tests",
282 default=False,
283 help="Enable or disable mountable snapshot tests."),
andrebeltrami3b4d4852020-02-04 19:11:54 +0000284 cfg.BoolOpt("run_create_share_from_snapshot_in_another_pool_or_az_tests",
285 default=False,
286 help="Defines whether to run tests that create share from "
287 "snapshots in another pool or az. Enable this "
288 "option if the used driver supports it."),
debeltramib3089a72020-09-15 21:06:04 +0000289 cfg.BoolOpt("run_share_server_migration_tests",
debeltrami0d523bb2020-08-20 12:48:49 +0000290 default=False,
291 help="Defines whether to run share servers migration tests. "
292 "Enable this option if the used driver supports it."),
Andrec1a3c0e2022-01-29 14:46:53 +0000293 cfg.BoolOpt("run_share_server_multiple_subnet_tests",
294 default=False,
295 help="Defines whether to run the share server multiple "
296 "subnets tests. Enable this option if the used driver "
297 "supports it."),
298 cfg.BoolOpt("run_network_allocation_update_tests",
299 default=False,
300 help="Defines whether to run the network allocation update "
301 "tests. Enable this option if the used driver "
302 "supports it."),
Valeriy Ponomaryovad55dc52015-09-23 13:54:00 +0300303
Marc Koderer0abc93b2015-07-15 09:18:35 +0200304 cfg.StrOpt("image_with_share_tools",
Alexey Ovchinnikovb535a5b2016-09-22 10:20:58 +0300305 default="manila-service-image-master",
Marc Koderer0abc93b2015-07-15 09:18:35 +0200306 help="Image name for vm booting with nfs/smb clients tool."),
307 cfg.StrOpt("image_username",
308 default="manila",
309 help="Image username."),
310 cfg.StrOpt("image_password",
311 help="Image password. Should be used for "
312 "'image_with_share_tools' without Nova Metadata support."),
313 cfg.StrOpt("client_vm_flavor_ref",
314 default="100",
315 help="Flavor used for client vm in scenario tests."),
Rodrigo Barbierib7137ad2015-09-06 22:53:16 -0300316 cfg.IntOpt("migration_timeout",
Rodrigo Barbierie3305122016-02-03 14:32:24 -0200317 default=1500,
Rodrigo Barbierib7137ad2015-09-06 22:53:16 -0300318 help="Time to wait for share migration before "
319 "timing out (seconds)."),
Kiran Pawaredd82c72022-05-07 14:48:36 +0000320 cfg.IntOpt("share_backup_timeout",
321 default=1500,
322 help="Time to wait for share backup before "
323 "timing out (seconds)."),
debeltrami0d523bb2020-08-20 12:48:49 +0000324 cfg.IntOpt("share_server_migration_timeout",
325 default="1500",
326 help="Time to wait for share server migration before "
327 "timing out (seconds)."),
Julia Varlamovad10a4a92015-08-31 06:28:28 -0400328 cfg.StrOpt("default_share_type_name",
Julia Varlamovad10a4a92015-08-31 06:28:28 -0400329 help="Default share type name to use in tempest tests."),
Yogeshbdb88102015-09-29 23:41:02 -0400330 cfg.StrOpt("backend_replication_type",
331 default='none',
332 choices=['none', 'writable', 'readable', 'dr'],
333 help="Specify the replication type supported by the backend."),
marcusvrne0d7cfd2016-06-24 12:27:55 -0300334 cfg.IntOpt("share_size",
335 default=1,
336 help="Default size in GB for shares created by share tests."),
Volodymyr Boikocaf8b902024-06-06 08:29:30 +0300337 cfg.IntOpt("additional_overflow_blocks",
338 default=0,
339 help="Additional blocks to be written "
340 "to share in scenario tests."),
341 cfg.IntOpt("share_resize_sync_delay",
342 default=0,
343 help="Time to wait before the changes to the share size"
344 " are propagated to the storage system."),
345 cfg.IntOpt("share_growth_size",
346 default=1,
347 help="The default increase in size sought by tests"
348 " when validating share resizing within scenario tests."),
Rodrigo Barbieri797257e2017-11-21 11:00:45 -0200349 cfg.BoolOpt("run_ipv6_tests",
350 default=False,
Goutham Pacha Ravi2b308742020-08-20 23:47:11 -0700351 help="Enable or disable running IPv6 NFS scenario tests. "
352 "These tests validate that IPv6 export locations work, "
353 "and that access can be provided to IPv6 clients. When "
354 "you do not specify a storage_network, the tests will "
355 "attempt to create an IPv6 subnet on the project network "
356 "they create for ping and SSH to the client test VM "
357 "where data path testing is performed."),
lkuchlan192d4082023-09-07 13:44:31 +0300358 cfg.StrOpt("dd_input_file",
359 default="/dev/zero",
360 help="The input file (if) in the dd command specifies the "
361 "source of data that dd will read and process, which can "
362 "be a device, a regular file, or even standard input "
363 "(stdin). dd copies, transforms, or performs actions on "
364 "this data based on provided options and then writes it "
365 "to an output file or device (of). When using /dev/zero "
366 "in storage systems with default compression, although "
367 "it generates highly compressible null bytes (zeros), "
368 "writing data from /dev/zero might not yield significant "
369 "space savings as these systems are already optimized for "
370 "efficient compression."),
Kiran Pawaredd82c72022-05-07 14:48:36 +0000371 cfg.DictOpt("driver_assisted_backup_test_driver_options",
372 default={'dummy': True},
373 help="Share backup driver options specified as dict."),
Marc Koderer0abc93b2015-07-15 09:18:35 +0200374]