Jay Pipes | 3f981df | 2012-03-27 18:59:44 -0400 | [diff] [blame] | 1 | # vim: tabstop=4 shiftwidth=4 softtabstop=4 |
| 2 | |
ZhiQiang Fan | 39f9722 | 2013-09-20 04:49:44 +0800 | [diff] [blame] | 3 | # Copyright 2012 OpenStack Foundation |
Jay Pipes | 3f981df | 2012-03-27 18:59:44 -0400 | [diff] [blame] | 4 | # All Rights Reserved. |
| 5 | # |
| 6 | # Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 7 | # not use this file except in compliance with the License. You may obtain |
| 8 | # a copy of the License at |
| 9 | # |
| 10 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | # |
| 12 | # Unless required by applicable law or agreed to in writing, software |
| 13 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 14 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 15 | # License for the specific language governing permissions and limitations |
| 16 | # under the License. |
| 17 | |
Dirk Mueller | e746fc2 | 2013-06-29 16:29:29 +0200 | [diff] [blame] | 18 | from __future__ import print_function |
| 19 | |
Jay Pipes | 7f75763 | 2011-12-02 15:53:32 -0500 | [diff] [blame] | 20 | import os |
Attila Fazekas | 5abb253 | 2012-12-04 11:30:49 +0100 | [diff] [blame] | 21 | import sys |
Jay Pipes | 3f981df | 2012-03-27 18:59:44 -0400 | [diff] [blame] | 22 | |
Dirk Mueller | e746fc2 | 2013-06-29 16:29:29 +0200 | [diff] [blame] | 23 | |
Matthew Treinish | 90aedd1 | 2013-02-25 17:56:49 -0500 | [diff] [blame] | 24 | from oslo.config import cfg |
| 25 | |
Attila Fazekas | 3e1b674 | 2013-01-28 16:30:35 +0100 | [diff] [blame] | 26 | from tempest.common.utils.misc import singleton |
Matthew Treinish | f4a9b0f | 2013-07-26 16:58:26 -0400 | [diff] [blame] | 27 | from tempest.openstack.common import log as logging |
Jay Pipes | 7f75763 | 2011-12-02 15:53:32 -0500 | [diff] [blame] | 28 | |
Daryl Walleck | 1465d61 | 2011-11-02 02:22:15 -0500 | [diff] [blame] | 29 | |
DennyZhang | 88a2dd8 | 2013-10-07 12:55:35 -0500 | [diff] [blame] | 30 | def register_opt_group(conf, opt_group, options): |
| 31 | conf.register_group(opt_group) |
| 32 | for opt in options: |
| 33 | conf.register_opt(opt, group=opt_group.name) |
| 34 | |
| 35 | |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 36 | identity_group = cfg.OptGroup(name='identity', |
| 37 | title="Keystone Configuration Options") |
Daryl Walleck | 1465d61 | 2011-11-02 02:22:15 -0500 | [diff] [blame] | 38 | |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 39 | IdentityGroup = [ |
| 40 | cfg.StrOpt('catalog_type', |
| 41 | default='identity', |
| 42 | help="Catalog type of the Identity service."), |
Jay Pipes | cd8eaec | 2013-01-16 21:03:48 -0500 | [diff] [blame] | 43 | cfg.BoolOpt('disable_ssl_certificate_validation', |
| 44 | default=False, |
| 45 | help="Set to True if using self-signed SSL certificates."), |
Jay Pipes | 7c88eb2 | 2013-01-16 21:32:43 -0500 | [diff] [blame] | 46 | cfg.StrOpt('uri', |
| 47 | default=None, |
Brant Knudson | c7ca334 | 2013-03-28 21:08:50 -0500 | [diff] [blame] | 48 | help="Full URI of the OpenStack Identity API (Keystone), v2"), |
| 49 | cfg.StrOpt('uri_v3', |
| 50 | help='Full URI of the OpenStack Identity API (Keystone), v3'), |
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."), |
Attila Fazekas | cadcb1f | 2013-01-21 23:10:53 +0100 | [diff] [blame] | 57 | cfg.StrOpt('username', |
| 58 | default='demo', |
| 59 | help="Username to use for Nova API requests."), |
| 60 | cfg.StrOpt('tenant_name', |
| 61 | default='demo', |
| 62 | help="Tenant name to use for Nova API requests."), |
Russell Sim | 7f894a5 | 2013-09-13 10:35:21 +1000 | [diff] [blame] | 63 | cfg.StrOpt('admin_role', |
| 64 | default='admin', |
| 65 | help="Role required to administrate keystone."), |
Attila Fazekas | cadcb1f | 2013-01-21 23:10:53 +0100 | [diff] [blame] | 66 | cfg.StrOpt('password', |
| 67 | default='pass', |
| 68 | help="API key to use when authenticating.", |
| 69 | secret=True), |
| 70 | cfg.StrOpt('alt_username', |
| 71 | default=None, |
| 72 | help="Username of alternate user to use for Nova API " |
| 73 | "requests."), |
| 74 | cfg.StrOpt('alt_tenant_name', |
| 75 | default=None, |
| 76 | help="Alternate user's Tenant name to use for Nova API " |
| 77 | "requests."), |
| 78 | cfg.StrOpt('alt_password', |
| 79 | default=None, |
| 80 | help="API key to use when authenticating as alternate user.", |
| 81 | secret=True), |
| 82 | cfg.StrOpt('admin_username', |
| 83 | default='admin', |
| 84 | help="Administrative Username to use for" |
| 85 | "Keystone API requests."), |
| 86 | cfg.StrOpt('admin_tenant_name', |
| 87 | default='admin', |
| 88 | help="Administrative Tenant name to use for Keystone API " |
| 89 | "requests."), |
| 90 | cfg.StrOpt('admin_password', |
| 91 | default='pass', |
| 92 | help="API key to use when authenticating as admin.", |
| 93 | secret=True), |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 94 | ] |
Jay Pipes | 3f981df | 2012-03-27 18:59:44 -0400 | [diff] [blame] | 95 | |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 96 | compute_group = cfg.OptGroup(name='compute', |
| 97 | title='Compute Service Options') |
Rohit Karajgi | e1b050d | 2011-12-02 16:13:18 -0800 | [diff] [blame] | 98 | |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 99 | ComputeGroup = [ |
| 100 | cfg.BoolOpt('allow_tenant_isolation', |
| 101 | default=False, |
| 102 | help="Allows test cases to create/destroy tenants and " |
| 103 | "users. This option enables isolated test cases and " |
| 104 | "better parallel execution, but also requires that " |
| 105 | "OpenStack Identity API admin credentials are known."), |
| 106 | cfg.BoolOpt('allow_tenant_reuse', |
| 107 | default=True, |
| 108 | help="If allow_tenant_isolation is True and a tenant that " |
| 109 | "would be created for a given test already exists (such " |
| 110 | "as from a previously-failed run), re-use that tenant " |
| 111 | "instead of failing because of the conflict. Note that " |
| 112 | "this would result in the tenant being deleted at the " |
| 113 | "end of a subsequent successful run."), |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 114 | cfg.StrOpt('image_ref', |
| 115 | default="{$IMAGE_ID}", |
| 116 | help="Valid secondary image reference to be used in tests."), |
| 117 | cfg.StrOpt('image_ref_alt', |
| 118 | default="{$IMAGE_ID_ALT}", |
| 119 | help="Valid secondary image reference to be used in tests."), |
| 120 | cfg.IntOpt('flavor_ref', |
| 121 | default=1, |
| 122 | help="Valid primary flavor to use in tests."), |
| 123 | cfg.IntOpt('flavor_ref_alt', |
| 124 | default=2, |
| 125 | help='Valid secondary flavor to be used in tests.'), |
Maru Newby | af292e8 | 2013-05-20 21:32:28 +0000 | [diff] [blame] | 126 | cfg.StrOpt('image_ssh_user', |
| 127 | default="root", |
| 128 | help="User name used to authenticate to an instance."), |
Ryan Hsu | cb2e125 | 2013-09-03 21:44:49 -0700 | [diff] [blame] | 129 | cfg.StrOpt('image_ssh_password', |
| 130 | default="password", |
| 131 | help="Password used to authenticate to an instance."), |
Maru Newby | af292e8 | 2013-05-20 21:32:28 +0000 | [diff] [blame] | 132 | cfg.StrOpt('image_alt_ssh_user', |
| 133 | default="root", |
| 134 | help="User name used to authenticate to an instance using " |
| 135 | "the alternate image."), |
Ryan Hsu | cb2e125 | 2013-09-03 21:44:49 -0700 | [diff] [blame] | 136 | cfg.StrOpt('image_alt_ssh_password', |
| 137 | default="password", |
| 138 | help="Password used to authenticate to an instance using " |
| 139 | "the alternate image."), |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 140 | cfg.IntOpt('build_interval', |
| 141 | default=10, |
| 142 | help="Time in seconds between build status checks."), |
| 143 | cfg.IntOpt('build_timeout', |
| 144 | default=300, |
| 145 | help="Timeout in seconds to wait for an instance to build."), |
| 146 | cfg.BoolOpt('run_ssh', |
| 147 | default=False, |
| 148 | help="Does the test environment support snapshots?"), |
| 149 | cfg.StrOpt('ssh_user', |
| 150 | default='root', |
| 151 | help="User name used to authenticate to an instance."), |
Nachi Ueno | 6d580be | 2013-07-24 10:58:11 -0700 | [diff] [blame] | 152 | cfg.IntOpt('ping_timeout', |
| 153 | default=60, |
| 154 | help="Timeout in seconds to wait for ping to " |
| 155 | "succeed."), |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 156 | cfg.IntOpt('ssh_timeout', |
| 157 | default=300, |
Chris Yeoh | 7691604 | 2013-02-27 16:25:25 +1030 | [diff] [blame] | 158 | help="Timeout in seconds to wait for authentication to " |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 159 | "succeed."), |
Attila Fazekas | 0abbc95 | 2013-07-01 19:19:42 +0200 | [diff] [blame] | 160 | cfg.IntOpt('ready_wait', |
| 161 | default=0, |
DennyZhang | 8912d01 | 2013-09-25 18:08:34 -0500 | [diff] [blame] | 162 | help="Additional wait time for clean state, when there is " |
| 163 | "no OS-EXT-STS extension available"), |
Chris Yeoh | 7691604 | 2013-02-27 16:25:25 +1030 | [diff] [blame] | 164 | cfg.IntOpt('ssh_channel_timeout', |
| 165 | default=60, |
| 166 | help="Timeout in seconds to wait for output from ssh " |
| 167 | "channel."), |
Attila Fazekas | b066165 | 2013-05-08 13:01:36 +0200 | [diff] [blame] | 168 | cfg.StrOpt('fixed_network_name', |
| 169 | default='private', |
| 170 | help="Visible fixed network name "), |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 171 | cfg.StrOpt('network_for_ssh', |
| 172 | default='public', |
| 173 | help="Network used for SSH connections."), |
| 174 | cfg.IntOpt('ip_version_for_ssh', |
| 175 | default=4, |
| 176 | help="IP version used for SSH connections."), |
fujioka yuuichi | a11994e | 2013-07-09 11:19:51 +0900 | [diff] [blame] | 177 | cfg.BoolOpt('use_floatingip_for_ssh', |
| 178 | default=True, |
| 179 | help="Dose the SSH uses Floating IP?"), |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 180 | cfg.StrOpt('catalog_type', |
| 181 | default='compute', |
| 182 | help="Catalog type of the Compute service."), |
Arata Notsu | 8f44039 | 2013-09-13 16:14:20 +0900 | [diff] [blame] | 183 | cfg.StrOpt('region', |
| 184 | default='', |
| 185 | help="The compute region name to use. If empty, the value " |
| 186 | "of identity.region is used instead. If no such region " |
| 187 | "is found in the service catalog, the first found one is " |
| 188 | "used."), |
ivan-zhu | 8f992be | 2013-07-31 14:56:58 +0800 | [diff] [blame] | 189 | cfg.StrOpt('catalog_v3_type', |
| 190 | default='computev3', |
| 191 | help="Catalog type of the Compute v3 service."), |
Attila Fazekas | cadcb1f | 2013-01-21 23:10:53 +0100 | [diff] [blame] | 192 | cfg.StrOpt('path_to_private_key', |
| 193 | default=None, |
| 194 | help="Path to a private key file for SSH access to remote " |
| 195 | "hosts"), |
Ryan Hsu | cb2e125 | 2013-09-03 21:44:49 -0700 | [diff] [blame] | 196 | cfg.StrOpt('volume_device_name', |
| 197 | default='vdb', |
| 198 | help="Expected device name when a volume is attached to " |
Ken'ichi Ohmichi | 39437e2 | 2013-10-06 00:21:38 +0900 | [diff] [blame] | 199 | "an instance"), |
| 200 | cfg.IntOpt('shelved_offload_time', |
| 201 | default=0, |
| 202 | help='Time in seconds before a shelved instance is eligible ' |
| 203 | 'for removing from a host. -1 never offload, 0 offload ' |
| 204 | 'when shelved. This time should be the same as the time ' |
| 205 | 'of nova.conf, and some tests will run for as long as the ' |
| 206 | 'time.') |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 207 | ] |
Rohit Karajgi | e1b050d | 2011-12-02 16:13:18 -0800 | [diff] [blame] | 208 | |
Matthew Treinish | d5c9602 | 2013-10-17 21:51:23 +0000 | [diff] [blame] | 209 | compute_features_group = cfg.OptGroup(name='compute-feature-enabled', |
| 210 | title="Enabled Compute Service Features") |
| 211 | |
| 212 | ComputeFeaturesGroup = [ |
ivan-zhu | 8f992be | 2013-07-31 14:56:58 +0800 | [diff] [blame] | 213 | cfg.BoolOpt('api_v3', |
Joe Gordon | 277d378 | 2013-11-19 18:55:42 -0800 | [diff] [blame] | 214 | default=False, |
ivan-zhu | 8f992be | 2013-07-31 14:56:58 +0800 | [diff] [blame] | 215 | help="If false, skip all nova v3 tests."), |
Matthew Treinish | d5c9602 | 2013-10-17 21:51:23 +0000 | [diff] [blame] | 216 | cfg.BoolOpt('disk_config', |
| 217 | default=True, |
| 218 | help="If false, skip disk config tests"), |
| 219 | cfg.BoolOpt('flavor_extra', |
| 220 | default=True, |
| 221 | help="If false, skip flavor extra data test"), |
| 222 | cfg.BoolOpt('change_password', |
| 223 | default=False, |
| 224 | help="Does the test environment support changing the admin " |
| 225 | "password?"), |
| 226 | cfg.BoolOpt('create_image', |
| 227 | default=False, |
| 228 | help="Does the test environment support snapshots?"), |
| 229 | cfg.BoolOpt('resize', |
| 230 | default=False, |
| 231 | help="Does the test environment support resizing?"), |
| 232 | cfg.BoolOpt('live_migration', |
| 233 | default=False, |
| 234 | help="Does the test environment support live migration " |
| 235 | "available?"), |
| 236 | cfg.BoolOpt('block_migration_for_live_migration', |
| 237 | default=False, |
| 238 | help="Does the test environment use block devices for live " |
| 239 | "migration"), |
| 240 | cfg.BoolOpt('block_migrate_cinder_iscsi', |
| 241 | default=False, |
| 242 | help="Does the test environment block migration support " |
| 243 | "cinder iSCSI volumes") |
| 244 | ] |
| 245 | |
| 246 | |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 247 | compute_admin_group = cfg.OptGroup(name='compute-admin', |
| 248 | title="Compute Admin Options") |
donald-ngo | 7fb1efa | 2011-12-13 17:17:36 -0800 | [diff] [blame] | 249 | |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 250 | ComputeAdminGroup = [ |
| 251 | cfg.StrOpt('username', |
| 252 | default='admin', |
| 253 | help="Administrative Username to use for Nova API requests."), |
| 254 | cfg.StrOpt('tenant_name', |
| 255 | default='admin', |
| 256 | help="Administrative Tenant name to use for Nova API " |
| 257 | "requests."), |
| 258 | cfg.StrOpt('password', |
| 259 | default='pass', |
| 260 | help="API key to use when authenticating as admin.", |
| 261 | secret=True), |
| 262 | ] |
Daryl Walleck | 587385b | 2012-03-03 13:00:26 -0600 | [diff] [blame] | 263 | |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 264 | image_group = cfg.OptGroup(name='image', |
| 265 | title="Image Service Options") |
Jay Pipes | f38eaac | 2012-06-21 13:37:35 -0400 | [diff] [blame] | 266 | |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 267 | ImageGroup = [ |
Matthew Treinish | 72ea442 | 2013-02-07 14:42:49 -0500 | [diff] [blame] | 268 | cfg.StrOpt('catalog_type', |
| 269 | default='image', |
Sean Dague | 8340199 | 2013-05-06 17:46:36 -0400 | [diff] [blame] | 270 | help='Catalog type of the Image service.'), |
Arata Notsu | 8f44039 | 2013-09-13 16:14:20 +0900 | [diff] [blame] | 271 | cfg.StrOpt('region', |
| 272 | default='', |
| 273 | help="The image region name to use. If empty, the value " |
| 274 | "of identity.region is used instead. If no such region " |
| 275 | "is found in the service catalog, the first found one is " |
| 276 | "used."), |
Sean Dague | 8340199 | 2013-05-06 17:46:36 -0400 | [diff] [blame] | 277 | cfg.StrOpt('http_image', |
| 278 | default='http://download.cirros-cloud.net/0.3.1/' |
| 279 | 'cirros-0.3.1-x86_64-uec.tar.gz', |
DennyZhang | 8912d01 | 2013-09-25 18:08:34 -0500 | [diff] [blame] | 280 | help='http accessible image') |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 281 | ] |
Jay Pipes | f38eaac | 2012-06-21 13:37:35 -0400 | [diff] [blame] | 282 | |
Matthew Treinish | 2b5287d | 2013-10-22 17:40:34 +0000 | [diff] [blame] | 283 | image_feature_group = cfg.OptGroup(name='image-feature-enabled', |
| 284 | title='Enabled image service features') |
| 285 | |
| 286 | ImageFeaturesGroup = [ |
| 287 | cfg.BoolOpt('api_v2', |
| 288 | default=True, |
| 289 | help="Is the v2 image API enabled"), |
| 290 | cfg.BoolOpt('api_v1', |
| 291 | default=True, |
| 292 | help="Is the v1 image API enabled"), |
| 293 | ] |
Jay Pipes | f38eaac | 2012-06-21 13:37:35 -0400 | [diff] [blame] | 294 | |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 295 | network_group = cfg.OptGroup(name='network', |
| 296 | title='Network Service Options') |
Daryl Walleck | 587385b | 2012-03-03 13:00:26 -0600 | [diff] [blame] | 297 | |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 298 | NetworkGroup = [ |
| 299 | cfg.StrOpt('catalog_type', |
| 300 | default='network', |
Mark McClain | f2982e8 | 2013-07-06 17:48:03 -0400 | [diff] [blame] | 301 | help='Catalog type of the Neutron service.'), |
Arata Notsu | 8f44039 | 2013-09-13 16:14:20 +0900 | [diff] [blame] | 302 | cfg.StrOpt('region', |
| 303 | default='', |
| 304 | help="The network region name to use. If empty, the value " |
| 305 | "of identity.region is used instead. If no such region " |
| 306 | "is found in the service catalog, the first found one is " |
| 307 | "used."), |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 308 | cfg.StrOpt('tenant_network_cidr', |
| 309 | default="10.100.0.0/16", |
| 310 | help="The cidr block to allocate tenant networks from"), |
| 311 | cfg.IntOpt('tenant_network_mask_bits', |
Attila Fazekas | 8ea181b | 2013-07-13 16:26:14 +0200 | [diff] [blame] | 312 | default=28, |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 313 | help="The mask bits for tenant networks"), |
| 314 | cfg.BoolOpt('tenant_networks_reachable', |
| 315 | default=False, |
| 316 | help="Whether tenant network connectivity should be " |
| 317 | "evaluated directly"), |
| 318 | cfg.StrOpt('public_network_id', |
| 319 | default="", |
| 320 | help="Id of the public network that provides external " |
| 321 | "connectivity"), |
| 322 | cfg.StrOpt('public_router_id', |
| 323 | default="", |
| 324 | help="Id of the public router that provides external " |
| 325 | "connectivity"), |
| 326 | ] |
Jay Pipes | 3f981df | 2012-03-27 18:59:44 -0400 | [diff] [blame] | 327 | |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 328 | volume_group = cfg.OptGroup(name='volume', |
| 329 | title='Block Storage Options') |
Daryl Walleck | 587385b | 2012-03-03 13:00:26 -0600 | [diff] [blame] | 330 | |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 331 | VolumeGroup = [ |
| 332 | cfg.IntOpt('build_interval', |
| 333 | default=10, |
| 334 | help='Time in seconds between volume availability checks.'), |
| 335 | cfg.IntOpt('build_timeout', |
| 336 | default=300, |
| 337 | help='Timeout in seconds to wait for a volume to become' |
| 338 | 'available.'), |
| 339 | cfg.StrOpt('catalog_type', |
Matthew Treinish | eb72451 | 2013-10-25 15:12:59 +0000 | [diff] [blame] | 340 | default='volume', |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 341 | help="Catalog type of the Volume Service"), |
Arata Notsu | 8f44039 | 2013-09-13 16:14:20 +0900 | [diff] [blame] | 342 | cfg.StrOpt('region', |
| 343 | default='', |
| 344 | help="The volume region name to use. If empty, the value " |
| 345 | "of identity.region is used instead. If no such region " |
| 346 | "is found in the service catalog, the first found one is " |
| 347 | "used."), |
Jérôme Gallard | 86551ce | 2013-03-08 11:41:26 +0100 | [diff] [blame] | 348 | cfg.StrOpt('backend1_name', |
Giulio Fidente | f4fa894 | 2013-05-28 18:48:03 +0200 | [diff] [blame] | 349 | default='BACKEND_1', |
Jérôme Gallard | 86551ce | 2013-03-08 11:41:26 +0100 | [diff] [blame] | 350 | help="Name of the backend1 (must be declared in cinder.conf)"), |
| 351 | cfg.StrOpt('backend2_name', |
Giulio Fidente | f4fa894 | 2013-05-28 18:48:03 +0200 | [diff] [blame] | 352 | default='BACKEND_2', |
Jérôme Gallard | 86551ce | 2013-03-08 11:41:26 +0100 | [diff] [blame] | 353 | help="Name of the backend2 (must be declared in cinder.conf)"), |
Adam Gandelman | 827ad33 | 2013-06-24 17:04:09 -0700 | [diff] [blame] | 354 | cfg.StrOpt('storage_protocol', |
| 355 | default='iSCSI', |
| 356 | help='Backend protocol to target when creating volume types'), |
| 357 | cfg.StrOpt('vendor_name', |
| 358 | default='Open Source', |
| 359 | help='Backend vendor to target when creating volume types'), |
Ryan Hsu | a67f463 | 2013-08-29 16:03:06 -0700 | [diff] [blame] | 360 | cfg.StrOpt('disk_format', |
| 361 | default='raw', |
| 362 | help='Disk format to use when copying a volume to image'), |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 363 | ] |
K Jonathan Harker | d6ba4b4 | 2012-12-18 13:50:47 -0800 | [diff] [blame] | 364 | |
Matthew Treinish | d5c9602 | 2013-10-17 21:51:23 +0000 | [diff] [blame] | 365 | volume_feature_group = cfg.OptGroup(name='volume-feature-enabled', |
| 366 | title='Enabled Cinder Features') |
| 367 | |
| 368 | VolumeFeaturesGroup = [ |
| 369 | cfg.BoolOpt('multi_backend', |
| 370 | default=False, |
| 371 | help="Runs Cinder multi-backend test (requires 2 backends)") |
| 372 | ] |
| 373 | |
Daryl Walleck | 587385b | 2012-03-03 13:00:26 -0600 | [diff] [blame] | 374 | |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 375 | object_storage_group = cfg.OptGroup(name='object-storage', |
| 376 | title='Object Storage Service Options') |
Attila Fazekas | a23f500 | 2012-10-23 19:32:45 +0200 | [diff] [blame] | 377 | |
DennyZhang | 1e71b61 | 2013-09-26 12:35:40 -0500 | [diff] [blame] | 378 | ObjectStoreGroup = [ |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 379 | cfg.StrOpt('catalog_type', |
| 380 | default='object-store', |
| 381 | help="Catalog type of the Object-Storage service."), |
Arata Notsu | 8f44039 | 2013-09-13 16:14:20 +0900 | [diff] [blame] | 382 | cfg.StrOpt('region', |
| 383 | default='', |
| 384 | help="The object-storage region name to use. If empty, the " |
| 385 | "value of identity.region is used instead. If no such " |
| 386 | "region is found in the service catalog, the first found " |
| 387 | "one is used."), |
Matthew Treinish | f319a73 | 2013-10-24 21:39:24 +0000 | [diff] [blame] | 388 | cfg.IntOpt('container_sync_timeout', |
nayna-patel | b4989b3 | 2013-01-09 06:25:13 +0000 | [diff] [blame] | 389 | default=120, |
| 390 | help="Number of seconds to time on waiting for a container" |
| 391 | "to container synchronization complete."), |
Matthew Treinish | f319a73 | 2013-10-24 21:39:24 +0000 | [diff] [blame] | 392 | cfg.IntOpt('container_sync_interval', |
nayna-patel | b4989b3 | 2013-01-09 06:25:13 +0000 | [diff] [blame] | 393 | default=5, |
| 394 | help="Number of seconds to wait while looping to check the" |
| 395 | "status of a container to container synchronization"), |
Matthew Treinish | 3fdb80c | 2013-08-15 11:13:19 -0400 | [diff] [blame] | 396 | cfg.StrOpt('operator_role', |
| 397 | default='Member', |
| 398 | help="Role to add to users created for swift tests to " |
| 399 | "enable creating containers"), |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 400 | ] |
Attila Fazekas | a23f500 | 2012-10-23 19:32:45 +0200 | [diff] [blame] | 401 | |
Matthew Treinish | d5c9602 | 2013-10-17 21:51:23 +0000 | [diff] [blame] | 402 | object_storage_feature_group = cfg.OptGroup( |
| 403 | name='object-storage-feature-enabled', |
| 404 | title='Enabled object-storage features') |
| 405 | |
| 406 | ObjectStoreFeaturesGroup = [ |
| 407 | cfg.BoolOpt('container_quotas', |
| 408 | default=True, |
| 409 | help="Set to True if the container quota middleware " |
| 410 | "is enabled"), |
| 411 | cfg.BoolOpt('accounts_quotas', |
| 412 | default=True, |
| 413 | help="Set to True if the Account Quota middleware is enabled"), |
Joe H. Rahme | 836da3f | 2013-10-09 15:47:16 +0200 | [diff] [blame] | 414 | cfg.BoolOpt('crossdomain', |
| 415 | default=True, |
| 416 | help="Set to True if the Crossdomain middleware is enabled"), |
Matthew Treinish | d5c9602 | 2013-10-17 21:51:23 +0000 | [diff] [blame] | 417 | ] |
| 418 | |
Attila Fazekas | a23f500 | 2012-10-23 19:32:45 +0200 | [diff] [blame] | 419 | |
Steve Baker | c60e4e3 | 2013-05-06 15:22:41 +1200 | [diff] [blame] | 420 | orchestration_group = cfg.OptGroup(name='orchestration', |
| 421 | title='Orchestration Service Options') |
| 422 | |
| 423 | OrchestrationGroup = [ |
| 424 | cfg.StrOpt('catalog_type', |
| 425 | default='orchestration', |
| 426 | help="Catalog type of the Orchestration service."), |
Arata Notsu | 8f44039 | 2013-09-13 16:14:20 +0900 | [diff] [blame] | 427 | cfg.StrOpt('region', |
| 428 | default='', |
| 429 | help="The orchestration region name to use. If empty, the " |
| 430 | "value of identity.region is used instead. If no such " |
| 431 | "region is found in the service catalog, the first found " |
| 432 | "one is used."), |
Steve Baker | c60e4e3 | 2013-05-06 15:22:41 +1200 | [diff] [blame] | 433 | cfg.BoolOpt('allow_tenant_isolation', |
| 434 | default=False, |
| 435 | help="Allows test cases to create/destroy tenants and " |
| 436 | "users. This option enables isolated test cases and " |
| 437 | "better parallel execution, but also requires that " |
| 438 | "OpenStack Identity API admin credentials are known."), |
| 439 | cfg.IntOpt('build_interval', |
| 440 | default=1, |
| 441 | help="Time in seconds between build status checks."), |
| 442 | cfg.IntOpt('build_timeout', |
| 443 | default=300, |
| 444 | help="Timeout in seconds to wait for a stack to build."), |
Steve Baker | c60e4e3 | 2013-05-06 15:22:41 +1200 | [diff] [blame] | 445 | cfg.StrOpt('instance_type', |
Steve Baker | 9e86b83 | 2013-05-22 15:40:28 +1200 | [diff] [blame] | 446 | default='m1.micro', |
Steve Baker | c60e4e3 | 2013-05-06 15:22:41 +1200 | [diff] [blame] | 447 | help="Instance type for tests. Needs to be big enough for a " |
| 448 | "full OS plus the test workload"), |
| 449 | cfg.StrOpt('image_ref', |
| 450 | default=None, |
| 451 | help="Name of heat-cfntools enabled image to use when " |
| 452 | "launching test instances."), |
| 453 | cfg.StrOpt('keypair_name', |
| 454 | default=None, |
| 455 | help="Name of existing keypair to launch servers with."), |
Clint Byrum | 71f2763 | 2013-09-09 11:41:32 -0700 | [diff] [blame] | 456 | cfg.IntOpt('max_template_size', |
Joe Gordon | 0e51b22 | 2013-10-24 14:11:10 +0100 | [diff] [blame] | 457 | default=524288, |
Clint Byrum | 71f2763 | 2013-09-09 11:41:32 -0700 | [diff] [blame] | 458 | help="Value must match heat configuration of the same name."), |
Steve Baker | c60e4e3 | 2013-05-06 15:22:41 +1200 | [diff] [blame] | 459 | ] |
| 460 | |
| 461 | |
Julie Pichon | d101764 | 2013-07-24 16:37:23 +0100 | [diff] [blame] | 462 | dashboard_group = cfg.OptGroup(name="dashboard", |
| 463 | title="Dashboard options") |
| 464 | |
| 465 | DashboardGroup = [ |
| 466 | cfg.StrOpt('dashboard_url', |
| 467 | default='http://localhost/', |
| 468 | help="Where the dashboard can be found"), |
| 469 | cfg.StrOpt('login_url', |
| 470 | default='http://localhost/auth/login/', |
| 471 | help="Login page for the dashboard"), |
| 472 | ] |
| 473 | |
| 474 | |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 475 | boto_group = cfg.OptGroup(name='boto', |
| 476 | title='EC2/S3 options') |
DennyZhang | 1e71b61 | 2013-09-26 12:35:40 -0500 | [diff] [blame] | 477 | BotoGroup = [ |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 478 | cfg.StrOpt('ec2_url', |
| 479 | default="http://localhost:8773/services/Cloud", |
| 480 | help="EC2 URL"), |
| 481 | cfg.StrOpt('s3_url', |
| 482 | default="http://localhost:8080", |
| 483 | help="S3 URL"), |
| 484 | cfg.StrOpt('aws_secret', |
| 485 | default=None, |
| 486 | help="AWS Secret Key", |
| 487 | secret=True), |
| 488 | cfg.StrOpt('aws_access', |
| 489 | default=None, |
| 490 | help="AWS Access Key"), |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 491 | cfg.StrOpt('s3_materials_path', |
| 492 | default="/opt/stack/devstack/files/images/" |
| 493 | "s3-materials/cirros-0.3.0", |
| 494 | help="S3 Materials Path"), |
| 495 | cfg.StrOpt('ari_manifest', |
| 496 | default="cirros-0.3.0-x86_64-initrd.manifest.xml", |
| 497 | help="ARI Ramdisk Image manifest"), |
| 498 | cfg.StrOpt('ami_manifest', |
| 499 | default="cirros-0.3.0-x86_64-blank.img.manifest.xml", |
| 500 | help="AMI Machine Image manifest"), |
| 501 | cfg.StrOpt('aki_manifest', |
| 502 | default="cirros-0.3.0-x86_64-vmlinuz.manifest.xml", |
| 503 | help="AKI Kernel Image manifest"), |
| 504 | cfg.StrOpt('instance_type', |
| 505 | default="m1.tiny", |
| 506 | help="Instance type"), |
| 507 | cfg.IntOpt('http_socket_timeout', |
| 508 | default=3, |
| 509 | help="boto Http socket timeout"), |
| 510 | cfg.IntOpt('num_retries', |
| 511 | default=1, |
| 512 | help="boto num_retries on error"), |
| 513 | cfg.IntOpt('build_timeout', |
| 514 | default=60, |
| 515 | help="Status Change Timeout"), |
| 516 | cfg.IntOpt('build_interval', |
| 517 | default=1, |
| 518 | help="Status Change Test Interval"), |
| 519 | ] |
Attila Fazekas | f7f2d93 | 2012-12-13 09:14:38 +0100 | [diff] [blame] | 520 | |
Matthew Treinish | 615ea6a | 2013-02-25 17:26:59 -0500 | [diff] [blame] | 521 | stress_group = cfg.OptGroup(name='stress', title='Stress Test Options') |
| 522 | |
| 523 | StressGroup = [ |
| 524 | cfg.StrOpt('nova_logdir', |
| 525 | default=None, |
| 526 | help='Directory containing log files on the compute nodes'), |
| 527 | cfg.IntOpt('max_instances', |
| 528 | default=16, |
| 529 | help='Maximum number of instances to create during test.'), |
| 530 | cfg.StrOpt('controller', |
| 531 | default=None, |
David Kranz | b9d9750 | 2013-05-01 15:55:04 -0400 | [diff] [blame] | 532 | help='Controller host.'), |
| 533 | # new stress options |
| 534 | cfg.StrOpt('target_controller', |
| 535 | default=None, |
| 536 | help='Controller host.'), |
| 537 | cfg.StrOpt('target_ssh_user', |
| 538 | default=None, |
| 539 | help='ssh user.'), |
| 540 | cfg.StrOpt('target_private_key_path', |
| 541 | default=None, |
| 542 | help='Path to private key.'), |
| 543 | cfg.StrOpt('target_logfiles', |
| 544 | default=None, |
| 545 | help='regexp for list of log files.'), |
Matthew Treinish | f319a73 | 2013-10-24 21:39:24 +0000 | [diff] [blame] | 546 | cfg.IntOpt('log_check_interval', |
David Kranz | b9d9750 | 2013-05-01 15:55:04 -0400 | [diff] [blame] | 547 | default=60, |
Marc Koderer | 32221b8e | 2013-08-23 13:57:50 +0200 | [diff] [blame] | 548 | help='time (in seconds) between log file error checks.'), |
Matthew Treinish | f319a73 | 2013-10-24 21:39:24 +0000 | [diff] [blame] | 549 | cfg.IntOpt('default_thread_number_per_action', |
Marc Koderer | 32221b8e | 2013-08-23 13:57:50 +0200 | [diff] [blame] | 550 | default=4, |
| 551 | help='The number of threads created while stress test.') |
Matthew Treinish | 615ea6a | 2013-02-25 17:26:59 -0500 | [diff] [blame] | 552 | ] |
| 553 | |
| 554 | |
Masayuki Igawa | 73d9f3a | 2013-05-24 10:30:01 +0900 | [diff] [blame] | 555 | scenario_group = cfg.OptGroup(name='scenario', title='Scenario Test Options') |
| 556 | |
| 557 | ScenarioGroup = [ |
| 558 | cfg.StrOpt('img_dir', |
| 559 | default='/opt/stack/new/devstack/files/images/' |
| 560 | 'cirros-0.3.1-x86_64-uec', |
| 561 | help='Directory containing image files'), |
| 562 | cfg.StrOpt('ami_img_file', |
| 563 | default='cirros-0.3.1-x86_64-blank.img', |
| 564 | help='AMI image file name'), |
| 565 | cfg.StrOpt('ari_img_file', |
| 566 | default='cirros-0.3.1-x86_64-initrd', |
| 567 | help='ARI image file name'), |
| 568 | cfg.StrOpt('aki_img_file', |
| 569 | default='cirros-0.3.1-x86_64-vmlinuz', |
| 570 | help='AKI image file name'), |
| 571 | cfg.StrOpt('ssh_user', |
| 572 | default='cirros', |
Joe Gordon | b5e10cd | 2013-07-10 15:51:12 +0000 | [diff] [blame] | 573 | help='ssh username for the image file'), |
| 574 | cfg.IntOpt( |
| 575 | 'large_ops_number', |
| 576 | default=0, |
| 577 | help="specifies how many resources to request at once. Used " |
| 578 | "for large operations testing.") |
Masayuki Igawa | 73d9f3a | 2013-05-24 10:30:01 +0900 | [diff] [blame] | 579 | ] |
| 580 | |
| 581 | |
Matthew Treinish | 4c41292 | 2013-07-16 15:27:42 -0400 | [diff] [blame] | 582 | service_available_group = cfg.OptGroup(name="service_available", |
| 583 | title="Available OpenStack Services") |
| 584 | |
| 585 | ServiceAvailableGroup = [ |
| 586 | cfg.BoolOpt('cinder', |
| 587 | default=True, |
| 588 | help="Whether or not cinder is expected to be available"), |
Matthew Treinish | faa340d | 2013-07-19 16:26:21 -0400 | [diff] [blame] | 589 | cfg.BoolOpt('neutron', |
| 590 | default=False, |
| 591 | help="Whether or not neutron is expected to be available"), |
Matthew Treinish | 853ae44 | 2013-07-19 16:36:07 -0400 | [diff] [blame] | 592 | cfg.BoolOpt('glance', |
| 593 | default=True, |
| 594 | help="Whether or not glance is expected to be available"), |
Matthew Treinish | 61e332b | 2013-07-19 16:42:31 -0400 | [diff] [blame] | 595 | cfg.BoolOpt('swift', |
| 596 | default=True, |
| 597 | help="Whether or not swift is expected to be available"), |
Matthew Treinish | 6b41e24 | 2013-07-19 16:49:28 -0400 | [diff] [blame] | 598 | cfg.BoolOpt('nova', |
| 599 | default=True, |
| 600 | help="Whether or not nova is expected to be available"), |
Matthew Treinish | a9d4388 | 2013-07-19 16:54:52 -0400 | [diff] [blame] | 601 | cfg.BoolOpt('heat', |
| 602 | default=False, |
| 603 | help="Whether or not Heat is expected to be available"), |
Mehdi Abaakouk | 8581c0b | 2013-10-04 10:45:42 +0200 | [diff] [blame] | 604 | cfg.BoolOpt('ceilometer', |
| 605 | default=True, |
| 606 | help="Whether or not Ceilometer is expected to be available"), |
Julie Pichon | d101764 | 2013-07-24 16:37:23 +0100 | [diff] [blame] | 607 | cfg.BoolOpt('horizon', |
| 608 | default=True, |
| 609 | help="Whether or not Horizon is expected to be available"), |
Matthew Treinish | 4c41292 | 2013-07-16 15:27:42 -0400 | [diff] [blame] | 610 | ] |
| 611 | |
Attila Fazekas | aeeeefd | 2013-08-06 17:01:56 +0200 | [diff] [blame] | 612 | debug_group = cfg.OptGroup(name="debug", |
| 613 | title="Debug System") |
| 614 | |
| 615 | DebugGroup = [ |
| 616 | cfg.BoolOpt('enable', |
| 617 | default=True, |
| 618 | help="Enable diagnostic commands"), |
| 619 | ] |
| 620 | |
| 621 | |
Jay Pipes | 3f981df | 2012-03-27 18:59:44 -0400 | [diff] [blame] | 622 | @singleton |
| 623 | class TempestConfig: |
Daryl Walleck | 1465d61 | 2011-11-02 02:22:15 -0500 | [diff] [blame] | 624 | """Provides OpenStack configuration information.""" |
| 625 | |
Brian Waldon | 738cd63 | 2011-12-12 18:45:09 -0500 | [diff] [blame] | 626 | DEFAULT_CONFIG_DIR = os.path.join( |
Zhongyue Luo | a1343de | 2013-01-04 16:21:35 +0800 | [diff] [blame] | 627 | os.path.abspath(os.path.dirname(os.path.dirname(__file__))), |
Brian Waldon | 738cd63 | 2011-12-12 18:45:09 -0500 | [diff] [blame] | 628 | "etc") |
Daryl Walleck | 1465d61 | 2011-11-02 02:22:15 -0500 | [diff] [blame] | 629 | |
Brian Waldon | 738cd63 | 2011-12-12 18:45:09 -0500 | [diff] [blame] | 630 | DEFAULT_CONFIG_FILE = "tempest.conf" |
| 631 | |
| 632 | def __init__(self): |
| 633 | """Initialize a configuration from a conf directory and conf file.""" |
Sean Dague | 2416cf3 | 2013-04-10 08:29:07 -0400 | [diff] [blame] | 634 | config_files = [] |
Sean Dague | 2416cf3 | 2013-04-10 08:29:07 -0400 | [diff] [blame] | 635 | failsafe_path = "/etc/tempest/" + self.DEFAULT_CONFIG_FILE |
Brian Waldon | 738cd63 | 2011-12-12 18:45:09 -0500 | [diff] [blame] | 636 | |
| 637 | # Environment variables override defaults... |
| 638 | conf_dir = os.environ.get('TEMPEST_CONFIG_DIR', |
Zhongyue Luo | 79d8d36 | 2012-09-25 13:49:27 +0800 | [diff] [blame] | 639 | self.DEFAULT_CONFIG_DIR) |
| 640 | conf_file = os.environ.get('TEMPEST_CONFIG', self.DEFAULT_CONFIG_FILE) |
Brian Waldon | 738cd63 | 2011-12-12 18:45:09 -0500 | [diff] [blame] | 641 | |
Jay Pipes | 7f75763 | 2011-12-02 15:53:32 -0500 | [diff] [blame] | 642 | path = os.path.join(conf_dir, conf_file) |
| 643 | |
Zhongyue Luo | afd43eb | 2013-02-04 11:32:57 +0800 | [diff] [blame] | 644 | if not (os.path.isfile(path) or |
| 645 | 'TEMPEST_CONFIG_DIR' in os.environ or |
| 646 | 'TEMPEST_CONFIG' in os.environ): |
Sean Dague | 2416cf3 | 2013-04-10 08:29:07 -0400 | [diff] [blame] | 647 | path = failsafe_path |
Attila Fazekas | 5abb253 | 2012-12-04 11:30:49 +0100 | [diff] [blame] | 648 | |
Jay Pipes | 7f75763 | 2011-12-02 15:53:32 -0500 | [diff] [blame] | 649 | if not os.path.exists(path): |
Sean Dague | 43cd905 | 2013-07-19 12:20:04 -0400 | [diff] [blame] | 650 | msg = "Config file %s not found" % path |
Dirk Mueller | e746fc2 | 2013-06-29 16:29:29 +0200 | [diff] [blame] | 651 | print(RuntimeError(msg), file=sys.stderr) |
Sean Dague | 2416cf3 | 2013-04-10 08:29:07 -0400 | [diff] [blame] | 652 | else: |
| 653 | config_files.append(path) |
Jay Pipes | 7f75763 | 2011-12-02 15:53:32 -0500 | [diff] [blame] | 654 | |
Sean Dague | 2416cf3 | 2013-04-10 08:29:07 -0400 | [diff] [blame] | 655 | cfg.CONF([], project='tempest', default_config_files=config_files) |
Matthew Treinish | f4a9b0f | 2013-07-26 16:58:26 -0400 | [diff] [blame] | 656 | logging.setup('tempest') |
| 657 | LOG = logging.getLogger('tempest') |
| 658 | LOG.info("Using tempest config file %s" % path) |
Daryl Walleck | 1465d61 | 2011-11-02 02:22:15 -0500 | [diff] [blame] | 659 | |
DennyZhang | 88a2dd8 | 2013-10-07 12:55:35 -0500 | [diff] [blame] | 660 | register_opt_group(cfg.CONF, compute_group, ComputeGroup) |
Matthew Treinish | d5c9602 | 2013-10-17 21:51:23 +0000 | [diff] [blame] | 661 | register_opt_group(cfg.CONF, compute_features_group, |
| 662 | ComputeFeaturesGroup) |
DennyZhang | 88a2dd8 | 2013-10-07 12:55:35 -0500 | [diff] [blame] | 663 | register_opt_group(cfg.CONF, identity_group, IdentityGroup) |
| 664 | register_opt_group(cfg.CONF, image_group, ImageGroup) |
Matthew Treinish | 2b5287d | 2013-10-22 17:40:34 +0000 | [diff] [blame] | 665 | register_opt_group(cfg.CONF, image_feature_group, ImageFeaturesGroup) |
DennyZhang | 88a2dd8 | 2013-10-07 12:55:35 -0500 | [diff] [blame] | 666 | register_opt_group(cfg.CONF, network_group, NetworkGroup) |
| 667 | register_opt_group(cfg.CONF, volume_group, VolumeGroup) |
Matthew Treinish | d5c9602 | 2013-10-17 21:51:23 +0000 | [diff] [blame] | 668 | register_opt_group(cfg.CONF, volume_feature_group, |
| 669 | VolumeFeaturesGroup) |
DennyZhang | 88a2dd8 | 2013-10-07 12:55:35 -0500 | [diff] [blame] | 670 | register_opt_group(cfg.CONF, object_storage_group, ObjectStoreGroup) |
Matthew Treinish | d5c9602 | 2013-10-17 21:51:23 +0000 | [diff] [blame] | 671 | register_opt_group(cfg.CONF, object_storage_feature_group, |
| 672 | ObjectStoreFeaturesGroup) |
DennyZhang | 88a2dd8 | 2013-10-07 12:55:35 -0500 | [diff] [blame] | 673 | register_opt_group(cfg.CONF, orchestration_group, OrchestrationGroup) |
| 674 | register_opt_group(cfg.CONF, dashboard_group, DashboardGroup) |
| 675 | register_opt_group(cfg.CONF, boto_group, BotoGroup) |
| 676 | register_opt_group(cfg.CONF, compute_admin_group, ComputeAdminGroup) |
| 677 | register_opt_group(cfg.CONF, stress_group, StressGroup) |
| 678 | register_opt_group(cfg.CONF, scenario_group, ScenarioGroup) |
| 679 | register_opt_group(cfg.CONF, service_available_group, |
| 680 | ServiceAvailableGroup) |
| 681 | register_opt_group(cfg.CONF, debug_group, DebugGroup) |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 682 | self.compute = cfg.CONF.compute |
Matthew Treinish | d5c9602 | 2013-10-17 21:51:23 +0000 | [diff] [blame] | 683 | self.compute_feature_enabled = cfg.CONF['compute-feature-enabled'] |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 684 | self.identity = cfg.CONF.identity |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 685 | self.images = cfg.CONF.image |
Matthew Treinish | 2b5287d | 2013-10-22 17:40:34 +0000 | [diff] [blame] | 686 | self.image_feature_enabled = cfg.CONF['image-feature-enabled'] |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 687 | self.network = cfg.CONF.network |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 688 | self.volume = cfg.CONF.volume |
Matthew Treinish | d5c9602 | 2013-10-17 21:51:23 +0000 | [diff] [blame] | 689 | self.volume_feature_enabled = cfg.CONF['volume-feature-enabled'] |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 690 | self.object_storage = cfg.CONF['object-storage'] |
Matthew Treinish | d5c9602 | 2013-10-17 21:51:23 +0000 | [diff] [blame] | 691 | self.object_storage_feature_enabled = cfg.CONF[ |
| 692 | 'object-storage-feature-enabled'] |
Steve Baker | c60e4e3 | 2013-05-06 15:22:41 +1200 | [diff] [blame] | 693 | self.orchestration = cfg.CONF.orchestration |
Julie Pichon | d101764 | 2013-07-24 16:37:23 +0100 | [diff] [blame] | 694 | self.dashboard = cfg.CONF.dashboard |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 695 | self.boto = cfg.CONF.boto |
Attila Fazekas | cadcb1f | 2013-01-21 23:10:53 +0100 | [diff] [blame] | 696 | self.compute_admin = cfg.CONF['compute-admin'] |
Matthew Treinish | 615ea6a | 2013-02-25 17:26:59 -0500 | [diff] [blame] | 697 | self.stress = cfg.CONF.stress |
Masayuki Igawa | 73d9f3a | 2013-05-24 10:30:01 +0900 | [diff] [blame] | 698 | self.scenario = cfg.CONF.scenario |
Matthew Treinish | 4c41292 | 2013-07-16 15:27:42 -0400 | [diff] [blame] | 699 | self.service_available = cfg.CONF.service_available |
Attila Fazekas | 5fae7a3 | 2013-09-25 16:52:44 +0200 | [diff] [blame] | 700 | self.debug = cfg.CONF.debug |
Attila Fazekas | cadcb1f | 2013-01-21 23:10:53 +0100 | [diff] [blame] | 701 | if not self.compute_admin.username: |
| 702 | self.compute_admin.username = self.identity.admin_username |
| 703 | self.compute_admin.password = self.identity.admin_password |
| 704 | self.compute_admin.tenant_name = self.identity.admin_tenant_name |