blob: 18f4be5923b3449cef9972ca2bceb264d6c67a8a [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
17
Nishant Kumar02278302016-10-01 12:50:39 +053018service_option = cfg.BoolOpt("manila",
19 default=True,
20 help="Whether or not manila is expected to be "
21 "available")
Marc Koderer0abc93b2015-07-15 09:18:35 +020022
23share_group = cfg.OptGroup(name="share", title="Share Service Options")
24
25ShareGroup = [
26 cfg.StrOpt("min_api_microversion",
Clinton Knighte5c8f092015-08-27 15:00:23 -040027 default="2.0",
Marc Koderer0abc93b2015-07-15 09:18:35 +020028 help="The minimum api microversion is configured to be the "
29 "value of the minimum microversion supported by Manila."),
30 cfg.StrOpt("max_api_microversion",
silvacarloss6e575682020-02-18 19:52:35 -030031 default="2.55",
Marc Koderer0abc93b2015-07-15 09:18:35 +020032 help="The maximum api microversion is configured to be the "
33 "value of the latest microversion supported by Manila."),
34 cfg.StrOpt("region",
35 default="",
36 help="The share region name to use. If empty, the value "
37 "of identity.region is used instead. If no such region "
38 "is found in the service catalog, the first found one is "
39 "used."),
40 cfg.StrOpt("catalog_type",
41 default="share",
42 help="Catalog type of the Share service."),
43 cfg.StrOpt('endpoint_type',
44 default='publicURL',
45 choices=['public', 'admin', 'internal',
46 'publicURL', 'adminURL', 'internalURL'],
47 help="The endpoint type to use for the share service."),
48 cfg.BoolOpt("multitenancy_enabled",
49 default=True,
50 help="This option used to determine backend driver type, "
51 "multitenant driver uses share-networks, but "
52 "single-tenant doesn't."),
Valeriy Ponomaryovc5dae272016-06-10 18:29:24 +030053 cfg.BoolOpt("create_networks_when_multitenancy_enabled",
54 default=True,
55 help="This option is used only when other "
56 "'multitenancy_enabled' option is set to 'True'. "
57 "If this one is set to True, then tempest will create "
58 "neutron networks for each new manila share-network "
59 "it creates. Else it will use manila share-networks with "
60 "empty values (case of StandAloneNetworkPlugin and "
61 "NeutronSingleNetworkPlugin)."),
Marc Koderer0abc93b2015-07-15 09:18:35 +020062 cfg.ListOpt("enable_protocols",
63 default=["nfs", "cifs"],
64 help="First value of list is protocol by default, "
65 "items of list show enabled protocols at all."),
66 cfg.ListOpt("enable_ip_rules_for_protocols",
67 default=["nfs", "cifs", ],
68 help="Selection of protocols, that should "
69 "be covered with ip rule tests"),
70 cfg.ListOpt("enable_user_rules_for_protocols",
71 default=[],
72 help="Selection of protocols, that should "
73 "be covered with user rule tests"),
74 cfg.ListOpt("enable_cert_rules_for_protocols",
75 default=["glusterfs", ],
76 help="Protocols that should be covered with cert rule tests."),
John Spray061b1452015-11-18 13:15:32 +000077 cfg.ListOpt("enable_cephx_rules_for_protocols",
78 default=["cephfs", ],
79 help="Protocols to be covered with cephx rule tests."),
Marc Koderer0abc93b2015-07-15 09:18:35 +020080 cfg.StrOpt("username_for_user_rules",
81 default="Administrator",
82 help="Username, that will be used in user tests."),
Rodrigo Barbieri797257e2017-11-21 11:00:45 -020083 cfg.StrOpt("override_ip_for_nfs_access",
84 help="Forces access rules to be as specified on NFS scenario"
85 " tests. This can used for working around multiple "
86 "NATs between the VMs and the storage controller."),
Goutham Pacha Ravi37ee6772019-10-18 12:53:22 -070087 cfg.StrOpt("storage_network",
88 help="Name or UUID of a neutron network that is used to access "
89 "shared file systems over. If specified, test virtual "
90 "machines are created with two NICs, the primary NIC is "
91 "attached to the private project network and the "
92 "secondary NIC is attached to the specified storage "
93 "network. If using NFS, access control is done with the "
94 "help of the IP address assigned to the virtual machine's "
95 "storage network NIC."),
Marc Koderer0abc93b2015-07-15 09:18:35 +020096 cfg.ListOpt("enable_ro_access_level_for_protocols",
97 default=["nfs", ],
98 help="List of protocols to run tests with ro access level."),
Valeriy Ponomaryovad55dc52015-09-23 13:54:00 +030099
100 # Capabilities
101 cfg.StrOpt("capability_storage_protocol",
102 deprecated_name="storage_protocol",
Marc Koderer0abc93b2015-07-15 09:18:35 +0200103 default="NFS_CIFS",
104 help="Backend protocol to target when creating volume types."),
Valeriy Ponomaryovad55dc52015-09-23 13:54:00 +0300105 cfg.BoolOpt("capability_snapshot_support",
106 help="Defines extra spec that satisfies specific back end "
107 "capability called 'snapshot_support' and will be used "
108 "for setting up custom share type. Defaults to value of "
109 "other config option 'run_snapshot_tests'."),
Clinton Knight4699a8c2016-08-16 22:36:13 -0400110 cfg.BoolOpt("capability_create_share_from_snapshot_support",
111 help="Defines extra spec that satisfies specific back end "
112 "capability called 'create_share_from_snapshot_support' "
113 "and will be used for setting up a custom share type. "
114 "Defaults to the value of run_snapshot_tests. Set it to "
115 "False if the driver being tested does not support "
116 "creating shares from snapshots."),
Clinton Knight7f16b8c2016-06-08 13:46:51 -0700117 cfg.BoolOpt("capability_revert_to_snapshot_support",
Rodrigo Barbieri1a1b91a2017-02-01 10:15:41 -0200118 deprecated_for_removal=True,
119 deprecated_reason="Redundant configuration option. Please use "
120 "'run_revert_to_snapshot_tests' config "
121 "option instead.",
Clinton Knight7f16b8c2016-06-08 13:46:51 -0700122 help="Defines extra spec that satisfies specific back end "
123 "capability called 'revert_to_snapshot_support' "
124 "and will be used for setting up custom share type. "
125 "Defaults to the value of run_revert_to_snapshot_tests."),
Valeriy Ponomaryov3c188932017-03-15 19:06:23 +0300126 cfg.StrOpt("capability_sg_consistent_snapshot_support",
127 choices=["host", "pool", None],
128 help="Backend capability to create consistent snapshots of "
129 "share group members. Will be used with creation "
130 "of new share group types as group spec."),
Marc Koderer0abc93b2015-07-15 09:18:35 +0200131 cfg.StrOpt("share_network_id",
132 default="",
133 help="Some backend drivers requires share network "
134 "for share creation. Share network id, that will be "
Goutham Pacha Ravi90c354b2019-06-12 13:18:51 -0700135 "used for shares. If not set, it won't be used. Setting "
136 "this option to a valid share network ID will mean that "
137 "the value of create_networks_when_multitenancy_enabled "
138 "should be False."),
Marc Koderer0abc93b2015-07-15 09:18:35 +0200139 cfg.StrOpt("alt_share_network_id",
140 default="",
141 help="Share network id, that will be used for shares"
Goutham Pacha Ravi90c354b2019-06-12 13:18:51 -0700142 " in alt tenant. If not set, it won't be used. Setting "
143 "this option to a valid share network ID will mean that "
144 "the value of create_networks_when_multitenancy_enabled "
145 "should be False."),
Marc Koderer0abc93b2015-07-15 09:18:35 +0200146 cfg.StrOpt("admin_share_network_id",
147 default="",
148 help="Share network id, that will be used for shares"
Goutham Pacha Ravi90c354b2019-06-12 13:18:51 -0700149 " in admin tenant. If not set, it won't be used. Setting "
150 "this option to a valid share network ID will mean that "
151 "the value of create_networks_when_multitenancy_enabled "
152 "should be False."),
Marc Koderer0abc93b2015-07-15 09:18:35 +0200153 cfg.BoolOpt("multi_backend",
154 default=False,
155 help="Runs Manila multi-backend tests."),
156 cfg.ListOpt("backend_names",
157 default=[],
158 help="Names of share backends, that will be used with "
159 "multibackend tests. Tempest will use first two values."),
160 cfg.IntOpt("share_creation_retry_number",
161 default=0,
162 help="Defines number of retries for share creation. "
163 "It is useful to avoid failures caused by unstable "
164 "environment."),
165 cfg.IntOpt("build_interval",
166 default=3,
167 help="Time in seconds between share availability checks."),
168 cfg.IntOpt("build_timeout",
169 default=500,
170 help="Timeout in seconds to wait for a share to become"
171 "available."),
172 cfg.BoolOpt("suppress_errors_in_cleanup",
173 default=False,
174 help="Whether to suppress errors with clean up operation "
175 "or not. There are cases when we may want to skip "
176 "such errors and catch only test errors."),
Valeriy Ponomaryovad55dc52015-09-23 13:54:00 +0300177
178 # Switching ON/OFF test suites filtered by features
Valeriy Ponomaryov9e56c992016-02-17 21:19:39 +0200179 cfg.BoolOpt("run_quota_tests",
180 default=True,
181 help="Defines whether to run quota tests or not."),
Marc Koderer0abc93b2015-07-15 09:18:35 +0200182 cfg.BoolOpt("run_extend_tests",
183 default=True,
184 help="Defines whether to run share extend tests or not. "
185 "Disable this feature if used driver doesn't "
186 "support it."),
187 cfg.BoolOpt("run_shrink_tests",
188 default=True,
189 help="Defines whether to run share shrink tests or not. "
190 "Disable this feature if used driver doesn't "
191 "support it."),
192 cfg.BoolOpt("run_snapshot_tests",
193 default=True,
194 help="Defines whether to run tests that use share snapshots "
195 "or not. Disable this feature if used driver doesn't "
196 "support it."),
Clinton Knight7f16b8c2016-06-08 13:46:51 -0700197 cfg.BoolOpt("run_revert_to_snapshot_tests",
198 default=False,
199 help="Defines whether to run tests that revert shares "
200 "to snapshots or not. Enable this feature if used "
201 "driver supports it."),
Andrew Kerrb8436922016-06-01 15:32:43 -0400202 cfg.BoolOpt("run_share_group_tests",
203 default=True,
204 deprecated_name="run_consistency_group_tests",
205 help="Defines whether to run share group tests or not."),
Yogeshbdb88102015-09-29 23:41:02 -0400206 cfg.BoolOpt("run_replication_tests",
207 default=False,
208 help="Defines whether to run replication tests or not. "
209 "Enable this feature if the driver is configured "
210 "for replication."),
zhaohua46366492016-06-20 17:51:47 +0800211 cfg.BoolOpt("run_multiple_share_replicas_tests",
212 default=True,
213 help="Defines whether to run multiple replicas creation test "
214 "or not. Enable this if the driver can create more than "
215 "one replica for a share."),
Rodrigo Barbieri427bc052016-06-06 17:10:06 -0300216 cfg.BoolOpt("run_host_assisted_migration_tests",
217 deprecated_name="run_migration_tests",
Rodrigo Barbieri2aafa262015-09-09 15:52:16 -0300218 default=False,
Rodrigo Barbieri427bc052016-06-06 17:10:06 -0300219 help="Enable or disable host-assisted migration tests."),
220 cfg.BoolOpt("run_driver_assisted_migration_tests",
221 deprecated_name="run_migration_tests",
222 default=False,
223 help="Enable or disable driver-assisted migration tests."),
yogeshf5bc6532016-10-25 14:57:11 -0400224 cfg.BoolOpt("run_migration_with_preserve_snapshots_tests",
225 default=False,
226 help="Enable or disable migration with "
227 "preserve_snapshots tests set to True."),
Xing Yang69b00b52015-11-22 16:10:44 -0500228 cfg.BoolOpt("run_manage_unmanage_tests",
229 default=False,
230 help="Defines whether to run manage/unmanage tests or not. "
231 "These test may leave orphaned resources, so be careful "
232 "enabling this opt."),
233 cfg.BoolOpt("run_manage_unmanage_snapshot_tests",
234 default=False,
235 help="Defines whether to run manage/unmanage snapshot tests "
236 "or not. These tests may leave orphaned resources, so be "
237 "careful enabling this opt."),
tpsilva6c776542016-07-08 14:41:35 -0300238 cfg.BoolOpt("run_mount_snapshot_tests",
239 default=False,
240 help="Enable or disable mountable snapshot tests."),
andrebeltrami3b4d4852020-02-04 19:11:54 +0000241 cfg.BoolOpt("run_create_share_from_snapshot_in_another_pool_or_az_tests",
242 default=False,
243 help="Defines whether to run tests that create share from "
244 "snapshots in another pool or az. Enable this "
245 "option if the used driver supports it."),
Valeriy Ponomaryovad55dc52015-09-23 13:54:00 +0300246
Marc Koderer0abc93b2015-07-15 09:18:35 +0200247 cfg.StrOpt("image_with_share_tools",
Alexey Ovchinnikovb535a5b2016-09-22 10:20:58 +0300248 default="manila-service-image-master",
Marc Koderer0abc93b2015-07-15 09:18:35 +0200249 help="Image name for vm booting with nfs/smb clients tool."),
250 cfg.StrOpt("image_username",
251 default="manila",
252 help="Image username."),
253 cfg.StrOpt("image_password",
254 help="Image password. Should be used for "
255 "'image_with_share_tools' without Nova Metadata support."),
256 cfg.StrOpt("client_vm_flavor_ref",
257 default="100",
258 help="Flavor used for client vm in scenario tests."),
Rodrigo Barbierib7137ad2015-09-06 22:53:16 -0300259 cfg.IntOpt("migration_timeout",
Rodrigo Barbierie3305122016-02-03 14:32:24 -0200260 default=1500,
Rodrigo Barbierib7137ad2015-09-06 22:53:16 -0300261 help="Time to wait for share migration before "
262 "timing out (seconds)."),
Julia Varlamovad10a4a92015-08-31 06:28:28 -0400263 cfg.StrOpt("default_share_type_name",
Julia Varlamovad10a4a92015-08-31 06:28:28 -0400264 help="Default share type name to use in tempest tests."),
Yogeshbdb88102015-09-29 23:41:02 -0400265 cfg.StrOpt("backend_replication_type",
266 default='none',
267 choices=['none', 'writable', 'readable', 'dr'],
268 help="Specify the replication type supported by the backend."),
marcusvrne0d7cfd2016-06-24 12:27:55 -0300269 cfg.IntOpt("share_size",
270 default=1,
271 help="Default size in GB for shares created by share tests."),
Rodrigo Barbieri797257e2017-11-21 11:00:45 -0200272 cfg.BoolOpt("run_ipv6_tests",
273 default=False,
274 help="Enable or disable running IPv6 tests."),
275
Marc Koderer0abc93b2015-07-15 09:18:35 +0200276]