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