ZhiQiang Fan | 39f9722 | 2013-09-20 04:49:44 +0800 | [diff] [blame] | 1 | # Copyright 2012 OpenStack Foundation |
Jay Pipes | 3f981df | 2012-03-27 18:59:44 -0400 | [diff] [blame] | 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 | |
Dirk Mueller | e746fc2 | 2013-06-29 16:29:29 +0200 | [diff] [blame] | 16 | from __future__ import print_function |
| 17 | |
Masayuki Igawa | 9ec4cd8 | 2014-02-05 15:04:16 +0900 | [diff] [blame] | 18 | import logging as std_logging |
Jay Pipes | 7f75763 | 2011-12-02 15:53:32 -0500 | [diff] [blame] | 19 | import os |
Jay Pipes | 3f981df | 2012-03-27 18:59:44 -0400 | [diff] [blame] | 20 | |
Matthew Treinish | 90aedd1 | 2013-02-25 17:56:49 -0500 | [diff] [blame] | 21 | from oslo.config import cfg |
| 22 | |
Matthew Treinish | f4a9b0f | 2013-07-26 16:58:26 -0400 | [diff] [blame] | 23 | from tempest.openstack.common import log as logging |
Jay Pipes | 7f75763 | 2011-12-02 15:53:32 -0500 | [diff] [blame] | 24 | |
Daryl Walleck | 1465d61 | 2011-11-02 02:22:15 -0500 | [diff] [blame] | 25 | |
DennyZhang | 88a2dd8 | 2013-10-07 12:55:35 -0500 | [diff] [blame] | 26 | def register_opt_group(conf, opt_group, options): |
| 27 | conf.register_group(opt_group) |
| 28 | for opt in options: |
| 29 | conf.register_opt(opt, group=opt_group.name) |
| 30 | |
| 31 | |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 32 | identity_group = cfg.OptGroup(name='identity', |
| 33 | title="Keystone Configuration Options") |
Daryl Walleck | 1465d61 | 2011-11-02 02:22:15 -0500 | [diff] [blame] | 34 | |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 35 | IdentityGroup = [ |
| 36 | cfg.StrOpt('catalog_type', |
| 37 | default='identity', |
| 38 | help="Catalog type of the Identity service."), |
Jay Pipes | cd8eaec | 2013-01-16 21:03:48 -0500 | [diff] [blame] | 39 | cfg.BoolOpt('disable_ssl_certificate_validation', |
| 40 | default=False, |
| 41 | help="Set to True if using self-signed SSL certificates."), |
Jay Pipes | 7c88eb2 | 2013-01-16 21:32:43 -0500 | [diff] [blame] | 42 | cfg.StrOpt('uri', |
| 43 | default=None, |
Brant Knudson | c7ca334 | 2013-03-28 21:08:50 -0500 | [diff] [blame] | 44 | help="Full URI of the OpenStack Identity API (Keystone), v2"), |
| 45 | cfg.StrOpt('uri_v3', |
| 46 | help='Full URI of the OpenStack Identity API (Keystone), v3'), |
Andrea Frittoli | 8bbdb16 | 2014-01-06 11:06:13 +0000 | [diff] [blame] | 47 | cfg.StrOpt('auth_version', |
| 48 | default='v2', |
| 49 | help="Identity API version to be used for authentication " |
Andrea Frittoli | 77f9da4 | 2014-02-06 11:18:19 +0000 | [diff] [blame] | 50 | "for API tests."), |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 51 | cfg.StrOpt('region', |
Attila Fazekas | cadcb1f | 2013-01-21 23:10:53 +0100 | [diff] [blame] | 52 | default='RegionOne', |
Arata Notsu | 8f44039 | 2013-09-13 16:14:20 +0900 | [diff] [blame] | 53 | help="The identity region name to use. Also used as the other " |
| 54 | "services' region name unless they are set explicitly. " |
| 55 | "If no such region is found in the service catalog, the " |
| 56 | "first found one is used."), |
JordanP | 5d29b2c | 2013-12-18 13:56:03 +0000 | [diff] [blame] | 57 | cfg.StrOpt('endpoint_type', |
| 58 | default='publicURL', |
| 59 | choices=['public', 'admin', 'internal', |
| 60 | 'publicURL', 'adminURL', 'internalURL'], |
| 61 | help="The endpoint type to use for the identity service."), |
Attila Fazekas | cadcb1f | 2013-01-21 23:10:53 +0100 | [diff] [blame] | 62 | cfg.StrOpt('username', |
Andrea Frittoli | a946367 | 2014-03-03 14:39:02 +0000 | [diff] [blame] | 63 | default=None, |
Attila Fazekas | cadcb1f | 2013-01-21 23:10:53 +0100 | [diff] [blame] | 64 | help="Username to use for Nova API requests."), |
| 65 | cfg.StrOpt('tenant_name', |
Andrea Frittoli | a946367 | 2014-03-03 14:39:02 +0000 | [diff] [blame] | 66 | default=None, |
Attila Fazekas | cadcb1f | 2013-01-21 23:10:53 +0100 | [diff] [blame] | 67 | help="Tenant name to use for Nova API requests."), |
Russell Sim | 7f894a5 | 2013-09-13 10:35:21 +1000 | [diff] [blame] | 68 | cfg.StrOpt('admin_role', |
| 69 | default='admin', |
| 70 | help="Role required to administrate keystone."), |
Attila Fazekas | cadcb1f | 2013-01-21 23:10:53 +0100 | [diff] [blame] | 71 | cfg.StrOpt('password', |
Andrea Frittoli | a946367 | 2014-03-03 14:39:02 +0000 | [diff] [blame] | 72 | default=None, |
Attila Fazekas | cadcb1f | 2013-01-21 23:10:53 +0100 | [diff] [blame] | 73 | help="API key to use when authenticating.", |
| 74 | secret=True), |
Andrea Frittoli | b1b04bb | 2014-04-06 11:57:07 +0100 | [diff] [blame] | 75 | cfg.StrOpt('domain_name', |
| 76 | default=None, |
| 77 | help="Domain name for authentication (Keystone V3)." |
| 78 | "The same domain applies to user and project"), |
Attila Fazekas | cadcb1f | 2013-01-21 23:10:53 +0100 | [diff] [blame] | 79 | cfg.StrOpt('alt_username', |
| 80 | default=None, |
| 81 | help="Username of alternate user to use for Nova API " |
| 82 | "requests."), |
| 83 | cfg.StrOpt('alt_tenant_name', |
| 84 | default=None, |
| 85 | help="Alternate user's Tenant name to use for Nova API " |
| 86 | "requests."), |
| 87 | cfg.StrOpt('alt_password', |
| 88 | default=None, |
| 89 | help="API key to use when authenticating as alternate user.", |
| 90 | secret=True), |
Andrea Frittoli | b1b04bb | 2014-04-06 11:57:07 +0100 | [diff] [blame] | 91 | cfg.StrOpt('alt_domain_name', |
| 92 | default=None, |
| 93 | help="Alternate domain name for authentication (Keystone V3)." |
| 94 | "The same domain applies to user and project"), |
Attila Fazekas | cadcb1f | 2013-01-21 23:10:53 +0100 | [diff] [blame] | 95 | cfg.StrOpt('admin_username', |
Andrea Frittoli | a946367 | 2014-03-03 14:39:02 +0000 | [diff] [blame] | 96 | default=None, |
Dirk Mueller | 14bd562 | 2014-01-14 19:33:05 +0100 | [diff] [blame] | 97 | help="Administrative Username to use for " |
Attila Fazekas | cadcb1f | 2013-01-21 23:10:53 +0100 | [diff] [blame] | 98 | "Keystone API requests."), |
| 99 | cfg.StrOpt('admin_tenant_name', |
Andrea Frittoli | a946367 | 2014-03-03 14:39:02 +0000 | [diff] [blame] | 100 | default=None, |
Attila Fazekas | cadcb1f | 2013-01-21 23:10:53 +0100 | [diff] [blame] | 101 | help="Administrative Tenant name to use for Keystone API " |
| 102 | "requests."), |
| 103 | cfg.StrOpt('admin_password', |
Andrea Frittoli | a946367 | 2014-03-03 14:39:02 +0000 | [diff] [blame] | 104 | default=None, |
Attila Fazekas | cadcb1f | 2013-01-21 23:10:53 +0100 | [diff] [blame] | 105 | help="API key to use when authenticating as admin.", |
| 106 | secret=True), |
Andrea Frittoli | b1b04bb | 2014-04-06 11:57:07 +0100 | [diff] [blame] | 107 | cfg.StrOpt('admin_domain_name', |
| 108 | default=None, |
| 109 | help="Admin domain name for authentication (Keystone V3)." |
| 110 | "The same domain applies to user and project"), |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 111 | ] |
Jay Pipes | 3f981df | 2012-03-27 18:59:44 -0400 | [diff] [blame] | 112 | |
Matthew Treinish | d5021a7 | 2014-01-09 18:42:51 +0000 | [diff] [blame] | 113 | identity_feature_group = cfg.OptGroup(name='identity-feature-enabled', |
| 114 | title='Enabled Identity Features') |
| 115 | |
| 116 | IdentityFeatureGroup = [ |
| 117 | cfg.BoolOpt('trust', |
| 118 | default=True, |
| 119 | help='Does the identity service have delegation and ' |
Matthew Treinish | db2c597 | 2014-01-31 22:18:59 +0000 | [diff] [blame] | 120 | 'impersonation enabled'), |
| 121 | cfg.BoolOpt('api_v2', |
| 122 | default=True, |
| 123 | help='Is the v2 identity API enabled'), |
| 124 | cfg.BoolOpt('api_v3', |
| 125 | default=True, |
| 126 | help='Is the v3 identity API enabled'), |
Matthew Treinish | d5021a7 | 2014-01-09 18:42:51 +0000 | [diff] [blame] | 127 | ] |
| 128 | |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 129 | compute_group = cfg.OptGroup(name='compute', |
| 130 | title='Compute Service Options') |
Rohit Karajgi | e1b050d | 2011-12-02 16:13:18 -0800 | [diff] [blame] | 131 | |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 132 | ComputeGroup = [ |
| 133 | cfg.BoolOpt('allow_tenant_isolation', |
| 134 | default=False, |
| 135 | help="Allows test cases to create/destroy tenants and " |
| 136 | "users. This option enables isolated test cases and " |
| 137 | "better parallel execution, but also requires that " |
| 138 | "OpenStack Identity API admin credentials are known."), |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 139 | cfg.StrOpt('image_ref', |
Matthew Treinish | afcb6b4 | 2014-05-27 13:50:02 -0400 | [diff] [blame] | 140 | help="Valid primary image reference to be used in tests. " |
| 141 | "This is a required option"), |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 142 | cfg.StrOpt('image_ref_alt', |
Matthew Treinish | afcb6b4 | 2014-05-27 13:50:02 -0400 | [diff] [blame] | 143 | help="Valid secondary image reference to be used in tests. " |
| 144 | "This is a required option, but if only one image is " |
| 145 | "available duplicate the value of image_ref above"), |
Ken'ichi Ohmichi | 3577260 | 2013-11-14 15:03:27 +0900 | [diff] [blame] | 146 | cfg.StrOpt('flavor_ref', |
| 147 | default="1", |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 148 | help="Valid primary flavor to use in tests."), |
Ken'ichi Ohmichi | 3577260 | 2013-11-14 15:03:27 +0900 | [diff] [blame] | 149 | cfg.StrOpt('flavor_ref_alt', |
| 150 | default="2", |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 151 | help='Valid secondary flavor to be used in tests.'), |
Maru Newby | af292e8 | 2013-05-20 21:32:28 +0000 | [diff] [blame] | 152 | cfg.StrOpt('image_ssh_user', |
| 153 | default="root", |
| 154 | help="User name used to authenticate to an instance."), |
Ryan Hsu | cb2e125 | 2013-09-03 21:44:49 -0700 | [diff] [blame] | 155 | cfg.StrOpt('image_ssh_password', |
| 156 | default="password", |
| 157 | help="Password used to authenticate to an instance."), |
Maru Newby | af292e8 | 2013-05-20 21:32:28 +0000 | [diff] [blame] | 158 | cfg.StrOpt('image_alt_ssh_user', |
| 159 | default="root", |
| 160 | help="User name used to authenticate to an instance using " |
| 161 | "the alternate image."), |
Ryan Hsu | cb2e125 | 2013-09-03 21:44:49 -0700 | [diff] [blame] | 162 | cfg.StrOpt('image_alt_ssh_password', |
| 163 | default="password", |
| 164 | help="Password used to authenticate to an instance using " |
| 165 | "the alternate image."), |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 166 | cfg.IntOpt('build_interval', |
Sean Dague | 8219085 | 2014-05-24 07:42:59 -0400 | [diff] [blame] | 167 | default=1, |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 168 | help="Time in seconds between build status checks."), |
| 169 | cfg.IntOpt('build_timeout', |
| 170 | default=300, |
| 171 | help="Timeout in seconds to wait for an instance to build."), |
| 172 | cfg.BoolOpt('run_ssh', |
| 173 | default=False, |
Derek Higgins | 85cd514 | 2013-12-17 17:10:11 +0000 | [diff] [blame] | 174 | help="Should the tests ssh to instances?"), |
Attila Fazekas | 423834d | 2014-03-14 17:33:13 +0100 | [diff] [blame] | 175 | cfg.StrOpt('ssh_auth_method', |
| 176 | default='keypair', |
| 177 | help="Auth method used for authenticate to the instance. " |
| 178 | "Valid choices are: keypair, configured, adminpass. " |
| 179 | "keypair: start the servers with an ssh keypair. " |
| 180 | "configured: use the configured user and password. " |
| 181 | "adminpass: use the injected adminPass. " |
| 182 | "disabled: avoid using ssh when it is an option."), |
| 183 | cfg.StrOpt('ssh_connect_method', |
| 184 | default='fixed', |
| 185 | help="How to connect to the instance? " |
| 186 | "fixed: using the first ip belongs the fixed network " |
| 187 | "floating: creating and using a floating ip"), |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 188 | cfg.StrOpt('ssh_user', |
| 189 | default='root', |
| 190 | help="User name used to authenticate to an instance."), |
Nachi Ueno | 6d580be | 2013-07-24 10:58:11 -0700 | [diff] [blame] | 191 | cfg.IntOpt('ping_timeout', |
Darragh O'Reilly | 6b63667 | 2014-01-24 12:17:40 +0000 | [diff] [blame] | 192 | default=120, |
Nachi Ueno | 6d580be | 2013-07-24 10:58:11 -0700 | [diff] [blame] | 193 | help="Timeout in seconds to wait for ping to " |
| 194 | "succeed."), |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 195 | cfg.IntOpt('ssh_timeout', |
| 196 | default=300, |
Chris Yeoh | 7691604 | 2013-02-27 16:25:25 +1030 | [diff] [blame] | 197 | help="Timeout in seconds to wait for authentication to " |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 198 | "succeed."), |
Attila Fazekas | 0abbc95 | 2013-07-01 19:19:42 +0200 | [diff] [blame] | 199 | cfg.IntOpt('ready_wait', |
| 200 | default=0, |
DennyZhang | 8912d01 | 2013-09-25 18:08:34 -0500 | [diff] [blame] | 201 | help="Additional wait time for clean state, when there is " |
| 202 | "no OS-EXT-STS extension available"), |
Chris Yeoh | 7691604 | 2013-02-27 16:25:25 +1030 | [diff] [blame] | 203 | cfg.IntOpt('ssh_channel_timeout', |
| 204 | default=60, |
| 205 | help="Timeout in seconds to wait for output from ssh " |
| 206 | "channel."), |
Attila Fazekas | b066165 | 2013-05-08 13:01:36 +0200 | [diff] [blame] | 207 | cfg.StrOpt('fixed_network_name', |
| 208 | default='private', |
| 209 | help="Visible fixed network name "), |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 210 | cfg.StrOpt('network_for_ssh', |
| 211 | default='public', |
| 212 | help="Network used for SSH connections."), |
| 213 | cfg.IntOpt('ip_version_for_ssh', |
| 214 | default=4, |
| 215 | help="IP version used for SSH connections."), |
fujioka yuuichi | a11994e | 2013-07-09 11:19:51 +0900 | [diff] [blame] | 216 | cfg.BoolOpt('use_floatingip_for_ssh', |
| 217 | default=True, |
Tushar Kalra | 95a482d | 2014-03-25 14:24:43 -0700 | [diff] [blame] | 218 | help="Does SSH use Floating IPs?"), |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 219 | cfg.StrOpt('catalog_type', |
| 220 | default='compute', |
| 221 | help="Catalog type of the Compute service."), |
Arata Notsu | 8f44039 | 2013-09-13 16:14:20 +0900 | [diff] [blame] | 222 | cfg.StrOpt('region', |
| 223 | default='', |
| 224 | help="The compute region name to use. If empty, the value " |
| 225 | "of identity.region is used instead. If no such region " |
| 226 | "is found in the service catalog, the first found one is " |
| 227 | "used."), |
JordanP | 5d29b2c | 2013-12-18 13:56:03 +0000 | [diff] [blame] | 228 | cfg.StrOpt('endpoint_type', |
| 229 | default='publicURL', |
| 230 | choices=['public', 'admin', 'internal', |
| 231 | 'publicURL', 'adminURL', 'internalURL'], |
| 232 | help="The endpoint type to use for the compute service."), |
ivan-zhu | 8f992be | 2013-07-31 14:56:58 +0800 | [diff] [blame] | 233 | cfg.StrOpt('catalog_v3_type', |
| 234 | default='computev3', |
| 235 | help="Catalog type of the Compute v3 service."), |
Attila Fazekas | cadcb1f | 2013-01-21 23:10:53 +0100 | [diff] [blame] | 236 | cfg.StrOpt('path_to_private_key', |
| 237 | default=None, |
| 238 | help="Path to a private key file for SSH access to remote " |
| 239 | "hosts"), |
Ryan Hsu | cb2e125 | 2013-09-03 21:44:49 -0700 | [diff] [blame] | 240 | cfg.StrOpt('volume_device_name', |
| 241 | default='vdb', |
| 242 | help="Expected device name when a volume is attached to " |
Ken'ichi Ohmichi | 39437e2 | 2013-10-06 00:21:38 +0900 | [diff] [blame] | 243 | "an instance"), |
| 244 | cfg.IntOpt('shelved_offload_time', |
| 245 | default=0, |
| 246 | help='Time in seconds before a shelved instance is eligible ' |
| 247 | 'for removing from a host. -1 never offload, 0 offload ' |
| 248 | 'when shelved. This time should be the same as the time ' |
| 249 | 'of nova.conf, and some tests will run for as long as the ' |
Ghanshyam | 06a5b4a | 2014-04-11 17:32:45 +0900 | [diff] [blame] | 250 | 'time.'), |
| 251 | cfg.StrOpt('floating_ip_range', |
| 252 | default='10.0.0.0/29', |
| 253 | help='Unallocated floating IP range, which will be used to ' |
| 254 | 'test the floating IP bulk feature for CRUD operation.') |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 255 | ] |
Rohit Karajgi | e1b050d | 2011-12-02 16:13:18 -0800 | [diff] [blame] | 256 | |
Matthew Treinish | d5c9602 | 2013-10-17 21:51:23 +0000 | [diff] [blame] | 257 | compute_features_group = cfg.OptGroup(name='compute-feature-enabled', |
| 258 | title="Enabled Compute Service Features") |
| 259 | |
| 260 | ComputeFeaturesGroup = [ |
ivan-zhu | 8f992be | 2013-07-31 14:56:58 +0800 | [diff] [blame] | 261 | cfg.BoolOpt('api_v3', |
Matthew Treinish | 836e56b | 2014-06-12 13:55:19 -0400 | [diff] [blame] | 262 | default=False, |
ivan-zhu | 8f992be | 2013-07-31 14:56:58 +0800 | [diff] [blame] | 263 | help="If false, skip all nova v3 tests."), |
Matthew Treinish | d5c9602 | 2013-10-17 21:51:23 +0000 | [diff] [blame] | 264 | cfg.BoolOpt('disk_config', |
| 265 | default=True, |
| 266 | help="If false, skip disk config tests"), |
Matthew Treinish | e3d2614 | 2013-11-26 19:14:58 +0000 | [diff] [blame] | 267 | cfg.ListOpt('api_extensions', |
| 268 | default=['all'], |
Zhi Kun Liu | de25c02 | 2014-02-14 13:25:19 +0800 | [diff] [blame] | 269 | help='A list of enabled compute extensions with a special ' |
Ken'ichi Ohmichi | a7e6871 | 2014-05-06 10:47:26 +0900 | [diff] [blame] | 270 | 'entry all which indicates every extension is enabled. ' |
| 271 | 'Each extension should be specified with alias name'), |
Matthew Treinish | e3d2614 | 2013-11-26 19:14:58 +0000 | [diff] [blame] | 272 | cfg.ListOpt('api_v3_extensions', |
| 273 | default=['all'], |
| 274 | help='A list of enabled v3 extensions with a special entry all' |
Ken'ichi Ohmichi | a7e6871 | 2014-05-06 10:47:26 +0900 | [diff] [blame] | 275 | ' which indicates every extension is enabled. ' |
| 276 | 'Each extension should be specified with alias name'), |
Matthew Treinish | d5c9602 | 2013-10-17 21:51:23 +0000 | [diff] [blame] | 277 | cfg.BoolOpt('change_password', |
| 278 | default=False, |
| 279 | help="Does the test environment support changing the admin " |
| 280 | "password?"), |
Matthew Treinish | d5c9602 | 2013-10-17 21:51:23 +0000 | [diff] [blame] | 281 | cfg.BoolOpt('resize', |
| 282 | default=False, |
| 283 | help="Does the test environment support resizing?"), |
Eric Windisch | b553807 | 2014-03-09 23:47:35 -0400 | [diff] [blame] | 284 | cfg.BoolOpt('pause', |
| 285 | default=True, |
| 286 | help="Does the test environment support pausing?"), |
Eric Windisch | aeb7e84 | 2014-03-10 01:10:50 -0400 | [diff] [blame] | 287 | cfg.BoolOpt('suspend', |
| 288 | default=True, |
| 289 | help="Does the test environment support suspend/resume?"), |
Matthew Treinish | d5c9602 | 2013-10-17 21:51:23 +0000 | [diff] [blame] | 290 | cfg.BoolOpt('live_migration', |
| 291 | default=False, |
| 292 | help="Does the test environment support live migration " |
| 293 | "available?"), |
| 294 | cfg.BoolOpt('block_migration_for_live_migration', |
| 295 | default=False, |
| 296 | help="Does the test environment use block devices for live " |
| 297 | "migration"), |
| 298 | cfg.BoolOpt('block_migrate_cinder_iscsi', |
| 299 | default=False, |
| 300 | help="Does the test environment block migration support " |
Ghanshyam Mann | 41c1757 | 2014-02-27 18:52:56 +0900 | [diff] [blame] | 301 | "cinder iSCSI volumes"), |
| 302 | cfg.BoolOpt('vnc_console', |
| 303 | default=False, |
| 304 | help='Enable VNC console. This configuration value should ' |
Ghanshyam | 70876d0 | 2014-03-11 11:40:18 +0900 | [diff] [blame] | 305 | 'be same as [nova.vnc]->vnc_enabled in nova.conf'), |
| 306 | cfg.BoolOpt('spice_console', |
| 307 | default=False, |
| 308 | help='Enable Spice console. This configuration value should ' |
| 309 | 'be same as [nova.spice]->enabled in nova.conf'), |
| 310 | cfg.BoolOpt('rdp_console', |
| 311 | default=False, |
| 312 | help='Enable RDP console. This configuration value should ' |
Adam Gandelman | 2e37b4f | 2014-06-18 17:34:21 -0700 | [diff] [blame] | 313 | 'be same as [nova.rdp]->enabled in nova.conf'), |
| 314 | cfg.BoolOpt('rescue', |
| 315 | default=True, |
| 316 | help='Does the test environment support instance rescue ' |
| 317 | 'mode?') |
Matthew Treinish | d5c9602 | 2013-10-17 21:51:23 +0000 | [diff] [blame] | 318 | ] |
| 319 | |
| 320 | |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 321 | compute_admin_group = cfg.OptGroup(name='compute-admin', |
| 322 | title="Compute Admin Options") |
donald-ngo | 7fb1efa | 2011-12-13 17:17:36 -0800 | [diff] [blame] | 323 | |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 324 | ComputeAdminGroup = [ |
| 325 | cfg.StrOpt('username', |
Andrea Frittoli | a946367 | 2014-03-03 14:39:02 +0000 | [diff] [blame] | 326 | default=None, |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 327 | help="Administrative Username to use for Nova API requests."), |
| 328 | cfg.StrOpt('tenant_name', |
Andrea Frittoli | a946367 | 2014-03-03 14:39:02 +0000 | [diff] [blame] | 329 | default=None, |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 330 | help="Administrative Tenant name to use for Nova API " |
| 331 | "requests."), |
| 332 | cfg.StrOpt('password', |
Andrea Frittoli | a946367 | 2014-03-03 14:39:02 +0000 | [diff] [blame] | 333 | default=None, |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 334 | help="API key to use when authenticating as admin.", |
| 335 | secret=True), |
Andrea Frittoli | b1b04bb | 2014-04-06 11:57:07 +0100 | [diff] [blame] | 336 | cfg.StrOpt('domain_name', |
| 337 | default=None, |
| 338 | help="Domain name for authentication as admin (Keystone V3)." |
| 339 | "The same domain applies to user and project"), |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 340 | ] |
Daryl Walleck | 587385b | 2012-03-03 13:00:26 -0600 | [diff] [blame] | 341 | |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 342 | image_group = cfg.OptGroup(name='image', |
| 343 | title="Image Service Options") |
Jay Pipes | f38eaac | 2012-06-21 13:37:35 -0400 | [diff] [blame] | 344 | |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 345 | ImageGroup = [ |
Matthew Treinish | 72ea442 | 2013-02-07 14:42:49 -0500 | [diff] [blame] | 346 | cfg.StrOpt('catalog_type', |
| 347 | default='image', |
Sean Dague | 8340199 | 2013-05-06 17:46:36 -0400 | [diff] [blame] | 348 | help='Catalog type of the Image service.'), |
Arata Notsu | 8f44039 | 2013-09-13 16:14:20 +0900 | [diff] [blame] | 349 | cfg.StrOpt('region', |
| 350 | default='', |
| 351 | help="The image region name to use. If empty, the value " |
| 352 | "of identity.region is used instead. If no such region " |
| 353 | "is found in the service catalog, the first found one is " |
| 354 | "used."), |
JordanP | 5d29b2c | 2013-12-18 13:56:03 +0000 | [diff] [blame] | 355 | cfg.StrOpt('endpoint_type', |
| 356 | default='publicURL', |
| 357 | choices=['public', 'admin', 'internal', |
| 358 | 'publicURL', 'adminURL', 'internalURL'], |
| 359 | help="The endpoint type to use for the image service."), |
Sean Dague | 8340199 | 2013-05-06 17:46:36 -0400 | [diff] [blame] | 360 | cfg.StrOpt('http_image', |
| 361 | default='http://download.cirros-cloud.net/0.3.1/' |
| 362 | 'cirros-0.3.1-x86_64-uec.tar.gz', |
DennyZhang | 8912d01 | 2013-09-25 18:08:34 -0500 | [diff] [blame] | 363 | help='http accessible image') |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 364 | ] |
Jay Pipes | f38eaac | 2012-06-21 13:37:35 -0400 | [diff] [blame] | 365 | |
Matthew Treinish | 2b5287d | 2013-10-22 17:40:34 +0000 | [diff] [blame] | 366 | image_feature_group = cfg.OptGroup(name='image-feature-enabled', |
| 367 | title='Enabled image service features') |
| 368 | |
| 369 | ImageFeaturesGroup = [ |
| 370 | cfg.BoolOpt('api_v2', |
| 371 | default=True, |
| 372 | help="Is the v2 image API enabled"), |
| 373 | cfg.BoolOpt('api_v1', |
| 374 | default=True, |
| 375 | help="Is the v1 image API enabled"), |
| 376 | ] |
Jay Pipes | f38eaac | 2012-06-21 13:37:35 -0400 | [diff] [blame] | 377 | |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 378 | network_group = cfg.OptGroup(name='network', |
| 379 | title='Network Service Options') |
Daryl Walleck | 587385b | 2012-03-03 13:00:26 -0600 | [diff] [blame] | 380 | |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 381 | NetworkGroup = [ |
| 382 | cfg.StrOpt('catalog_type', |
| 383 | default='network', |
Mark McClain | f2982e8 | 2013-07-06 17:48:03 -0400 | [diff] [blame] | 384 | help='Catalog type of the Neutron service.'), |
Arata Notsu | 8f44039 | 2013-09-13 16:14:20 +0900 | [diff] [blame] | 385 | cfg.StrOpt('region', |
| 386 | default='', |
| 387 | help="The network region name to use. If empty, the value " |
| 388 | "of identity.region is used instead. If no such region " |
| 389 | "is found in the service catalog, the first found one is " |
| 390 | "used."), |
JordanP | 5d29b2c | 2013-12-18 13:56:03 +0000 | [diff] [blame] | 391 | cfg.StrOpt('endpoint_type', |
| 392 | default='publicURL', |
| 393 | choices=['public', 'admin', 'internal', |
| 394 | 'publicURL', 'adminURL', 'internalURL'], |
| 395 | help="The endpoint type to use for the network service."), |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 396 | cfg.StrOpt('tenant_network_cidr', |
| 397 | default="10.100.0.0/16", |
Henry Gessau | ffda37a | 2014-01-16 11:17:55 -0500 | [diff] [blame] | 398 | help="The cidr block to allocate tenant ipv4 subnets from"), |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 399 | cfg.IntOpt('tenant_network_mask_bits', |
Attila Fazekas | 8ea181b | 2013-07-13 16:26:14 +0200 | [diff] [blame] | 400 | default=28, |
Henry Gessau | ffda37a | 2014-01-16 11:17:55 -0500 | [diff] [blame] | 401 | help="The mask bits for tenant ipv4 subnets"), |
| 402 | cfg.StrOpt('tenant_network_v6_cidr', |
| 403 | default="2003::/64", |
| 404 | help="The cidr block to allocate tenant ipv6 subnets from"), |
| 405 | cfg.IntOpt('tenant_network_v6_mask_bits', |
| 406 | default=96, |
| 407 | help="The mask bits for tenant ipv6 subnets"), |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 408 | cfg.BoolOpt('tenant_networks_reachable', |
| 409 | default=False, |
| 410 | help="Whether tenant network connectivity should be " |
| 411 | "evaluated directly"), |
| 412 | cfg.StrOpt('public_network_id', |
| 413 | default="", |
| 414 | help="Id of the public network that provides external " |
| 415 | "connectivity"), |
| 416 | cfg.StrOpt('public_router_id', |
| 417 | default="", |
| 418 | help="Id of the public router that provides external " |
| 419 | "connectivity"), |
izikpenso | d9a01a6 | 2014-02-17 20:02:32 +0200 | [diff] [blame] | 420 | cfg.IntOpt('build_timeout', |
| 421 | default=300, |
| 422 | help="Timeout in seconds to wait for network operation to " |
| 423 | "complete."), |
| 424 | cfg.IntOpt('build_interval', |
Sean Dague | 8219085 | 2014-05-24 07:42:59 -0400 | [diff] [blame] | 425 | default=1, |
izikpenso | d9a01a6 | 2014-02-17 20:02:32 +0200 | [diff] [blame] | 426 | help="Time in seconds between network operation status " |
| 427 | "checks."), |
Attila Fazekas | 640392b | 2014-06-12 15:58:10 +0200 | [diff] [blame] | 428 | cfg.ListOpt('dns_servers', |
| 429 | default=["8.8.8.8", "8.8.4.4"], |
| 430 | help="List of dns servers whichs hould be used" |
| 431 | " for subnet creation") |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 432 | ] |
Jay Pipes | 3f981df | 2012-03-27 18:59:44 -0400 | [diff] [blame] | 433 | |
Matthew Treinish | e3d2614 | 2013-11-26 19:14:58 +0000 | [diff] [blame] | 434 | network_feature_group = cfg.OptGroup(name='network-feature-enabled', |
| 435 | title='Enabled network service features') |
| 436 | |
| 437 | NetworkFeaturesGroup = [ |
Matthew Treinish | e2e33cf | 2014-03-03 19:28:41 +0000 | [diff] [blame] | 438 | cfg.BoolOpt('ipv6', |
| 439 | default=True, |
| 440 | help="Allow the execution of IPv6 tests"), |
Matthew Treinish | e3d2614 | 2013-11-26 19:14:58 +0000 | [diff] [blame] | 441 | cfg.ListOpt('api_extensions', |
| 442 | default=['all'], |
Zhi Kun Liu | de25c02 | 2014-02-14 13:25:19 +0800 | [diff] [blame] | 443 | help='A list of enabled network extensions with a special ' |
| 444 | 'entry all which indicates every extension is enabled'), |
Sean M. Collins | dd27a4d | 2014-05-13 10:33:15 -0400 | [diff] [blame] | 445 | cfg.BoolOpt('ipv6_subnet_attributes', |
| 446 | default=False, |
| 447 | help="Allow the execution of IPv6 subnet tests that use " |
| 448 | "the extended IPv6 attributes ipv6_ra_mode " |
| 449 | "and ipv6_address_mode" |
| 450 | ) |
Matthew Treinish | e3d2614 | 2013-11-26 19:14:58 +0000 | [diff] [blame] | 451 | ] |
| 452 | |
Malini Kamalambal | 6e7b3b8 | 2014-02-06 06:49:04 -0500 | [diff] [blame] | 453 | queuing_group = cfg.OptGroup(name='queuing', |
| 454 | title='Queuing Service') |
| 455 | |
| 456 | QueuingGroup = [ |
| 457 | cfg.StrOpt('catalog_type', |
| 458 | default='queuing', |
| 459 | help='Catalog type of the Queuing service.'), |
Jorge Chai | 83ba4ee | 2014-04-15 18:58:08 +0000 | [diff] [blame] | 460 | cfg.IntOpt('max_queues_per_page', |
| 461 | default=20, |
| 462 | help='The maximum number of queue records per page when ' |
| 463 | 'listing queues'), |
Malini Kamalambal | 7458b4b | 2014-05-29 11:47:28 -0400 | [diff] [blame] | 464 | cfg.IntOpt('max_queue_metadata', |
| 465 | default=65536, |
| 466 | help='The maximum metadata size for a queue'), |
| 467 | cfg.IntOpt('max_messages_per_page', |
| 468 | default=20, |
| 469 | help='The maximum number of queue message per page when ' |
| 470 | 'listing (or) posting messages'), |
| 471 | cfg.IntOpt('max_message_size', |
| 472 | default=262144, |
| 473 | help='The maximum size of a message body'), |
| 474 | cfg.IntOpt('max_messages_per_claim', |
| 475 | default=20, |
| 476 | help='The maximum number of messages per claim'), |
| 477 | cfg.IntOpt('max_message_ttl', |
| 478 | default=1209600, |
| 479 | help='The maximum ttl for a message'), |
| 480 | cfg.IntOpt('max_claim_ttl', |
| 481 | default=43200, |
| 482 | help='The maximum ttl for a claim'), |
| 483 | cfg.IntOpt('max_claim_grace', |
| 484 | default=43200, |
| 485 | help='The maximum grace period for a claim'), |
Malini Kamalambal | 6e7b3b8 | 2014-02-06 06:49:04 -0500 | [diff] [blame] | 486 | ] |
| 487 | |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 488 | volume_group = cfg.OptGroup(name='volume', |
| 489 | title='Block Storage Options') |
Daryl Walleck | 587385b | 2012-03-03 13:00:26 -0600 | [diff] [blame] | 490 | |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 491 | VolumeGroup = [ |
| 492 | cfg.IntOpt('build_interval', |
Sean Dague | 8219085 | 2014-05-24 07:42:59 -0400 | [diff] [blame] | 493 | default=1, |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 494 | help='Time in seconds between volume availability checks.'), |
| 495 | cfg.IntOpt('build_timeout', |
| 496 | default=300, |
| 497 | help='Timeout in seconds to wait for a volume to become' |
| 498 | 'available.'), |
| 499 | cfg.StrOpt('catalog_type', |
Matthew Treinish | eb72451 | 2013-10-25 15:12:59 +0000 | [diff] [blame] | 500 | default='volume', |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 501 | help="Catalog type of the Volume Service"), |
Arata Notsu | 8f44039 | 2013-09-13 16:14:20 +0900 | [diff] [blame] | 502 | cfg.StrOpt('region', |
| 503 | default='', |
| 504 | help="The volume region name to use. If empty, the value " |
| 505 | "of identity.region is used instead. If no such region " |
| 506 | "is found in the service catalog, the first found one is " |
| 507 | "used."), |
JordanP | 5d29b2c | 2013-12-18 13:56:03 +0000 | [diff] [blame] | 508 | cfg.StrOpt('endpoint_type', |
| 509 | default='publicURL', |
| 510 | choices=['public', 'admin', 'internal', |
| 511 | 'publicURL', 'adminURL', 'internalURL'], |
| 512 | help="The endpoint type to use for the volume service."), |
Jérôme Gallard | 86551ce | 2013-03-08 11:41:26 +0100 | [diff] [blame] | 513 | cfg.StrOpt('backend1_name', |
Giulio Fidente | f4fa894 | 2013-05-28 18:48:03 +0200 | [diff] [blame] | 514 | default='BACKEND_1', |
Jérôme Gallard | 86551ce | 2013-03-08 11:41:26 +0100 | [diff] [blame] | 515 | help="Name of the backend1 (must be declared in cinder.conf)"), |
| 516 | cfg.StrOpt('backend2_name', |
Giulio Fidente | f4fa894 | 2013-05-28 18:48:03 +0200 | [diff] [blame] | 517 | default='BACKEND_2', |
Jérôme Gallard | 86551ce | 2013-03-08 11:41:26 +0100 | [diff] [blame] | 518 | help="Name of the backend2 (must be declared in cinder.conf)"), |
Adam Gandelman | 827ad33 | 2013-06-24 17:04:09 -0700 | [diff] [blame] | 519 | cfg.StrOpt('storage_protocol', |
| 520 | default='iSCSI', |
| 521 | help='Backend protocol to target when creating volume types'), |
| 522 | cfg.StrOpt('vendor_name', |
| 523 | default='Open Source', |
| 524 | help='Backend vendor to target when creating volume types'), |
Ryan Hsu | a67f463 | 2013-08-29 16:03:06 -0700 | [diff] [blame] | 525 | cfg.StrOpt('disk_format', |
| 526 | default='raw', |
| 527 | help='Disk format to use when copying a volume to image'), |
Jerry Cai | 9733d0e | 2014-03-19 15:50:49 +0800 | [diff] [blame] | 528 | cfg.IntOpt('volume_size', |
| 529 | default=1, |
| 530 | help='Default size in GB for volumes created by volumes tests'), |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 531 | ] |
K Jonathan Harker | d6ba4b4 | 2012-12-18 13:50:47 -0800 | [diff] [blame] | 532 | |
Matthew Treinish | d5c9602 | 2013-10-17 21:51:23 +0000 | [diff] [blame] | 533 | volume_feature_group = cfg.OptGroup(name='volume-feature-enabled', |
| 534 | title='Enabled Cinder Features') |
| 535 | |
| 536 | VolumeFeaturesGroup = [ |
| 537 | cfg.BoolOpt('multi_backend', |
| 538 | default=False, |
Matthew Treinish | e3d2614 | 2013-11-26 19:14:58 +0000 | [diff] [blame] | 539 | help="Runs Cinder multi-backend test (requires 2 backends)"), |
Giulio Fidente | 74b08ad | 2014-01-18 04:02:51 +0100 | [diff] [blame] | 540 | cfg.BoolOpt('backup', |
| 541 | default=True, |
| 542 | help='Runs Cinder volumes backup test'), |
JordanP | bce5553 | 2014-03-19 12:10:32 +0100 | [diff] [blame] | 543 | cfg.BoolOpt('snapshot', |
| 544 | default=True, |
| 545 | help='Runs Cinder volume snapshot test'), |
Matthew Treinish | e3d2614 | 2013-11-26 19:14:58 +0000 | [diff] [blame] | 546 | cfg.ListOpt('api_extensions', |
| 547 | default=['all'], |
Zhi Kun Liu | de25c02 | 2014-02-14 13:25:19 +0800 | [diff] [blame] | 548 | help='A list of enabled volume extensions with a special ' |
| 549 | 'entry all which indicates every extension is enabled'), |
Zhi Kun Liu | bb363a2 | 2013-11-28 18:47:39 +0800 | [diff] [blame] | 550 | cfg.BoolOpt('api_v1', |
| 551 | default=True, |
| 552 | help="Is the v1 volume API enabled"), |
Zhi Kun Liu | 8cc3c84 | 2014-01-07 10:44:34 +0800 | [diff] [blame] | 553 | cfg.BoolOpt('api_v2', |
| 554 | default=True, |
| 555 | help="Is the v2 volume API enabled"), |
Matthew Treinish | d5c9602 | 2013-10-17 21:51:23 +0000 | [diff] [blame] | 556 | ] |
| 557 | |
Daryl Walleck | 587385b | 2012-03-03 13:00:26 -0600 | [diff] [blame] | 558 | |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 559 | object_storage_group = cfg.OptGroup(name='object-storage', |
| 560 | title='Object Storage Service Options') |
Attila Fazekas | a23f500 | 2012-10-23 19:32:45 +0200 | [diff] [blame] | 561 | |
DennyZhang | 1e71b61 | 2013-09-26 12:35:40 -0500 | [diff] [blame] | 562 | ObjectStoreGroup = [ |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 563 | cfg.StrOpt('catalog_type', |
| 564 | default='object-store', |
| 565 | help="Catalog type of the Object-Storage service."), |
Arata Notsu | 8f44039 | 2013-09-13 16:14:20 +0900 | [diff] [blame] | 566 | cfg.StrOpt('region', |
| 567 | default='', |
| 568 | help="The object-storage region name to use. If empty, the " |
| 569 | "value of identity.region is used instead. If no such " |
| 570 | "region is found in the service catalog, the first found " |
| 571 | "one is used."), |
JordanP | 5d29b2c | 2013-12-18 13:56:03 +0000 | [diff] [blame] | 572 | cfg.StrOpt('endpoint_type', |
| 573 | default='publicURL', |
| 574 | choices=['public', 'admin', 'internal', |
| 575 | 'publicURL', 'adminURL', 'internalURL'], |
| 576 | help="The endpoint type to use for the object-store service."), |
Matthew Treinish | f319a73 | 2013-10-24 21:39:24 +0000 | [diff] [blame] | 577 | cfg.IntOpt('container_sync_timeout', |
nayna-patel | b4989b3 | 2013-01-09 06:25:13 +0000 | [diff] [blame] | 578 | default=120, |
Fabien Boucher | 2178d31 | 2013-12-31 15:38:57 +0100 | [diff] [blame] | 579 | help="Number of seconds to time on waiting for a container " |
nayna-patel | b4989b3 | 2013-01-09 06:25:13 +0000 | [diff] [blame] | 580 | "to container synchronization complete."), |
Matthew Treinish | f319a73 | 2013-10-24 21:39:24 +0000 | [diff] [blame] | 581 | cfg.IntOpt('container_sync_interval', |
nayna-patel | b4989b3 | 2013-01-09 06:25:13 +0000 | [diff] [blame] | 582 | default=5, |
Fabien Boucher | 2178d31 | 2013-12-31 15:38:57 +0100 | [diff] [blame] | 583 | help="Number of seconds to wait while looping to check the " |
nayna-patel | b4989b3 | 2013-01-09 06:25:13 +0000 | [diff] [blame] | 584 | "status of a container to container synchronization"), |
Matthew Treinish | 3fdb80c | 2013-08-15 11:13:19 -0400 | [diff] [blame] | 585 | cfg.StrOpt('operator_role', |
| 586 | default='Member', |
| 587 | help="Role to add to users created for swift tests to " |
| 588 | "enable creating containers"), |
Matthew Treinish | 998c91d | 2014-03-01 12:39:49 -0500 | [diff] [blame] | 589 | cfg.StrOpt('reseller_admin_role', |
| 590 | default='ResellerAdmin', |
| 591 | help="User role that has reseller admin"), |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 592 | ] |
Attila Fazekas | a23f500 | 2012-10-23 19:32:45 +0200 | [diff] [blame] | 593 | |
Matthew Treinish | d5c9602 | 2013-10-17 21:51:23 +0000 | [diff] [blame] | 594 | object_storage_feature_group = cfg.OptGroup( |
| 595 | name='object-storage-feature-enabled', |
| 596 | title='Enabled object-storage features') |
| 597 | |
| 598 | ObjectStoreFeaturesGroup = [ |
Matthew Treinish | 2034538 | 2013-12-13 17:04:23 +0000 | [diff] [blame] | 599 | cfg.ListOpt('discoverable_apis', |
| 600 | default=['all'], |
| 601 | help="A list of the enabled optional discoverable apis. " |
| 602 | "A single entry, all, indicates that all of these " |
| 603 | "features are expected to be enabled"), |
Matthew Treinish | d5c9602 | 2013-10-17 21:51:23 +0000 | [diff] [blame] | 604 | ] |
| 605 | |
Nikhil Manchanda | dd6886f | 2014-03-03 01:58:45 -0800 | [diff] [blame] | 606 | database_group = cfg.OptGroup(name='database', |
| 607 | title='Database Service Options') |
| 608 | |
| 609 | DatabaseGroup = [ |
| 610 | cfg.StrOpt('catalog_type', |
| 611 | default='database', |
| 612 | help="Catalog type of the Database service."), |
| 613 | cfg.StrOpt('db_flavor_ref', |
| 614 | default="1", |
| 615 | help="Valid primary flavor to use in database tests."), |
Peter Stachowski | 320f9c7 | 2014-04-21 16:13:23 -0400 | [diff] [blame] | 616 | cfg.StrOpt('db_current_version', |
| 617 | default="v1.0", |
| 618 | help="Current database version to use in database tests."), |
Nikhil Manchanda | dd6886f | 2014-03-03 01:58:45 -0800 | [diff] [blame] | 619 | ] |
Attila Fazekas | a23f500 | 2012-10-23 19:32:45 +0200 | [diff] [blame] | 620 | |
Steve Baker | c60e4e3 | 2013-05-06 15:22:41 +1200 | [diff] [blame] | 621 | orchestration_group = cfg.OptGroup(name='orchestration', |
| 622 | title='Orchestration Service Options') |
| 623 | |
| 624 | OrchestrationGroup = [ |
| 625 | cfg.StrOpt('catalog_type', |
| 626 | default='orchestration', |
| 627 | help="Catalog type of the Orchestration service."), |
Arata Notsu | 8f44039 | 2013-09-13 16:14:20 +0900 | [diff] [blame] | 628 | cfg.StrOpt('region', |
| 629 | default='', |
| 630 | help="The orchestration region name to use. If empty, the " |
| 631 | "value of identity.region is used instead. If no such " |
| 632 | "region is found in the service catalog, the first found " |
| 633 | "one is used."), |
JordanP | 5d29b2c | 2013-12-18 13:56:03 +0000 | [diff] [blame] | 634 | cfg.StrOpt('endpoint_type', |
| 635 | default='publicURL', |
| 636 | choices=['public', 'admin', 'internal', |
| 637 | 'publicURL', 'adminURL', 'internalURL'], |
| 638 | help="The endpoint type to use for the orchestration service."), |
Steve Baker | c60e4e3 | 2013-05-06 15:22:41 +1200 | [diff] [blame] | 639 | cfg.BoolOpt('allow_tenant_isolation', |
| 640 | default=False, |
| 641 | help="Allows test cases to create/destroy tenants and " |
| 642 | "users. This option enables isolated test cases and " |
| 643 | "better parallel execution, but also requires that " |
| 644 | "OpenStack Identity API admin credentials are known."), |
| 645 | cfg.IntOpt('build_interval', |
| 646 | default=1, |
| 647 | help="Time in seconds between build status checks."), |
| 648 | cfg.IntOpt('build_timeout', |
Matthew Treinish | a2dfd49 | 2014-04-15 11:15:34 -0400 | [diff] [blame] | 649 | default=1200, |
Steve Baker | c60e4e3 | 2013-05-06 15:22:41 +1200 | [diff] [blame] | 650 | help="Timeout in seconds to wait for a stack to build."), |
Steve Baker | c60e4e3 | 2013-05-06 15:22:41 +1200 | [diff] [blame] | 651 | cfg.StrOpt('instance_type', |
Steve Baker | 9e86b83 | 2013-05-22 15:40:28 +1200 | [diff] [blame] | 652 | default='m1.micro', |
Steve Baker | c60e4e3 | 2013-05-06 15:22:41 +1200 | [diff] [blame] | 653 | help="Instance type for tests. Needs to be big enough for a " |
| 654 | "full OS plus the test workload"), |
| 655 | cfg.StrOpt('image_ref', |
| 656 | default=None, |
| 657 | help="Name of heat-cfntools enabled image to use when " |
| 658 | "launching test instances."), |
| 659 | cfg.StrOpt('keypair_name', |
| 660 | default=None, |
| 661 | help="Name of existing keypair to launch servers with."), |
Clint Byrum | 71f2763 | 2013-09-09 11:41:32 -0700 | [diff] [blame] | 662 | cfg.IntOpt('max_template_size', |
Joe Gordon | 0e51b22 | 2013-10-24 14:11:10 +0100 | [diff] [blame] | 663 | default=524288, |
Clint Byrum | 71f2763 | 2013-09-09 11:41:32 -0700 | [diff] [blame] | 664 | help="Value must match heat configuration of the same name."), |
Steven Hardy | fdc6bd7 | 2014-03-21 16:56:04 +0000 | [diff] [blame] | 665 | cfg.IntOpt('max_resources_per_stack', |
| 666 | default=1000, |
| 667 | help="Value must match heat configuration of the same name."), |
Steve Baker | c60e4e3 | 2013-05-06 15:22:41 +1200 | [diff] [blame] | 668 | ] |
| 669 | |
| 670 | |
Yassine Lamgarchal | b158d41 | 2013-12-27 19:29:42 +0100 | [diff] [blame] | 671 | telemetry_group = cfg.OptGroup(name='telemetry', |
| 672 | title='Telemetry Service Options') |
| 673 | |
| 674 | TelemetryGroup = [ |
| 675 | cfg.StrOpt('catalog_type', |
| 676 | default='metering', |
| 677 | help="Catalog type of the Telemetry service."), |
JordanP | fc62c90 | 2014-02-26 14:47:28 +0000 | [diff] [blame] | 678 | cfg.StrOpt('endpoint_type', |
| 679 | default='publicURL', |
| 680 | choices=['public', 'admin', 'internal', |
| 681 | 'publicURL', 'adminURL', 'internalURL'], |
| 682 | help="The endpoint type to use for the telemetry service."), |
Vadim Rovachev | 7bcea35 | 2013-12-26 15:56:17 +0400 | [diff] [blame] | 683 | cfg.BoolOpt('too_slow_to_test', |
| 684 | default=True, |
| 685 | help="This variable is used as flag to enable " |
| 686 | "notification tests") |
Yassine Lamgarchal | b158d41 | 2013-12-27 19:29:42 +0100 | [diff] [blame] | 687 | ] |
| 688 | |
| 689 | |
Julie Pichon | d101764 | 2013-07-24 16:37:23 +0100 | [diff] [blame] | 690 | dashboard_group = cfg.OptGroup(name="dashboard", |
| 691 | title="Dashboard options") |
| 692 | |
| 693 | DashboardGroup = [ |
| 694 | cfg.StrOpt('dashboard_url', |
| 695 | default='http://localhost/', |
| 696 | help="Where the dashboard can be found"), |
| 697 | cfg.StrOpt('login_url', |
| 698 | default='http://localhost/auth/login/', |
| 699 | help="Login page for the dashboard"), |
| 700 | ] |
| 701 | |
| 702 | |
Sergey Lukjanov | cec6c3f | 2013-12-10 12:38:21 +0400 | [diff] [blame] | 703 | data_processing_group = cfg.OptGroup(name="data_processing", |
| 704 | title="Data Processing options") |
| 705 | |
| 706 | DataProcessingGroup = [ |
| 707 | cfg.StrOpt('catalog_type', |
| 708 | default='data_processing', |
JordanP | fc62c90 | 2014-02-26 14:47:28 +0000 | [diff] [blame] | 709 | help="Catalog type of the data processing service."), |
| 710 | cfg.StrOpt('endpoint_type', |
| 711 | default='publicURL', |
| 712 | choices=['public', 'admin', 'internal', |
| 713 | 'publicURL', 'adminURL', 'internalURL'], |
| 714 | help="The endpoint type to use for the data processing " |
| 715 | "service."), |
Sergey Lukjanov | cec6c3f | 2013-12-10 12:38:21 +0400 | [diff] [blame] | 716 | ] |
| 717 | |
| 718 | |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 719 | boto_group = cfg.OptGroup(name='boto', |
| 720 | title='EC2/S3 options') |
DennyZhang | 1e71b61 | 2013-09-26 12:35:40 -0500 | [diff] [blame] | 721 | BotoGroup = [ |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 722 | cfg.StrOpt('ec2_url', |
| 723 | default="http://localhost:8773/services/Cloud", |
| 724 | help="EC2 URL"), |
| 725 | cfg.StrOpt('s3_url', |
| 726 | default="http://localhost:8080", |
| 727 | help="S3 URL"), |
| 728 | cfg.StrOpt('aws_secret', |
| 729 | default=None, |
| 730 | help="AWS Secret Key", |
| 731 | secret=True), |
| 732 | cfg.StrOpt('aws_access', |
| 733 | default=None, |
| 734 | help="AWS Access Key"), |
Attila Fazekas | 27dd92e | 2014-02-21 14:49:40 +0100 | [diff] [blame] | 735 | cfg.StrOpt('aws_zone', |
| 736 | default="nova", |
| 737 | help="AWS Zone for EC2 tests"), |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 738 | cfg.StrOpt('s3_materials_path', |
| 739 | default="/opt/stack/devstack/files/images/" |
| 740 | "s3-materials/cirros-0.3.0", |
| 741 | help="S3 Materials Path"), |
| 742 | cfg.StrOpt('ari_manifest', |
| 743 | default="cirros-0.3.0-x86_64-initrd.manifest.xml", |
| 744 | help="ARI Ramdisk Image manifest"), |
| 745 | cfg.StrOpt('ami_manifest', |
| 746 | default="cirros-0.3.0-x86_64-blank.img.manifest.xml", |
| 747 | help="AMI Machine Image manifest"), |
| 748 | cfg.StrOpt('aki_manifest', |
| 749 | default="cirros-0.3.0-x86_64-vmlinuz.manifest.xml", |
| 750 | help="AKI Kernel Image manifest"), |
| 751 | cfg.StrOpt('instance_type', |
| 752 | default="m1.tiny", |
| 753 | help="Instance type"), |
| 754 | cfg.IntOpt('http_socket_timeout', |
| 755 | default=3, |
| 756 | help="boto Http socket timeout"), |
| 757 | cfg.IntOpt('num_retries', |
| 758 | default=1, |
| 759 | help="boto num_retries on error"), |
| 760 | cfg.IntOpt('build_timeout', |
| 761 | default=60, |
| 762 | help="Status Change Timeout"), |
| 763 | cfg.IntOpt('build_interval', |
| 764 | default=1, |
| 765 | help="Status Change Test Interval"), |
| 766 | ] |
Attila Fazekas | f7f2d93 | 2012-12-13 09:14:38 +0100 | [diff] [blame] | 767 | |
Matthew Treinish | 615ea6a | 2013-02-25 17:26:59 -0500 | [diff] [blame] | 768 | stress_group = cfg.OptGroup(name='stress', title='Stress Test Options') |
| 769 | |
| 770 | StressGroup = [ |
| 771 | cfg.StrOpt('nova_logdir', |
| 772 | default=None, |
| 773 | help='Directory containing log files on the compute nodes'), |
| 774 | cfg.IntOpt('max_instances', |
| 775 | default=16, |
| 776 | help='Maximum number of instances to create during test.'), |
| 777 | cfg.StrOpt('controller', |
| 778 | default=None, |
David Kranz | b9d9750 | 2013-05-01 15:55:04 -0400 | [diff] [blame] | 779 | help='Controller host.'), |
| 780 | # new stress options |
| 781 | cfg.StrOpt('target_controller', |
| 782 | default=None, |
| 783 | help='Controller host.'), |
| 784 | cfg.StrOpt('target_ssh_user', |
| 785 | default=None, |
| 786 | help='ssh user.'), |
| 787 | cfg.StrOpt('target_private_key_path', |
| 788 | default=None, |
| 789 | help='Path to private key.'), |
| 790 | cfg.StrOpt('target_logfiles', |
| 791 | default=None, |
| 792 | help='regexp for list of log files.'), |
Matthew Treinish | f319a73 | 2013-10-24 21:39:24 +0000 | [diff] [blame] | 793 | cfg.IntOpt('log_check_interval', |
David Kranz | b9d9750 | 2013-05-01 15:55:04 -0400 | [diff] [blame] | 794 | default=60, |
Marc Koderer | 32221b8e | 2013-08-23 13:57:50 +0200 | [diff] [blame] | 795 | help='time (in seconds) between log file error checks.'), |
Matthew Treinish | f319a73 | 2013-10-24 21:39:24 +0000 | [diff] [blame] | 796 | cfg.IntOpt('default_thread_number_per_action', |
Marc Koderer | 32221b8e | 2013-08-23 13:57:50 +0200 | [diff] [blame] | 797 | default=4, |
Julien Leloup | 04d40f7 | 2014-01-28 11:17:18 +0100 | [diff] [blame] | 798 | help='The number of threads created while stress test.'), |
| 799 | cfg.BoolOpt('leave_dirty_stack', |
| 800 | default=False, |
| 801 | help='Prevent the cleaning (tearDownClass()) between' |
| 802 | ' each stress test run if an exception occurs' |
Julien Leloup | a5ee542 | 2014-02-13 14:29:02 +0100 | [diff] [blame] | 803 | ' during this run.'), |
| 804 | cfg.BoolOpt('full_clean_stack', |
| 805 | default=False, |
| 806 | help='Allows a full cleaning process after a stress test.' |
| 807 | ' Caution : this cleanup will remove every objects of' |
| 808 | ' every tenant.') |
Matthew Treinish | 615ea6a | 2013-02-25 17:26:59 -0500 | [diff] [blame] | 809 | ] |
| 810 | |
| 811 | |
Masayuki Igawa | 73d9f3a | 2013-05-24 10:30:01 +0900 | [diff] [blame] | 812 | scenario_group = cfg.OptGroup(name='scenario', title='Scenario Test Options') |
| 813 | |
| 814 | ScenarioGroup = [ |
| 815 | cfg.StrOpt('img_dir', |
| 816 | default='/opt/stack/new/devstack/files/images/' |
| 817 | 'cirros-0.3.1-x86_64-uec', |
| 818 | help='Directory containing image files'), |
Masayuki Igawa | 4f71bf0 | 2014-02-21 14:02:29 +0900 | [diff] [blame] | 819 | cfg.StrOpt('qcow2_img_file', |
| 820 | default='cirros-0.3.1-x86_64-disk.img', |
| 821 | help='QCOW2 image file name'), |
Masayuki Igawa | 73d9f3a | 2013-05-24 10:30:01 +0900 | [diff] [blame] | 822 | cfg.StrOpt('ami_img_file', |
| 823 | default='cirros-0.3.1-x86_64-blank.img', |
| 824 | help='AMI image file name'), |
| 825 | cfg.StrOpt('ari_img_file', |
| 826 | default='cirros-0.3.1-x86_64-initrd', |
| 827 | help='ARI image file name'), |
| 828 | cfg.StrOpt('aki_img_file', |
| 829 | default='cirros-0.3.1-x86_64-vmlinuz', |
| 830 | help='AKI image file name'), |
| 831 | cfg.StrOpt('ssh_user', |
| 832 | default='cirros', |
Joe Gordon | b5e10cd | 2013-07-10 15:51:12 +0000 | [diff] [blame] | 833 | help='ssh username for the image file'), |
| 834 | cfg.IntOpt( |
| 835 | 'large_ops_number', |
| 836 | default=0, |
| 837 | help="specifies how many resources to request at once. Used " |
| 838 | "for large operations testing.") |
Masayuki Igawa | 73d9f3a | 2013-05-24 10:30:01 +0900 | [diff] [blame] | 839 | ] |
| 840 | |
| 841 | |
Matthew Treinish | 4c41292 | 2013-07-16 15:27:42 -0400 | [diff] [blame] | 842 | service_available_group = cfg.OptGroup(name="service_available", |
| 843 | title="Available OpenStack Services") |
| 844 | |
| 845 | ServiceAvailableGroup = [ |
| 846 | cfg.BoolOpt('cinder', |
| 847 | default=True, |
| 848 | help="Whether or not cinder is expected to be available"), |
Matthew Treinish | faa340d | 2013-07-19 16:26:21 -0400 | [diff] [blame] | 849 | cfg.BoolOpt('neutron', |
| 850 | default=False, |
| 851 | help="Whether or not neutron is expected to be available"), |
Matthew Treinish | 853ae44 | 2013-07-19 16:36:07 -0400 | [diff] [blame] | 852 | cfg.BoolOpt('glance', |
| 853 | default=True, |
| 854 | help="Whether or not glance is expected to be available"), |
Matthew Treinish | 61e332b | 2013-07-19 16:42:31 -0400 | [diff] [blame] | 855 | cfg.BoolOpt('swift', |
| 856 | default=True, |
| 857 | help="Whether or not swift is expected to be available"), |
Matthew Treinish | 6b41e24 | 2013-07-19 16:49:28 -0400 | [diff] [blame] | 858 | cfg.BoolOpt('nova', |
| 859 | default=True, |
| 860 | help="Whether or not nova is expected to be available"), |
Matthew Treinish | a9d4388 | 2013-07-19 16:54:52 -0400 | [diff] [blame] | 861 | cfg.BoolOpt('heat', |
| 862 | default=False, |
| 863 | help="Whether or not Heat is expected to be available"), |
Mehdi Abaakouk | 8581c0b | 2013-10-04 10:45:42 +0200 | [diff] [blame] | 864 | cfg.BoolOpt('ceilometer', |
| 865 | default=True, |
| 866 | help="Whether or not Ceilometer is expected to be available"), |
Julie Pichon | d101764 | 2013-07-24 16:37:23 +0100 | [diff] [blame] | 867 | cfg.BoolOpt('horizon', |
| 868 | default=True, |
| 869 | help="Whether or not Horizon is expected to be available"), |
Sergey Lukjanov | 9c95a25 | 2014-03-13 23:59:22 +0400 | [diff] [blame] | 870 | cfg.BoolOpt('sahara', |
Sergey Lukjanov | cec6c3f | 2013-12-10 12:38:21 +0400 | [diff] [blame] | 871 | default=False, |
Sergey Lukjanov | 9c95a25 | 2014-03-13 23:59:22 +0400 | [diff] [blame] | 872 | help="Whether or not Sahara is expected to be available"), |
Roman Prykhodchenko | 62b1ed1 | 2013-10-16 21:51:47 +0300 | [diff] [blame] | 873 | cfg.BoolOpt('ironic', |
| 874 | default=False, |
| 875 | help="Whether or not Ironic is expected to be available"), |
Nikhil Manchanda | dd6886f | 2014-03-03 01:58:45 -0800 | [diff] [blame] | 876 | cfg.BoolOpt('trove', |
| 877 | default=False, |
| 878 | help="Whether or not Trove is expected to be available"), |
Malini Kamalambal | 6e7b3b8 | 2014-02-06 06:49:04 -0500 | [diff] [blame] | 879 | cfg.BoolOpt('marconi', |
| 880 | default=False, |
| 881 | help="Whether or not Marconi is expected to be available"), |
Matthew Treinish | 4c41292 | 2013-07-16 15:27:42 -0400 | [diff] [blame] | 882 | ] |
| 883 | |
Attila Fazekas | aeeeefd | 2013-08-06 17:01:56 +0200 | [diff] [blame] | 884 | debug_group = cfg.OptGroup(name="debug", |
| 885 | title="Debug System") |
| 886 | |
| 887 | DebugGroup = [ |
| 888 | cfg.BoolOpt('enable', |
| 889 | default=True, |
| 890 | help="Enable diagnostic commands"), |
Sean Dague | c522c09 | 2014-03-24 10:43:22 -0400 | [diff] [blame] | 891 | cfg.StrOpt('trace_requests', |
| 892 | default='', |
| 893 | help="""A regex to determine which requests should be traced. |
| 894 | |
| 895 | This is a regex to match the caller for rest client requests to be able to |
| 896 | selectively trace calls out of specific classes and methods. It largely |
| 897 | exists for test development, and is not expected to be used in a real deploy |
| 898 | of tempest. This will be matched against the discovered ClassName:method |
| 899 | in the test environment. |
| 900 | |
| 901 | Expected values for this field are: |
| 902 | |
| 903 | * ClassName:test_method_name - traces one test_method |
| 904 | * ClassName:setUp(Class) - traces specific setup functions |
| 905 | * ClassName:tearDown(Class) - traces specific teardown functions |
| 906 | * ClassName:_run_cleanups - traces the cleanup functions |
| 907 | |
| 908 | If nothing is specified, this feature is not enabled. To trace everything |
| 909 | specify .* as the regex. |
| 910 | """) |
Attila Fazekas | aeeeefd | 2013-08-06 17:01:56 +0200 | [diff] [blame] | 911 | ] |
| 912 | |
Andrea Frittoli | f5da28b | 2013-12-06 07:08:07 +0000 | [diff] [blame] | 913 | input_scenario_group = cfg.OptGroup(name="input-scenario", |
| 914 | title="Filters and values for" |
| 915 | " input scenarios") |
| 916 | |
| 917 | InputScenarioGroup = [ |
| 918 | cfg.StrOpt('image_regex', |
| 919 | default='^cirros-0.3.1-x86_64-uec$', |
| 920 | help="Matching images become parameters for scenario tests"), |
| 921 | cfg.StrOpt('flavor_regex', |
Andrea Frittoli | 99901c0 | 2014-01-30 18:06:49 +0000 | [diff] [blame] | 922 | default='^m1.nano$', |
Andrea Frittoli | f5da28b | 2013-12-06 07:08:07 +0000 | [diff] [blame] | 923 | help="Matching flavors become parameters for scenario tests"), |
| 924 | cfg.StrOpt('non_ssh_image_regex', |
| 925 | default='^.*[Ww]in.*$', |
| 926 | help="SSH verification in tests is skipped" |
| 927 | "for matching images"), |
| 928 | cfg.StrOpt('ssh_user_regex', |
| 929 | default="[[\"^.*[Cc]irros.*$\", \"root\"]]", |
| 930 | help="List of user mapped to regex " |
| 931 | "to matching image names."), |
| 932 | ] |
| 933 | |
Attila Fazekas | aeeeefd | 2013-08-06 17:01:56 +0200 | [diff] [blame] | 934 | |
Roman Prykhodchenko | 62b1ed1 | 2013-10-16 21:51:47 +0300 | [diff] [blame] | 935 | baremetal_group = cfg.OptGroup(name='baremetal', |
| 936 | title='Baremetal provisioning service options') |
| 937 | |
| 938 | BaremetalGroup = [ |
| 939 | cfg.StrOpt('catalog_type', |
| 940 | default='baremetal', |
Adam Gandelman | 4a48a60 | 2014-03-20 18:23:18 -0700 | [diff] [blame] | 941 | help="Catalog type of the baremetal provisioning service"), |
| 942 | cfg.BoolOpt('driver_enabled', |
| 943 | default=False, |
| 944 | help="Whether the Ironic nova-compute driver is enabled"), |
Yuiko Takada | 1ee1b32 | 2014-07-04 09:55:30 +0900 | [diff] [blame] | 945 | cfg.StrOpt('driver', |
| 946 | default='fake', |
| 947 | help="Driver name which Ironic uses"), |
JordanP | fc62c90 | 2014-02-26 14:47:28 +0000 | [diff] [blame] | 948 | cfg.StrOpt('endpoint_type', |
| 949 | default='publicURL', |
| 950 | choices=['public', 'admin', 'internal', |
| 951 | 'publicURL', 'adminURL', 'internalURL'], |
| 952 | help="The endpoint type to use for the baremetal provisioning " |
Adam Gandelman | 4a48a60 | 2014-03-20 18:23:18 -0700 | [diff] [blame] | 953 | "service"), |
| 954 | cfg.IntOpt('active_timeout', |
| 955 | default=300, |
| 956 | help="Timeout for Ironic node to completely provision"), |
| 957 | cfg.IntOpt('association_timeout', |
Adam Gandelman | e42f092 | 2014-06-10 15:26:37 -0700 | [diff] [blame] | 958 | default=30, |
Adam Gandelman | 4a48a60 | 2014-03-20 18:23:18 -0700 | [diff] [blame] | 959 | help="Timeout for association of Nova instance and Ironic " |
| 960 | "node"), |
| 961 | cfg.IntOpt('power_timeout', |
Adam Gandelman | e42f092 | 2014-06-10 15:26:37 -0700 | [diff] [blame] | 962 | default=60, |
Adam Gandelman | 4a48a60 | 2014-03-20 18:23:18 -0700 | [diff] [blame] | 963 | help="Timeout for Ironic power transitions."), |
| 964 | cfg.IntOpt('unprovision_timeout', |
Adam Gandelman | e42f092 | 2014-06-10 15:26:37 -0700 | [diff] [blame] | 965 | default=60, |
Adam Gandelman | 4a48a60 | 2014-03-20 18:23:18 -0700 | [diff] [blame] | 966 | help="Timeout for unprovisioning an Ironic node.") |
Roman Prykhodchenko | 62b1ed1 | 2013-10-16 21:51:47 +0300 | [diff] [blame] | 967 | ] |
| 968 | |
Matthew Treinish | e2b56b5 | 2014-01-29 19:25:50 +0000 | [diff] [blame] | 969 | cli_group = cfg.OptGroup(name='cli', title="cli Configuration Options") |
| 970 | |
| 971 | CLIGroup = [ |
| 972 | cfg.BoolOpt('enabled', |
| 973 | default=True, |
| 974 | help="enable cli tests"), |
| 975 | cfg.StrOpt('cli_dir', |
| 976 | default='/usr/local/bin', |
| 977 | help="directory where python client binaries are located"), |
Sean Dague | 44b2468 | 2014-02-20 19:08:24 -0500 | [diff] [blame] | 978 | cfg.BoolOpt('has_manage', |
| 979 | default=True, |
| 980 | help=("Whether the tempest run location has access to the " |
| 981 | "*-manage commands. In a pure blackbox environment " |
| 982 | "it will not.")), |
Matthew Treinish | e2b56b5 | 2014-01-29 19:25:50 +0000 | [diff] [blame] | 983 | cfg.IntOpt('timeout', |
| 984 | default=15, |
| 985 | help="Number of seconds to wait on a CLI timeout"), |
| 986 | ] |
| 987 | |
Marc Koderer | 6ee82dc | 2014-02-17 10:26:29 +0100 | [diff] [blame] | 988 | negative_group = cfg.OptGroup(name='negative', title="Negative Test Options") |
| 989 | |
| 990 | NegativeGroup = [ |
| 991 | cfg.StrOpt('test_generator', |
| 992 | default='tempest.common.' + |
| 993 | 'generator.negative_generator.NegativeTestGenerator', |
| 994 | help="Test generator class for all negative tests"), |
| 995 | ] |
| 996 | |
Roman Prykhodchenko | 62b1ed1 | 2013-10-16 21:51:47 +0300 | [diff] [blame] | 997 | |
Matthew Treinish | 43b296a | 2014-02-28 15:23:00 -0500 | [diff] [blame] | 998 | def register_opts(): |
| 999 | register_opt_group(cfg.CONF, compute_group, ComputeGroup) |
| 1000 | register_opt_group(cfg.CONF, compute_features_group, |
| 1001 | ComputeFeaturesGroup) |
| 1002 | register_opt_group(cfg.CONF, identity_group, IdentityGroup) |
| 1003 | register_opt_group(cfg.CONF, identity_feature_group, |
| 1004 | IdentityFeatureGroup) |
| 1005 | register_opt_group(cfg.CONF, image_group, ImageGroup) |
| 1006 | register_opt_group(cfg.CONF, image_feature_group, ImageFeaturesGroup) |
| 1007 | register_opt_group(cfg.CONF, network_group, NetworkGroup) |
| 1008 | register_opt_group(cfg.CONF, network_feature_group, |
| 1009 | NetworkFeaturesGroup) |
Malini Kamalambal | 6e7b3b8 | 2014-02-06 06:49:04 -0500 | [diff] [blame] | 1010 | register_opt_group(cfg.CONF, queuing_group, QueuingGroup) |
Matthew Treinish | 43b296a | 2014-02-28 15:23:00 -0500 | [diff] [blame] | 1011 | register_opt_group(cfg.CONF, volume_group, VolumeGroup) |
| 1012 | register_opt_group(cfg.CONF, volume_feature_group, |
| 1013 | VolumeFeaturesGroup) |
| 1014 | register_opt_group(cfg.CONF, object_storage_group, ObjectStoreGroup) |
| 1015 | register_opt_group(cfg.CONF, object_storage_feature_group, |
| 1016 | ObjectStoreFeaturesGroup) |
Nikhil Manchanda | dd6886f | 2014-03-03 01:58:45 -0800 | [diff] [blame] | 1017 | register_opt_group(cfg.CONF, database_group, DatabaseGroup) |
Matthew Treinish | 43b296a | 2014-02-28 15:23:00 -0500 | [diff] [blame] | 1018 | register_opt_group(cfg.CONF, orchestration_group, OrchestrationGroup) |
| 1019 | register_opt_group(cfg.CONF, telemetry_group, TelemetryGroup) |
| 1020 | register_opt_group(cfg.CONF, dashboard_group, DashboardGroup) |
| 1021 | register_opt_group(cfg.CONF, data_processing_group, |
| 1022 | DataProcessingGroup) |
| 1023 | register_opt_group(cfg.CONF, boto_group, BotoGroup) |
| 1024 | register_opt_group(cfg.CONF, compute_admin_group, ComputeAdminGroup) |
| 1025 | register_opt_group(cfg.CONF, stress_group, StressGroup) |
| 1026 | register_opt_group(cfg.CONF, scenario_group, ScenarioGroup) |
| 1027 | register_opt_group(cfg.CONF, service_available_group, |
| 1028 | ServiceAvailableGroup) |
| 1029 | register_opt_group(cfg.CONF, debug_group, DebugGroup) |
| 1030 | register_opt_group(cfg.CONF, baremetal_group, BaremetalGroup) |
| 1031 | register_opt_group(cfg.CONF, input_scenario_group, InputScenarioGroup) |
| 1032 | register_opt_group(cfg.CONF, cli_group, CLIGroup) |
Marc Koderer | 6ee82dc | 2014-02-17 10:26:29 +0100 | [diff] [blame] | 1033 | register_opt_group(cfg.CONF, negative_group, NegativeGroup) |
Matthew Treinish | 43b296a | 2014-02-28 15:23:00 -0500 | [diff] [blame] | 1034 | |
| 1035 | |
Sean Dague | 3b9b1f3 | 2013-12-20 17:04:54 -0500 | [diff] [blame] | 1036 | # this should never be called outside of this class |
| 1037 | class TempestConfigPrivate(object): |
Daryl Walleck | 1465d61 | 2011-11-02 02:22:15 -0500 | [diff] [blame] | 1038 | """Provides OpenStack configuration information.""" |
| 1039 | |
Brian Waldon | 738cd63 | 2011-12-12 18:45:09 -0500 | [diff] [blame] | 1040 | DEFAULT_CONFIG_DIR = os.path.join( |
Zhongyue Luo | a1343de | 2013-01-04 16:21:35 +0800 | [diff] [blame] | 1041 | os.path.abspath(os.path.dirname(os.path.dirname(__file__))), |
Brian Waldon | 738cd63 | 2011-12-12 18:45:09 -0500 | [diff] [blame] | 1042 | "etc") |
Daryl Walleck | 1465d61 | 2011-11-02 02:22:15 -0500 | [diff] [blame] | 1043 | |
Brian Waldon | 738cd63 | 2011-12-12 18:45:09 -0500 | [diff] [blame] | 1044 | DEFAULT_CONFIG_FILE = "tempest.conf" |
| 1045 | |
Matthew Treinish | 43b296a | 2014-02-28 15:23:00 -0500 | [diff] [blame] | 1046 | def _set_attrs(self): |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 1047 | self.compute = cfg.CONF.compute |
Matthew Treinish | d5c9602 | 2013-10-17 21:51:23 +0000 | [diff] [blame] | 1048 | self.compute_feature_enabled = cfg.CONF['compute-feature-enabled'] |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 1049 | self.identity = cfg.CONF.identity |
Matthew Treinish | d5021a7 | 2014-01-09 18:42:51 +0000 | [diff] [blame] | 1050 | self.identity_feature_enabled = cfg.CONF['identity-feature-enabled'] |
Matt Riedemann | d3efe90 | 2014-02-10 06:46:38 -0800 | [diff] [blame] | 1051 | self.image = cfg.CONF.image |
Matthew Treinish | 2b5287d | 2013-10-22 17:40:34 +0000 | [diff] [blame] | 1052 | self.image_feature_enabled = cfg.CONF['image-feature-enabled'] |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 1053 | self.network = cfg.CONF.network |
Matthew Treinish | e3d2614 | 2013-11-26 19:14:58 +0000 | [diff] [blame] | 1054 | self.network_feature_enabled = cfg.CONF['network-feature-enabled'] |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 1055 | self.volume = cfg.CONF.volume |
Matthew Treinish | d5c9602 | 2013-10-17 21:51:23 +0000 | [diff] [blame] | 1056 | self.volume_feature_enabled = cfg.CONF['volume-feature-enabled'] |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 1057 | self.object_storage = cfg.CONF['object-storage'] |
Matthew Treinish | d5c9602 | 2013-10-17 21:51:23 +0000 | [diff] [blame] | 1058 | self.object_storage_feature_enabled = cfg.CONF[ |
| 1059 | 'object-storage-feature-enabled'] |
Nikhil Manchanda | dd6886f | 2014-03-03 01:58:45 -0800 | [diff] [blame] | 1060 | self.database = cfg.CONF.database |
Steve Baker | c60e4e3 | 2013-05-06 15:22:41 +1200 | [diff] [blame] | 1061 | self.orchestration = cfg.CONF.orchestration |
Malini Kamalambal | 6e7b3b8 | 2014-02-06 06:49:04 -0500 | [diff] [blame] | 1062 | self.queuing = cfg.CONF.queuing |
Yassine Lamgarchal | b158d41 | 2013-12-27 19:29:42 +0100 | [diff] [blame] | 1063 | self.telemetry = cfg.CONF.telemetry |
Julie Pichon | d101764 | 2013-07-24 16:37:23 +0100 | [diff] [blame] | 1064 | self.dashboard = cfg.CONF.dashboard |
Sergey Lukjanov | cec6c3f | 2013-12-10 12:38:21 +0400 | [diff] [blame] | 1065 | self.data_processing = cfg.CONF.data_processing |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 1066 | self.boto = cfg.CONF.boto |
Attila Fazekas | cadcb1f | 2013-01-21 23:10:53 +0100 | [diff] [blame] | 1067 | self.compute_admin = cfg.CONF['compute-admin'] |
Matthew Treinish | 615ea6a | 2013-02-25 17:26:59 -0500 | [diff] [blame] | 1068 | self.stress = cfg.CONF.stress |
Masayuki Igawa | 73d9f3a | 2013-05-24 10:30:01 +0900 | [diff] [blame] | 1069 | self.scenario = cfg.CONF.scenario |
Matthew Treinish | 4c41292 | 2013-07-16 15:27:42 -0400 | [diff] [blame] | 1070 | self.service_available = cfg.CONF.service_available |
Attila Fazekas | 5fae7a3 | 2013-09-25 16:52:44 +0200 | [diff] [blame] | 1071 | self.debug = cfg.CONF.debug |
Roman Prykhodchenko | 62b1ed1 | 2013-10-16 21:51:47 +0300 | [diff] [blame] | 1072 | self.baremetal = cfg.CONF.baremetal |
Andrea Frittoli | f5da28b | 2013-12-06 07:08:07 +0000 | [diff] [blame] | 1073 | self.input_scenario = cfg.CONF['input-scenario'] |
Matthew Treinish | e2b56b5 | 2014-01-29 19:25:50 +0000 | [diff] [blame] | 1074 | self.cli = cfg.CONF.cli |
Marc Koderer | 6ee82dc | 2014-02-17 10:26:29 +0100 | [diff] [blame] | 1075 | self.negative = cfg.CONF.negative |
Attila Fazekas | cadcb1f | 2013-01-21 23:10:53 +0100 | [diff] [blame] | 1076 | if not self.compute_admin.username: |
| 1077 | self.compute_admin.username = self.identity.admin_username |
| 1078 | self.compute_admin.password = self.identity.admin_password |
| 1079 | self.compute_admin.tenant_name = self.identity.admin_tenant_name |
Andrea Frittoli | b1b04bb | 2014-04-06 11:57:07 +0100 | [diff] [blame] | 1080 | cfg.CONF.set_default('domain_name', self.identity.admin_domain_name, |
| 1081 | group='identity') |
| 1082 | cfg.CONF.set_default('alt_domain_name', |
| 1083 | self.identity.admin_domain_name, |
| 1084 | group='identity') |
| 1085 | cfg.CONF.set_default('domain_name', self.identity.admin_domain_name, |
| 1086 | group='compute-admin') |
Sean Dague | 86bd842 | 2013-12-20 09:56:44 -0500 | [diff] [blame] | 1087 | |
Joe Gordon | 28a84ae | 2014-07-17 15:38:28 +0000 | [diff] [blame^] | 1088 | def __init__(self, parse_conf=True, config_path=None): |
Matthew Treinish | 43b296a | 2014-02-28 15:23:00 -0500 | [diff] [blame] | 1089 | """Initialize a configuration from a conf directory and conf file.""" |
| 1090 | super(TempestConfigPrivate, self).__init__() |
| 1091 | config_files = [] |
| 1092 | failsafe_path = "/etc/tempest/" + self.DEFAULT_CONFIG_FILE |
| 1093 | |
Joe Gordon | 28a84ae | 2014-07-17 15:38:28 +0000 | [diff] [blame^] | 1094 | if config_path: |
| 1095 | path = config_path |
| 1096 | else: |
| 1097 | # Environment variables override defaults... |
| 1098 | conf_dir = os.environ.get('TEMPEST_CONFIG_DIR', |
| 1099 | self.DEFAULT_CONFIG_DIR) |
| 1100 | conf_file = os.environ.get('TEMPEST_CONFIG', |
| 1101 | self.DEFAULT_CONFIG_FILE) |
Matthew Treinish | 43b296a | 2014-02-28 15:23:00 -0500 | [diff] [blame] | 1102 | |
Joe Gordon | 28a84ae | 2014-07-17 15:38:28 +0000 | [diff] [blame^] | 1103 | path = os.path.join(conf_dir, conf_file) |
Matthew Treinish | 43b296a | 2014-02-28 15:23:00 -0500 | [diff] [blame] | 1104 | |
| 1105 | if not os.path.isfile(path): |
| 1106 | path = failsafe_path |
| 1107 | |
| 1108 | # only parse the config file if we expect one to exist. This is needed |
| 1109 | # to remove an issue with the config file up to date checker. |
| 1110 | if parse_conf: |
| 1111 | config_files.append(path) |
| 1112 | |
| 1113 | cfg.CONF([], project='tempest', default_config_files=config_files) |
| 1114 | logging.setup('tempest') |
| 1115 | LOG = logging.getLogger('tempest') |
| 1116 | LOG.info("Using tempest config file %s" % path) |
| 1117 | register_opts() |
| 1118 | self._set_attrs() |
Masayuki Igawa | 9ec4cd8 | 2014-02-05 15:04:16 +0900 | [diff] [blame] | 1119 | if parse_conf: |
| 1120 | cfg.CONF.log_opt_values(LOG, std_logging.DEBUG) |
| 1121 | |
Sean Dague | 86bd842 | 2013-12-20 09:56:44 -0500 | [diff] [blame] | 1122 | |
| 1123 | class TempestConfigProxy(object): |
| 1124 | _config = None |
Joe Gordon | 28a84ae | 2014-07-17 15:38:28 +0000 | [diff] [blame^] | 1125 | _path = None |
Sean Dague | 86bd842 | 2013-12-20 09:56:44 -0500 | [diff] [blame] | 1126 | |
Sean Dague | db6ac6c | 2014-06-06 16:52:44 -0400 | [diff] [blame] | 1127 | _extra_log_defaults = [ |
| 1128 | 'keystoneclient.session=INFO', |
| 1129 | 'paramiko.transport=INFO', |
| 1130 | 'requests.packages.urllib3.connectionpool=WARN' |
| 1131 | ] |
| 1132 | |
| 1133 | def _fix_log_levels(self): |
| 1134 | """Tweak the oslo log defaults.""" |
| 1135 | for opt in logging.log_opts: |
| 1136 | if opt.dest == 'default_log_levels': |
| 1137 | opt.default.extend(self._extra_log_defaults) |
| 1138 | |
Sean Dague | 86bd842 | 2013-12-20 09:56:44 -0500 | [diff] [blame] | 1139 | def __getattr__(self, attr): |
| 1140 | if not self._config: |
Sean Dague | db6ac6c | 2014-06-06 16:52:44 -0400 | [diff] [blame] | 1141 | self._fix_log_levels() |
Joe Gordon | 28a84ae | 2014-07-17 15:38:28 +0000 | [diff] [blame^] | 1142 | self._config = TempestConfigPrivate(config_path=self._path) |
Sean Dague | 86bd842 | 2013-12-20 09:56:44 -0500 | [diff] [blame] | 1143 | |
| 1144 | return getattr(self._config, attr) |
| 1145 | |
Joe Gordon | 28a84ae | 2014-07-17 15:38:28 +0000 | [diff] [blame^] | 1146 | def set_config_path(self, path): |
| 1147 | self._path = path |
| 1148 | |
Sean Dague | 86bd842 | 2013-12-20 09:56:44 -0500 | [diff] [blame] | 1149 | |
| 1150 | CONF = TempestConfigProxy() |