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