blob: e0e8ea39cb981df5f754de1ffb990d73dfcc3a68 [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
16from __future__ import print_function
17
18from oslo_config import cfg
19
Nishant Kumar02278302016-10-01 12:50:39 +053020service_option = cfg.BoolOpt("manila",
21 default=True,
22 help="Whether or not manila is expected to be "
23 "available")
Marc Koderer0abc93b2015-07-15 09:18:35 +020024
25share_group = cfg.OptGroup(name="share", title="Share Service Options")
26
27ShareGroup = [
28 cfg.StrOpt("min_api_microversion",
Clinton Knighte5c8f092015-08-27 15:00:23 -040029 default="2.0",
Marc Koderer0abc93b2015-07-15 09:18:35 +020030 help="The minimum api microversion is configured to be the "
31 "value of the minimum microversion supported by Manila."),
32 cfg.StrOpt("max_api_microversion",
Douglas Viroelb7e27e72019-08-06 19:40:37 -030033 default="2.51",
Marc Koderer0abc93b2015-07-15 09:18:35 +020034 help="The maximum api microversion is configured to be the "
35 "value of the latest microversion supported by Manila."),
36 cfg.StrOpt("region",
37 default="",
38 help="The share region name to use. If empty, the value "
39 "of identity.region is used instead. If no such region "
40 "is found in the service catalog, the first found one is "
41 "used."),
42 cfg.StrOpt("catalog_type",
43 default="share",
44 help="Catalog type of the Share service."),
45 cfg.StrOpt('endpoint_type',
46 default='publicURL',
47 choices=['public', 'admin', 'internal',
48 'publicURL', 'adminURL', 'internalURL'],
49 help="The endpoint type to use for the share service."),
50 cfg.BoolOpt("multitenancy_enabled",
51 default=True,
52 help="This option used to determine backend driver type, "
53 "multitenant driver uses share-networks, but "
54 "single-tenant doesn't."),
Valeriy Ponomaryovc5dae272016-06-10 18:29:24 +030055 cfg.BoolOpt("create_networks_when_multitenancy_enabled",
56 default=True,
57 help="This option is used only when other "
58 "'multitenancy_enabled' option is set to 'True'. "
59 "If this one is set to True, then tempest will create "
60 "neutron networks for each new manila share-network "
61 "it creates. Else it will use manila share-networks with "
62 "empty values (case of StandAloneNetworkPlugin and "
63 "NeutronSingleNetworkPlugin)."),
Marc Koderer0abc93b2015-07-15 09:18:35 +020064 cfg.ListOpt("enable_protocols",
65 default=["nfs", "cifs"],
66 help="First value of list is protocol by default, "
67 "items of list show enabled protocols at all."),
68 cfg.ListOpt("enable_ip_rules_for_protocols",
69 default=["nfs", "cifs", ],
70 help="Selection of protocols, that should "
71 "be covered with ip rule tests"),
72 cfg.ListOpt("enable_user_rules_for_protocols",
73 default=[],
74 help="Selection of protocols, that should "
75 "be covered with user rule tests"),
76 cfg.ListOpt("enable_cert_rules_for_protocols",
77 default=["glusterfs", ],
78 help="Protocols that should be covered with cert rule tests."),
John Spray061b1452015-11-18 13:15:32 +000079 cfg.ListOpt("enable_cephx_rules_for_protocols",
80 default=["cephfs", ],
81 help="Protocols to be covered with cephx rule tests."),
Marc Koderer0abc93b2015-07-15 09:18:35 +020082 cfg.StrOpt("username_for_user_rules",
83 default="Administrator",
84 help="Username, that will be used in user tests."),
Rodrigo Barbieri797257e2017-11-21 11:00:45 -020085 cfg.StrOpt("override_ip_for_nfs_access",
86 help="Forces access rules to be as specified on NFS scenario"
87 " tests. This can used for working around multiple "
88 "NATs between the VMs and the storage controller."),
Goutham Pacha Ravi37ee6772019-10-18 12:53:22 -070089 cfg.StrOpt("storage_network",
90 help="Name or UUID of a neutron network that is used to access "
91 "shared file systems over. If specified, test virtual "
92 "machines are created with two NICs, the primary NIC is "
93 "attached to the private project network and the "
94 "secondary NIC is attached to the specified storage "
95 "network. If using NFS, access control is done with the "
96 "help of the IP address assigned to the virtual machine's "
97 "storage network NIC."),
Marc Koderer0abc93b2015-07-15 09:18:35 +020098 cfg.ListOpt("enable_ro_access_level_for_protocols",
99 default=["nfs", ],
100 help="List of protocols to run tests with ro access level."),
Valeriy Ponomaryovad55dc52015-09-23 13:54:00 +0300101
102 # Capabilities
103 cfg.StrOpt("capability_storage_protocol",
104 deprecated_name="storage_protocol",
Marc Koderer0abc93b2015-07-15 09:18:35 +0200105 default="NFS_CIFS",
106 help="Backend protocol to target when creating volume types."),
Valeriy Ponomaryovad55dc52015-09-23 13:54:00 +0300107 cfg.BoolOpt("capability_snapshot_support",
108 help="Defines extra spec that satisfies specific back end "
109 "capability called 'snapshot_support' and will be used "
110 "for setting up custom share type. Defaults to value of "
111 "other config option 'run_snapshot_tests'."),
Clinton Knight4699a8c2016-08-16 22:36:13 -0400112 cfg.BoolOpt("capability_create_share_from_snapshot_support",
113 help="Defines extra spec that satisfies specific back end "
114 "capability called 'create_share_from_snapshot_support' "
115 "and will be used for setting up a custom share type. "
116 "Defaults to the value of run_snapshot_tests. Set it to "
117 "False if the driver being tested does not support "
118 "creating shares from snapshots."),
Clinton Knight7f16b8c2016-06-08 13:46:51 -0700119 cfg.BoolOpt("capability_revert_to_snapshot_support",
Rodrigo Barbieri1a1b91a2017-02-01 10:15:41 -0200120 deprecated_for_removal=True,
121 deprecated_reason="Redundant configuration option. Please use "
122 "'run_revert_to_snapshot_tests' config "
123 "option instead.",
Clinton Knight7f16b8c2016-06-08 13:46:51 -0700124 help="Defines extra spec that satisfies specific back end "
125 "capability called 'revert_to_snapshot_support' "
126 "and will be used for setting up custom share type. "
127 "Defaults to the value of run_revert_to_snapshot_tests."),
Valeriy Ponomaryov3c188932017-03-15 19:06:23 +0300128 cfg.StrOpt("capability_sg_consistent_snapshot_support",
129 choices=["host", "pool", None],
130 help="Backend capability to create consistent snapshots of "
131 "share group members. Will be used with creation "
132 "of new share group types as group spec."),
Marc Koderer0abc93b2015-07-15 09:18:35 +0200133 cfg.StrOpt("share_network_id",
134 default="",
135 help="Some backend drivers requires share network "
136 "for share creation. Share network id, that will be "
Goutham Pacha Ravi90c354b2019-06-12 13:18:51 -0700137 "used for shares. If not set, it won't be used. Setting "
138 "this option to a valid share network ID will mean that "
139 "the value of create_networks_when_multitenancy_enabled "
140 "should be False."),
Marc Koderer0abc93b2015-07-15 09:18:35 +0200141 cfg.StrOpt("alt_share_network_id",
142 default="",
143 help="Share network id, that will be used for shares"
Goutham Pacha Ravi90c354b2019-06-12 13:18:51 -0700144 " in alt tenant. If not set, it won't be used. Setting "
145 "this option to a valid share network ID will mean that "
146 "the value of create_networks_when_multitenancy_enabled "
147 "should be False."),
Marc Koderer0abc93b2015-07-15 09:18:35 +0200148 cfg.StrOpt("admin_share_network_id",
149 default="",
150 help="Share network id, that will be used for shares"
Goutham Pacha Ravi90c354b2019-06-12 13:18:51 -0700151 " in admin tenant. If not set, it won't be used. Setting "
152 "this option to a valid share network ID will mean that "
153 "the value of create_networks_when_multitenancy_enabled "
154 "should be False."),
Marc Koderer0abc93b2015-07-15 09:18:35 +0200155 cfg.BoolOpt("multi_backend",
156 default=False,
157 help="Runs Manila multi-backend tests."),
158 cfg.ListOpt("backend_names",
159 default=[],
160 help="Names of share backends, that will be used with "
161 "multibackend tests. Tempest will use first two values."),
162 cfg.IntOpt("share_creation_retry_number",
163 default=0,
164 help="Defines number of retries for share creation. "
165 "It is useful to avoid failures caused by unstable "
166 "environment."),
167 cfg.IntOpt("build_interval",
168 default=3,
169 help="Time in seconds between share availability checks."),
170 cfg.IntOpt("build_timeout",
171 default=500,
172 help="Timeout in seconds to wait for a share to become"
173 "available."),
174 cfg.BoolOpt("suppress_errors_in_cleanup",
175 default=False,
176 help="Whether to suppress errors with clean up operation "
177 "or not. There are cases when we may want to skip "
178 "such errors and catch only test errors."),
Valeriy Ponomaryovad55dc52015-09-23 13:54:00 +0300179
180 # Switching ON/OFF test suites filtered by features
Valeriy Ponomaryov9e56c992016-02-17 21:19:39 +0200181 cfg.BoolOpt("run_quota_tests",
182 default=True,
183 help="Defines whether to run quota tests or not."),
Marc Koderer0abc93b2015-07-15 09:18:35 +0200184 cfg.BoolOpt("run_extend_tests",
185 default=True,
186 help="Defines whether to run share extend tests or not. "
187 "Disable this feature if used driver doesn't "
188 "support it."),
189 cfg.BoolOpt("run_shrink_tests",
190 default=True,
191 help="Defines whether to run share shrink tests or not. "
192 "Disable this feature if used driver doesn't "
193 "support it."),
194 cfg.BoolOpt("run_snapshot_tests",
195 default=True,
196 help="Defines whether to run tests that use share snapshots "
197 "or not. Disable this feature if used driver doesn't "
198 "support it."),
Clinton Knight7f16b8c2016-06-08 13:46:51 -0700199 cfg.BoolOpt("run_revert_to_snapshot_tests",
200 default=False,
201 help="Defines whether to run tests that revert shares "
202 "to snapshots or not. Enable this feature if used "
203 "driver supports it."),
Andrew Kerrb8436922016-06-01 15:32:43 -0400204 cfg.BoolOpt("run_share_group_tests",
205 default=True,
206 deprecated_name="run_consistency_group_tests",
207 help="Defines whether to run share group tests or not."),
Yogeshbdb88102015-09-29 23:41:02 -0400208 cfg.BoolOpt("run_replication_tests",
209 default=False,
210 help="Defines whether to run replication tests or not. "
211 "Enable this feature if the driver is configured "
212 "for replication."),
zhaohua46366492016-06-20 17:51:47 +0800213 cfg.BoolOpt("run_multiple_share_replicas_tests",
214 default=True,
215 help="Defines whether to run multiple replicas creation test "
216 "or not. Enable this if the driver can create more than "
217 "one replica for a share."),
Rodrigo Barbieri427bc052016-06-06 17:10:06 -0300218 cfg.BoolOpt("run_host_assisted_migration_tests",
219 deprecated_name="run_migration_tests",
Rodrigo Barbieri2aafa262015-09-09 15:52:16 -0300220 default=False,
Rodrigo Barbieri427bc052016-06-06 17:10:06 -0300221 help="Enable or disable host-assisted migration tests."),
222 cfg.BoolOpt("run_driver_assisted_migration_tests",
223 deprecated_name="run_migration_tests",
224 default=False,
225 help="Enable or disable driver-assisted migration tests."),
yogeshf5bc6532016-10-25 14:57:11 -0400226 cfg.BoolOpt("run_migration_with_preserve_snapshots_tests",
227 default=False,
228 help="Enable or disable migration with "
229 "preserve_snapshots tests set to True."),
Xing Yang69b00b52015-11-22 16:10:44 -0500230 cfg.BoolOpt("run_manage_unmanage_tests",
231 default=False,
232 help="Defines whether to run manage/unmanage tests or not. "
233 "These test may leave orphaned resources, so be careful "
234 "enabling this opt."),
235 cfg.BoolOpt("run_manage_unmanage_snapshot_tests",
236 default=False,
237 help="Defines whether to run manage/unmanage snapshot tests "
238 "or not. These tests may leave orphaned resources, so be "
239 "careful enabling this opt."),
tpsilva6c776542016-07-08 14:41:35 -0300240 cfg.BoolOpt("run_mount_snapshot_tests",
241 default=False,
242 help="Enable or disable mountable snapshot tests."),
Valeriy Ponomaryovad55dc52015-09-23 13:54:00 +0300243
Marc Koderer0abc93b2015-07-15 09:18:35 +0200244 cfg.StrOpt("image_with_share_tools",
Alexey Ovchinnikovb535a5b2016-09-22 10:20:58 +0300245 default="manila-service-image-master",
Marc Koderer0abc93b2015-07-15 09:18:35 +0200246 help="Image name for vm booting with nfs/smb clients tool."),
247 cfg.StrOpt("image_username",
248 default="manila",
249 help="Image username."),
250 cfg.StrOpt("image_password",
251 help="Image password. Should be used for "
252 "'image_with_share_tools' without Nova Metadata support."),
253 cfg.StrOpt("client_vm_flavor_ref",
254 default="100",
255 help="Flavor used for client vm in scenario tests."),
Rodrigo Barbierib7137ad2015-09-06 22:53:16 -0300256 cfg.IntOpt("migration_timeout",
Rodrigo Barbierie3305122016-02-03 14:32:24 -0200257 default=1500,
Rodrigo Barbierib7137ad2015-09-06 22:53:16 -0300258 help="Time to wait for share migration before "
259 "timing out (seconds)."),
Julia Varlamovad10a4a92015-08-31 06:28:28 -0400260 cfg.StrOpt("default_share_type_name",
Julia Varlamovad10a4a92015-08-31 06:28:28 -0400261 help="Default share type name to use in tempest tests."),
Yogeshbdb88102015-09-29 23:41:02 -0400262 cfg.StrOpt("backend_replication_type",
263 default='none',
264 choices=['none', 'writable', 'readable', 'dr'],
265 help="Specify the replication type supported by the backend."),
marcusvrne0d7cfd2016-06-24 12:27:55 -0300266 cfg.IntOpt("share_size",
267 default=1,
268 help="Default size in GB for shares created by share tests."),
Rodrigo Barbieri797257e2017-11-21 11:00:45 -0200269 cfg.BoolOpt("run_ipv6_tests",
270 default=False,
271 help="Enable or disable running IPv6 tests."),
272
Marc Koderer0abc93b2015-07-15 09:18:35 +0200273]