blob: 7a7ee6f2114e2d5909865a677d6d5223ff8cc408 [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
Marc Koderer0abc93b2015-07-15 09:18:35 +020020service_available_group = cfg.OptGroup(name="service_available",
21 title="Available OpenStack Services")
22
23ServiceAvailableGroup = [
24 cfg.BoolOpt("manila",
25 default=True,
26 help="Whether or not manila is expected to be available"),
27]
28
29share_group = cfg.OptGroup(name="share", title="Share Service Options")
30
31ShareGroup = [
32 cfg.StrOpt("min_api_microversion",
Clinton Knighte5c8f092015-08-27 15:00:23 -040033 default="2.0",
Marc Koderer0abc93b2015-07-15 09:18:35 +020034 help="The minimum api microversion is configured to be the "
35 "value of the minimum microversion supported by Manila."),
36 cfg.StrOpt("max_api_microversion",
Jay Xu4e2759e2016-04-18 04:07:27 -040037 default="2.18",
Marc Koderer0abc93b2015-07-15 09:18:35 +020038 help="The maximum api microversion is configured to be the "
39 "value of the latest microversion supported by Manila."),
40 cfg.StrOpt("region",
41 default="",
42 help="The share region name to use. If empty, the value "
43 "of identity.region is used instead. If no such region "
44 "is found in the service catalog, the first found one is "
45 "used."),
46 cfg.StrOpt("catalog_type",
47 default="share",
48 help="Catalog type of the Share service."),
49 cfg.StrOpt('endpoint_type',
50 default='publicURL',
51 choices=['public', 'admin', 'internal',
52 'publicURL', 'adminURL', 'internalURL'],
53 help="The endpoint type to use for the share service."),
54 cfg.BoolOpt("multitenancy_enabled",
55 default=True,
56 help="This option used to determine backend driver type, "
57 "multitenant driver uses share-networks, but "
58 "single-tenant doesn't."),
59 cfg.ListOpt("enable_protocols",
60 default=["nfs", "cifs"],
61 help="First value of list is protocol by default, "
62 "items of list show enabled protocols at all."),
63 cfg.ListOpt("enable_ip_rules_for_protocols",
64 default=["nfs", "cifs", ],
65 help="Selection of protocols, that should "
66 "be covered with ip rule tests"),
67 cfg.ListOpt("enable_user_rules_for_protocols",
68 default=[],
69 help="Selection of protocols, that should "
70 "be covered with user rule tests"),
71 cfg.ListOpt("enable_cert_rules_for_protocols",
72 default=["glusterfs", ],
73 help="Protocols that should be covered with cert rule tests."),
John Spray061b1452015-11-18 13:15:32 +000074 cfg.ListOpt("enable_cephx_rules_for_protocols",
75 default=["cephfs", ],
76 help="Protocols to be covered with cephx rule tests."),
Marc Koderer0abc93b2015-07-15 09:18:35 +020077 cfg.StrOpt("username_for_user_rules",
78 default="Administrator",
79 help="Username, that will be used in user tests."),
80 cfg.ListOpt("enable_ro_access_level_for_protocols",
81 default=["nfs", ],
82 help="List of protocols to run tests with ro access level."),
Valeriy Ponomaryovad55dc52015-09-23 13:54:00 +030083
84 # Capabilities
85 cfg.StrOpt("capability_storage_protocol",
86 deprecated_name="storage_protocol",
Marc Koderer0abc93b2015-07-15 09:18:35 +020087 default="NFS_CIFS",
88 help="Backend protocol to target when creating volume types."),
Valeriy Ponomaryovad55dc52015-09-23 13:54:00 +030089 cfg.BoolOpt("capability_snapshot_support",
90 help="Defines extra spec that satisfies specific back end "
91 "capability called 'snapshot_support' and will be used "
92 "for setting up custom share type. Defaults to value of "
93 "other config option 'run_snapshot_tests'."),
94
Marc Koderer0abc93b2015-07-15 09:18:35 +020095 cfg.StrOpt("share_network_id",
96 default="",
97 help="Some backend drivers requires share network "
98 "for share creation. Share network id, that will be "
99 "used for shares. If not set, it won't be used."),
100 cfg.StrOpt("alt_share_network_id",
101 default="",
102 help="Share network id, that will be used for shares"
103 " in alt tenant. If not set, it won't be used"),
104 cfg.StrOpt("admin_share_network_id",
105 default="",
106 help="Share network id, that will be used for shares"
107 " in admin tenant. If not set, it won't be used"),
108 cfg.BoolOpt("multi_backend",
109 default=False,
110 help="Runs Manila multi-backend tests."),
111 cfg.ListOpt("backend_names",
112 default=[],
113 help="Names of share backends, that will be used with "
114 "multibackend tests. Tempest will use first two values."),
115 cfg.IntOpt("share_creation_retry_number",
116 default=0,
117 help="Defines number of retries for share creation. "
118 "It is useful to avoid failures caused by unstable "
119 "environment."),
120 cfg.IntOpt("build_interval",
121 default=3,
122 help="Time in seconds between share availability checks."),
123 cfg.IntOpt("build_timeout",
124 default=500,
125 help="Timeout in seconds to wait for a share to become"
126 "available."),
127 cfg.BoolOpt("suppress_errors_in_cleanup",
128 default=False,
129 help="Whether to suppress errors with clean up operation "
130 "or not. There are cases when we may want to skip "
131 "such errors and catch only test errors."),
Valeriy Ponomaryovad55dc52015-09-23 13:54:00 +0300132
133 # Switching ON/OFF test suites filtered by features
Valeriy Ponomaryov9e56c992016-02-17 21:19:39 +0200134 cfg.BoolOpt("run_quota_tests",
135 default=True,
136 help="Defines whether to run quota tests or not."),
Marc Koderer0abc93b2015-07-15 09:18:35 +0200137 cfg.BoolOpt("run_extend_tests",
138 default=True,
139 help="Defines whether to run share extend tests or not. "
140 "Disable this feature if used driver doesn't "
141 "support it."),
142 cfg.BoolOpt("run_shrink_tests",
143 default=True,
144 help="Defines whether to run share shrink tests or not. "
145 "Disable this feature if used driver doesn't "
146 "support it."),
147 cfg.BoolOpt("run_snapshot_tests",
148 default=True,
149 help="Defines whether to run tests that use share snapshots "
150 "or not. Disable this feature if used driver doesn't "
151 "support it."),
Andrew Kerrbf31e912015-07-29 10:39:38 -0400152 cfg.BoolOpt("run_consistency_group_tests",
153 default=True,
154 help="Defines whether to run consistency group tests or not. "
155 "Disable this feature if used driver doesn't support "
156 "it."),
Yogeshbdb88102015-09-29 23:41:02 -0400157 cfg.BoolOpt("run_replication_tests",
158 default=False,
159 help="Defines whether to run replication tests or not. "
160 "Enable this feature if the driver is configured "
161 "for replication."),
Rodrigo Barbieri2aafa262015-09-09 15:52:16 -0300162 cfg.BoolOpt("run_migration_tests",
163 default=False,
164 help="Enable or disable migration tests."),
Xing Yang69b00b52015-11-22 16:10:44 -0500165 cfg.BoolOpt("run_manage_unmanage_tests",
166 default=False,
167 help="Defines whether to run manage/unmanage tests or not. "
168 "These test may leave orphaned resources, so be careful "
169 "enabling this opt."),
170 cfg.BoolOpt("run_manage_unmanage_snapshot_tests",
171 default=False,
172 help="Defines whether to run manage/unmanage snapshot tests "
173 "or not. These tests may leave orphaned resources, so be "
174 "careful enabling this opt."),
Valeriy Ponomaryovad55dc52015-09-23 13:54:00 +0300175
Marc Koderer0abc93b2015-07-15 09:18:35 +0200176 cfg.StrOpt("image_with_share_tools",
177 default="manila-service-image",
178 help="Image name for vm booting with nfs/smb clients tool."),
179 cfg.StrOpt("image_username",
180 default="manila",
181 help="Image username."),
182 cfg.StrOpt("image_password",
183 help="Image password. Should be used for "
184 "'image_with_share_tools' without Nova Metadata support."),
185 cfg.StrOpt("client_vm_flavor_ref",
186 default="100",
187 help="Flavor used for client vm in scenario tests."),
Rodrigo Barbierib7137ad2015-09-06 22:53:16 -0300188 cfg.IntOpt("migration_timeout",
Rodrigo Barbierie3305122016-02-03 14:32:24 -0200189 default=1500,
Rodrigo Barbierib7137ad2015-09-06 22:53:16 -0300190 help="Time to wait for share migration before "
191 "timing out (seconds)."),
Julia Varlamovad10a4a92015-08-31 06:28:28 -0400192 cfg.StrOpt("default_share_type_name",
Julia Varlamovad10a4a92015-08-31 06:28:28 -0400193 help="Default share type name to use in tempest tests."),
Yogeshbdb88102015-09-29 23:41:02 -0400194 cfg.StrOpt("backend_replication_type",
195 default='none',
196 choices=['none', 'writable', 'readable', 'dr'],
197 help="Specify the replication type supported by the backend."),
marcusvrne0d7cfd2016-06-24 12:27:55 -0300198 cfg.IntOpt("share_size",
199 default=1,
200 help="Default size in GB for shares created by share tests."),
Marc Koderer0abc93b2015-07-15 09:18:35 +0200201]