blob: ec7df2e8c7bf8e791799ed934331eeac98b3d85a [file] [log] [blame]
Steve Baker450aa7f2014-08-25 10:37:27 +12001# Licensed under the Apache License, Version 2.0 (the "License"); you may
2# not use this file except in compliance with the License. You may obtain
3# a copy of the License at
4#
5# http://www.apache.org/licenses/LICENSE-2.0
6#
7# Unless required by applicable law or agreed to in writing, software
8# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10# License for the specific language governing permissions and limitations
11# under the License.
12
13import os
Steve Baker450aa7f2014-08-25 10:37:27 +120014
Jens Rosenboom4f069fb2015-02-18 14:19:07 +010015from oslo_config import cfg
Steve Baker450aa7f2014-08-25 10:37:27 +120016
17import heat_integrationtests
18
19
20IntegrationTestGroup = [
21
22 cfg.StrOpt('username',
23 default=os.environ.get('OS_USERNAME'),
24 help="Username to use for API requests."),
25 cfg.StrOpt('password',
26 default=os.environ.get('OS_PASSWORD'),
27 help="API key to use when authenticating.",
28 secret=True),
29 cfg.StrOpt('tenant_name',
30 default=os.environ.get('OS_TENANT_NAME'),
31 help="Tenant name to use for API requests."),
32 cfg.StrOpt('auth_url',
33 default=os.environ.get('OS_AUTH_URL'),
34 help="Full URI of the OpenStack Identity API (Keystone), v2"),
35 cfg.StrOpt('region',
36 default=os.environ.get('OS_REGION_NAME'),
37 help="The region name to us"),
38 cfg.StrOpt('instance_type',
Steve Bakere64590b2014-10-07 13:22:41 +130039 default=os.environ.get('HEAT_TEST_INSTANCE_TYPE'),
Steve Baker450aa7f2014-08-25 10:37:27 +120040 help="Instance type for tests. Needs to be big enough for a "
41 "full OS plus the test workload"),
42 cfg.StrOpt('image_ref',
Steve Bakere64590b2014-10-07 13:22:41 +130043 default=os.environ.get('HEAT_TEST_IMAGE_REF'),
Steve Baker450aa7f2014-08-25 10:37:27 +120044 help="Name of image to use for tests which boot servers."),
45 cfg.StrOpt('keypair_name',
46 default=None,
47 help="Name of existing keypair to launch servers with."),
48 cfg.StrOpt('minimal_image_ref',
Steve Bakere64590b2014-10-07 13:22:41 +130049 default=os.environ.get('HEAT_TEST_MINIMAL_IMAGE_REF'),
Steve Baker450aa7f2014-08-25 10:37:27 +120050 help="Name of minimal (e.g cirros) image to use when "
51 "launching test instances."),
52 cfg.StrOpt('auth_version',
53 default='v2',
54 help="Identity API version to be used for authentication "
55 "for API tests."),
56 cfg.BoolOpt('disable_ssl_certificate_validation',
57 default=False,
58 help="Set to True if using self-signed SSL certificates."),
59 cfg.IntOpt('build_interval',
60 default=4,
61 help="Time in seconds between build status checks."),
62 cfg.IntOpt('build_timeout',
63 default=1200,
64 help="Timeout in seconds to wait for a stack to build."),
65 cfg.StrOpt('network_for_ssh',
66 default='private',
67 help="Network used for SSH connections."),
68 cfg.StrOpt('fixed_network_name',
69 default='private',
70 help="Visible fixed network name "),
kairat_kushaev0ab3d7c2015-01-27 21:48:46 +030071 cfg.StrOpt('fixed_subnet_name',
72 default='private-subnet',
73 help="Visible fixed sub-network name "),
Steve Baker450aa7f2014-08-25 10:37:27 +120074 cfg.IntOpt('ssh_timeout',
75 default=300,
76 help="Timeout in seconds to wait for authentication to "
77 "succeed."),
78 cfg.IntOpt('ip_version_for_ssh',
79 default=4,
80 help="IP version used for SSH connections."),
81 cfg.IntOpt('ssh_channel_timeout',
82 default=60,
83 help="Timeout in seconds to wait for output from ssh "
84 "channel."),
85 cfg.IntOpt('tenant_network_mask_bits',
86 default=28,
87 help="The mask bits for tenant ipv4 subnets"),
88 cfg.IntOpt('volume_size',
89 default=1,
90 help='Default size in GB for volumes created by volumes tests'),
Sirushti Murugesan04ee8022015-02-02 23:00:23 +053091 cfg.BoolOpt('skip_stack_adopt_tests',
92 default=False,
93 help="Skip Stack Adopt Integration tests"),
94 cfg.BoolOpt('skip_stack_abandon_tests',
95 default=False,
96 help="Skip Stack Abandon Integration tests"),
Steve Baker450aa7f2014-08-25 10:37:27 +120097]
98
99
100def init_conf(read_conf=True):
101
102 default_config_files = None
103 if read_conf:
104 confpath = os.path.join(
105 os.path.dirname(os.path.realpath(heat_integrationtests.__file__)),
106 'heat_integrationtests.conf')
107 if os.path.isfile(confpath):
108 default_config_files = [confpath]
109
110 conf = cfg.ConfigOpts()
111 conf(args=[], project='heat_integrationtests',
112 default_config_files=default_config_files)
113
114 for opt in IntegrationTestGroup:
115 conf.register_opt(opt)
116 return conf
117
118
Thomas Hervecd3622e2014-12-17 10:36:51 +0100119def list_opts():
120 yield None, IntegrationTestGroup