blob: 11631143d7b92b0b0ca6ff583c959ed3104a11af [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",
Clinton Knight7f16b8c2016-06-08 13:46:51 -070033 default="2.27",
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."),
85 cfg.ListOpt("enable_ro_access_level_for_protocols",
86 default=["nfs", ],
87 help="List of protocols to run tests with ro access level."),
Valeriy Ponomaryovad55dc52015-09-23 13:54:00 +030088
89 # Capabilities
90 cfg.StrOpt("capability_storage_protocol",
91 deprecated_name="storage_protocol",
Marc Koderer0abc93b2015-07-15 09:18:35 +020092 default="NFS_CIFS",
93 help="Backend protocol to target when creating volume types."),
Valeriy Ponomaryovad55dc52015-09-23 13:54:00 +030094 cfg.BoolOpt("capability_snapshot_support",
95 help="Defines extra spec that satisfies specific back end "
96 "capability called 'snapshot_support' and will be used "
97 "for setting up custom share type. Defaults to value of "
98 "other config option 'run_snapshot_tests'."),
Clinton Knight4699a8c2016-08-16 22:36:13 -040099 cfg.BoolOpt("capability_create_share_from_snapshot_support",
100 help="Defines extra spec that satisfies specific back end "
101 "capability called 'create_share_from_snapshot_support' "
102 "and will be used for setting up a custom share type. "
103 "Defaults to the value of run_snapshot_tests. Set it to "
104 "False if the driver being tested does not support "
105 "creating shares from snapshots."),
Clinton Knight7f16b8c2016-06-08 13:46:51 -0700106 cfg.BoolOpt("capability_revert_to_snapshot_support",
107 help="Defines extra spec that satisfies specific back end "
108 "capability called 'revert_to_snapshot_support' "
109 "and will be used for setting up custom share type. "
110 "Defaults to the value of run_revert_to_snapshot_tests."),
Marc Koderer0abc93b2015-07-15 09:18:35 +0200111 cfg.StrOpt("share_network_id",
112 default="",
113 help="Some backend drivers requires share network "
114 "for share creation. Share network id, that will be "
115 "used for shares. If not set, it won't be used."),
116 cfg.StrOpt("alt_share_network_id",
117 default="",
118 help="Share network id, that will be used for shares"
119 " in alt tenant. If not set, it won't be used"),
120 cfg.StrOpt("admin_share_network_id",
121 default="",
122 help="Share network id, that will be used for shares"
123 " in admin tenant. If not set, it won't be used"),
124 cfg.BoolOpt("multi_backend",
125 default=False,
126 help="Runs Manila multi-backend tests."),
127 cfg.ListOpt("backend_names",
128 default=[],
129 help="Names of share backends, that will be used with "
130 "multibackend tests. Tempest will use first two values."),
131 cfg.IntOpt("share_creation_retry_number",
132 default=0,
133 help="Defines number of retries for share creation. "
134 "It is useful to avoid failures caused by unstable "
135 "environment."),
136 cfg.IntOpt("build_interval",
137 default=3,
138 help="Time in seconds between share availability checks."),
139 cfg.IntOpt("build_timeout",
140 default=500,
141 help="Timeout in seconds to wait for a share to become"
142 "available."),
143 cfg.BoolOpt("suppress_errors_in_cleanup",
144 default=False,
145 help="Whether to suppress errors with clean up operation "
146 "or not. There are cases when we may want to skip "
147 "such errors and catch only test errors."),
Valeriy Ponomaryovad55dc52015-09-23 13:54:00 +0300148
149 # Switching ON/OFF test suites filtered by features
Valeriy Ponomaryov9e56c992016-02-17 21:19:39 +0200150 cfg.BoolOpt("run_quota_tests",
151 default=True,
152 help="Defines whether to run quota tests or not."),
Marc Koderer0abc93b2015-07-15 09:18:35 +0200153 cfg.BoolOpt("run_extend_tests",
154 default=True,
155 help="Defines whether to run share extend tests or not. "
156 "Disable this feature if used driver doesn't "
157 "support it."),
158 cfg.BoolOpt("run_shrink_tests",
159 default=True,
160 help="Defines whether to run share shrink tests or not. "
161 "Disable this feature if used driver doesn't "
162 "support it."),
163 cfg.BoolOpt("run_snapshot_tests",
164 default=True,
165 help="Defines whether to run tests that use share snapshots "
166 "or not. Disable this feature if used driver doesn't "
167 "support it."),
Clinton Knight7f16b8c2016-06-08 13:46:51 -0700168 cfg.BoolOpt("run_revert_to_snapshot_tests",
169 default=False,
170 help="Defines whether to run tests that revert shares "
171 "to snapshots or not. Enable this feature if used "
172 "driver supports it."),
Andrew Kerrbf31e912015-07-29 10:39:38 -0400173 cfg.BoolOpt("run_consistency_group_tests",
174 default=True,
175 help="Defines whether to run consistency group tests or not. "
176 "Disable this feature if used driver doesn't support "
177 "it."),
Yogeshbdb88102015-09-29 23:41:02 -0400178 cfg.BoolOpt("run_replication_tests",
179 default=False,
180 help="Defines whether to run replication tests or not. "
181 "Enable this feature if the driver is configured "
182 "for replication."),
zhaohua46366492016-06-20 17:51:47 +0800183 cfg.BoolOpt("run_multiple_share_replicas_tests",
184 default=True,
185 help="Defines whether to run multiple replicas creation test "
186 "or not. Enable this if the driver can create more than "
187 "one replica for a share."),
Rodrigo Barbieri427bc052016-06-06 17:10:06 -0300188 cfg.BoolOpt("run_host_assisted_migration_tests",
189 deprecated_name="run_migration_tests",
Rodrigo Barbieri2aafa262015-09-09 15:52:16 -0300190 default=False,
Rodrigo Barbieri427bc052016-06-06 17:10:06 -0300191 help="Enable or disable host-assisted migration tests."),
192 cfg.BoolOpt("run_driver_assisted_migration_tests",
193 deprecated_name="run_migration_tests",
194 default=False,
195 help="Enable or disable driver-assisted migration tests."),
Xing Yang69b00b52015-11-22 16:10:44 -0500196 cfg.BoolOpt("run_manage_unmanage_tests",
197 default=False,
198 help="Defines whether to run manage/unmanage tests or not. "
199 "These test may leave orphaned resources, so be careful "
200 "enabling this opt."),
201 cfg.BoolOpt("run_manage_unmanage_snapshot_tests",
202 default=False,
203 help="Defines whether to run manage/unmanage snapshot tests "
204 "or not. These tests may leave orphaned resources, so be "
205 "careful enabling this opt."),
Valeriy Ponomaryovad55dc52015-09-23 13:54:00 +0300206
Marc Koderer0abc93b2015-07-15 09:18:35 +0200207 cfg.StrOpt("image_with_share_tools",
Alexey Ovchinnikovb535a5b2016-09-22 10:20:58 +0300208 default="manila-service-image-master",
Marc Koderer0abc93b2015-07-15 09:18:35 +0200209 help="Image name for vm booting with nfs/smb clients tool."),
210 cfg.StrOpt("image_username",
211 default="manila",
212 help="Image username."),
213 cfg.StrOpt("image_password",
214 help="Image password. Should be used for "
215 "'image_with_share_tools' without Nova Metadata support."),
216 cfg.StrOpt("client_vm_flavor_ref",
217 default="100",
218 help="Flavor used for client vm in scenario tests."),
Rodrigo Barbierib7137ad2015-09-06 22:53:16 -0300219 cfg.IntOpt("migration_timeout",
Rodrigo Barbierie3305122016-02-03 14:32:24 -0200220 default=1500,
Rodrigo Barbierib7137ad2015-09-06 22:53:16 -0300221 help="Time to wait for share migration before "
222 "timing out (seconds)."),
Julia Varlamovad10a4a92015-08-31 06:28:28 -0400223 cfg.StrOpt("default_share_type_name",
Julia Varlamovad10a4a92015-08-31 06:28:28 -0400224 help="Default share type name to use in tempest tests."),
Yogeshbdb88102015-09-29 23:41:02 -0400225 cfg.StrOpt("backend_replication_type",
226 default='none',
227 choices=['none', 'writable', 'readable', 'dr'],
228 help="Specify the replication type supported by the backend."),
marcusvrne0d7cfd2016-06-24 12:27:55 -0300229 cfg.IntOpt("share_size",
230 default=1,
231 help="Default size in GB for shares created by share tests."),
Marc Koderer0abc93b2015-07-15 09:18:35 +0200232]