Marc Koderer | 0abc93b | 2015-07-15 09:18:35 +0200 | [diff] [blame] | 1 | # 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 | |
| 16 | from __future__ import print_function |
| 17 | |
| 18 | from oslo_config import cfg |
| 19 | |
Marc Koderer | 0abc93b | 2015-07-15 09:18:35 +0200 | [diff] [blame] | 20 | service_available_group = cfg.OptGroup(name="service_available", |
| 21 | title="Available OpenStack Services") |
| 22 | |
| 23 | ServiceAvailableGroup = [ |
| 24 | cfg.BoolOpt("manila", |
| 25 | default=True, |
| 26 | help="Whether or not manila is expected to be available"), |
| 27 | ] |
| 28 | |
| 29 | share_group = cfg.OptGroup(name="share", title="Share Service Options") |
| 30 | |
| 31 | ShareGroup = [ |
| 32 | cfg.StrOpt("min_api_microversion", |
Clinton Knight | e5c8f09 | 2015-08-27 15:00:23 -0400 | [diff] [blame] | 33 | default="2.0", |
Marc Koderer | 0abc93b | 2015-07-15 09:18:35 +0200 | [diff] [blame] | 34 | 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", |
Rodrigo Barbieri | 427bc05 | 2016-06-06 17:10:06 -0300 | [diff] [blame^] | 37 | default="2.22", |
Marc Koderer | 0abc93b | 2015-07-15 09:18:35 +0200 | [diff] [blame] | 38 | 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."), |
Valeriy Ponomaryov | c5dae27 | 2016-06-10 18:29:24 +0300 | [diff] [blame] | 59 | cfg.BoolOpt("create_networks_when_multitenancy_enabled", |
| 60 | default=True, |
| 61 | help="This option is used only when other " |
| 62 | "'multitenancy_enabled' option is set to 'True'. " |
| 63 | "If this one is set to True, then tempest will create " |
| 64 | "neutron networks for each new manila share-network " |
| 65 | "it creates. Else it will use manila share-networks with " |
| 66 | "empty values (case of StandAloneNetworkPlugin and " |
| 67 | "NeutronSingleNetworkPlugin)."), |
Marc Koderer | 0abc93b | 2015-07-15 09:18:35 +0200 | [diff] [blame] | 68 | cfg.ListOpt("enable_protocols", |
| 69 | default=["nfs", "cifs"], |
| 70 | help="First value of list is protocol by default, " |
| 71 | "items of list show enabled protocols at all."), |
| 72 | cfg.ListOpt("enable_ip_rules_for_protocols", |
| 73 | default=["nfs", "cifs", ], |
| 74 | help="Selection of protocols, that should " |
| 75 | "be covered with ip rule tests"), |
| 76 | cfg.ListOpt("enable_user_rules_for_protocols", |
| 77 | default=[], |
| 78 | help="Selection of protocols, that should " |
| 79 | "be covered with user rule tests"), |
| 80 | cfg.ListOpt("enable_cert_rules_for_protocols", |
| 81 | default=["glusterfs", ], |
| 82 | help="Protocols that should be covered with cert rule tests."), |
John Spray | 061b145 | 2015-11-18 13:15:32 +0000 | [diff] [blame] | 83 | cfg.ListOpt("enable_cephx_rules_for_protocols", |
| 84 | default=["cephfs", ], |
| 85 | help="Protocols to be covered with cephx rule tests."), |
Marc Koderer | 0abc93b | 2015-07-15 09:18:35 +0200 | [diff] [blame] | 86 | cfg.StrOpt("username_for_user_rules", |
| 87 | default="Administrator", |
| 88 | help="Username, that will be used in user tests."), |
| 89 | cfg.ListOpt("enable_ro_access_level_for_protocols", |
| 90 | default=["nfs", ], |
| 91 | help="List of protocols to run tests with ro access level."), |
Valeriy Ponomaryov | ad55dc5 | 2015-09-23 13:54:00 +0300 | [diff] [blame] | 92 | |
| 93 | # Capabilities |
| 94 | cfg.StrOpt("capability_storage_protocol", |
| 95 | deprecated_name="storage_protocol", |
Marc Koderer | 0abc93b | 2015-07-15 09:18:35 +0200 | [diff] [blame] | 96 | default="NFS_CIFS", |
| 97 | help="Backend protocol to target when creating volume types."), |
Valeriy Ponomaryov | ad55dc5 | 2015-09-23 13:54:00 +0300 | [diff] [blame] | 98 | cfg.BoolOpt("capability_snapshot_support", |
| 99 | help="Defines extra spec that satisfies specific back end " |
| 100 | "capability called 'snapshot_support' and will be used " |
| 101 | "for setting up custom share type. Defaults to value of " |
| 102 | "other config option 'run_snapshot_tests'."), |
| 103 | |
Marc Koderer | 0abc93b | 2015-07-15 09:18:35 +0200 | [diff] [blame] | 104 | cfg.StrOpt("share_network_id", |
| 105 | default="", |
| 106 | help="Some backend drivers requires share network " |
| 107 | "for share creation. Share network id, that will be " |
| 108 | "used for shares. If not set, it won't be used."), |
| 109 | cfg.StrOpt("alt_share_network_id", |
| 110 | default="", |
| 111 | help="Share network id, that will be used for shares" |
| 112 | " in alt tenant. If not set, it won't be used"), |
| 113 | cfg.StrOpt("admin_share_network_id", |
| 114 | default="", |
| 115 | help="Share network id, that will be used for shares" |
| 116 | " in admin tenant. If not set, it won't be used"), |
| 117 | cfg.BoolOpt("multi_backend", |
| 118 | default=False, |
| 119 | help="Runs Manila multi-backend tests."), |
| 120 | cfg.ListOpt("backend_names", |
| 121 | default=[], |
| 122 | help="Names of share backends, that will be used with " |
| 123 | "multibackend tests. Tempest will use first two values."), |
| 124 | cfg.IntOpt("share_creation_retry_number", |
| 125 | default=0, |
| 126 | help="Defines number of retries for share creation. " |
| 127 | "It is useful to avoid failures caused by unstable " |
| 128 | "environment."), |
| 129 | cfg.IntOpt("build_interval", |
| 130 | default=3, |
| 131 | help="Time in seconds between share availability checks."), |
| 132 | cfg.IntOpt("build_timeout", |
| 133 | default=500, |
| 134 | help="Timeout in seconds to wait for a share to become" |
| 135 | "available."), |
| 136 | cfg.BoolOpt("suppress_errors_in_cleanup", |
| 137 | default=False, |
| 138 | help="Whether to suppress errors with clean up operation " |
| 139 | "or not. There are cases when we may want to skip " |
| 140 | "such errors and catch only test errors."), |
Valeriy Ponomaryov | ad55dc5 | 2015-09-23 13:54:00 +0300 | [diff] [blame] | 141 | |
| 142 | # Switching ON/OFF test suites filtered by features |
Valeriy Ponomaryov | 9e56c99 | 2016-02-17 21:19:39 +0200 | [diff] [blame] | 143 | cfg.BoolOpt("run_quota_tests", |
| 144 | default=True, |
| 145 | help="Defines whether to run quota tests or not."), |
Marc Koderer | 0abc93b | 2015-07-15 09:18:35 +0200 | [diff] [blame] | 146 | cfg.BoolOpt("run_extend_tests", |
| 147 | default=True, |
| 148 | help="Defines whether to run share extend tests or not. " |
| 149 | "Disable this feature if used driver doesn't " |
| 150 | "support it."), |
| 151 | cfg.BoolOpt("run_shrink_tests", |
| 152 | default=True, |
| 153 | help="Defines whether to run share shrink tests or not. " |
| 154 | "Disable this feature if used driver doesn't " |
| 155 | "support it."), |
| 156 | cfg.BoolOpt("run_snapshot_tests", |
| 157 | default=True, |
| 158 | help="Defines whether to run tests that use share snapshots " |
| 159 | "or not. Disable this feature if used driver doesn't " |
| 160 | "support it."), |
Andrew Kerr | bf31e91 | 2015-07-29 10:39:38 -0400 | [diff] [blame] | 161 | cfg.BoolOpt("run_consistency_group_tests", |
| 162 | default=True, |
| 163 | help="Defines whether to run consistency group tests or not. " |
| 164 | "Disable this feature if used driver doesn't support " |
| 165 | "it."), |
Yogesh | bdb8810 | 2015-09-29 23:41:02 -0400 | [diff] [blame] | 166 | cfg.BoolOpt("run_replication_tests", |
| 167 | default=False, |
| 168 | help="Defines whether to run replication tests or not. " |
| 169 | "Enable this feature if the driver is configured " |
| 170 | "for replication."), |
zhaohua | 4636649 | 2016-06-20 17:51:47 +0800 | [diff] [blame] | 171 | cfg.BoolOpt("run_multiple_share_replicas_tests", |
| 172 | default=True, |
| 173 | help="Defines whether to run multiple replicas creation test " |
| 174 | "or not. Enable this if the driver can create more than " |
| 175 | "one replica for a share."), |
Rodrigo Barbieri | 427bc05 | 2016-06-06 17:10:06 -0300 | [diff] [blame^] | 176 | cfg.BoolOpt("run_host_assisted_migration_tests", |
| 177 | deprecated_name="run_migration_tests", |
Rodrigo Barbieri | 2aafa26 | 2015-09-09 15:52:16 -0300 | [diff] [blame] | 178 | default=False, |
Rodrigo Barbieri | 427bc05 | 2016-06-06 17:10:06 -0300 | [diff] [blame^] | 179 | help="Enable or disable host-assisted migration tests."), |
| 180 | cfg.BoolOpt("run_driver_assisted_migration_tests", |
| 181 | deprecated_name="run_migration_tests", |
| 182 | default=False, |
| 183 | help="Enable or disable driver-assisted migration tests."), |
Xing Yang | 69b00b5 | 2015-11-22 16:10:44 -0500 | [diff] [blame] | 184 | cfg.BoolOpt("run_manage_unmanage_tests", |
| 185 | default=False, |
| 186 | help="Defines whether to run manage/unmanage tests or not. " |
| 187 | "These test may leave orphaned resources, so be careful " |
| 188 | "enabling this opt."), |
| 189 | cfg.BoolOpt("run_manage_unmanage_snapshot_tests", |
| 190 | default=False, |
| 191 | help="Defines whether to run manage/unmanage snapshot tests " |
| 192 | "or not. These tests may leave orphaned resources, so be " |
| 193 | "careful enabling this opt."), |
Valeriy Ponomaryov | ad55dc5 | 2015-09-23 13:54:00 +0300 | [diff] [blame] | 194 | |
Marc Koderer | 0abc93b | 2015-07-15 09:18:35 +0200 | [diff] [blame] | 195 | cfg.StrOpt("image_with_share_tools", |
| 196 | default="manila-service-image", |
| 197 | help="Image name for vm booting with nfs/smb clients tool."), |
| 198 | cfg.StrOpt("image_username", |
| 199 | default="manila", |
| 200 | help="Image username."), |
| 201 | cfg.StrOpt("image_password", |
| 202 | help="Image password. Should be used for " |
| 203 | "'image_with_share_tools' without Nova Metadata support."), |
| 204 | cfg.StrOpt("client_vm_flavor_ref", |
| 205 | default="100", |
| 206 | help="Flavor used for client vm in scenario tests."), |
Rodrigo Barbieri | b7137ad | 2015-09-06 22:53:16 -0300 | [diff] [blame] | 207 | cfg.IntOpt("migration_timeout", |
Rodrigo Barbieri | e330512 | 2016-02-03 14:32:24 -0200 | [diff] [blame] | 208 | default=1500, |
Rodrigo Barbieri | b7137ad | 2015-09-06 22:53:16 -0300 | [diff] [blame] | 209 | help="Time to wait for share migration before " |
| 210 | "timing out (seconds)."), |
Julia Varlamova | d10a4a9 | 2015-08-31 06:28:28 -0400 | [diff] [blame] | 211 | cfg.StrOpt("default_share_type_name", |
Julia Varlamova | d10a4a9 | 2015-08-31 06:28:28 -0400 | [diff] [blame] | 212 | help="Default share type name to use in tempest tests."), |
Yogesh | bdb8810 | 2015-09-29 23:41:02 -0400 | [diff] [blame] | 213 | cfg.StrOpt("backend_replication_type", |
| 214 | default='none', |
| 215 | choices=['none', 'writable', 'readable', 'dr'], |
| 216 | help="Specify the replication type supported by the backend."), |
marcusvrn | e0d7cfd | 2016-06-24 12:27:55 -0300 | [diff] [blame] | 217 | cfg.IntOpt("share_size", |
| 218 | default=1, |
| 219 | help="Default size in GB for shares created by share tests."), |
Marc Koderer | 0abc93b | 2015-07-15 09:18:35 +0200 | [diff] [blame] | 220 | ] |