blob: e99d0346b05bf855f6837577e66bbc026c1e08b1 [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'),
Rakesh H Sa286a132016-02-18 18:54:00 +053024 help="Username to use for non admin API requests."),
Steve Baker450aa7f2014-08-25 10:37:27 +120025 cfg.StrOpt('password',
26 default=os.environ.get('OS_PASSWORD'),
Rakesh H Sa286a132016-02-18 18:54:00 +053027 help="Non admin API key to use when authenticating.",
28 secret=True),
29 cfg.StrOpt('admin_username',
30 help="Username to use for admin API requests."),
31 cfg.StrOpt('admin_password',
32 help="Admin API key to use when authentication.",
Steve Baker450aa7f2014-08-25 10:37:27 +120033 secret=True),
34 cfg.StrOpt('tenant_name',
Steve Baker7c9115d2015-08-03 11:12:46 +120035 default=(os.environ.get('OS_PROJECT_NAME') or
36 os.environ.get('OS_TENANT_NAME')),
Steve Baker450aa7f2014-08-25 10:37:27 +120037 help="Tenant name to use for API requests."),
38 cfg.StrOpt('auth_url',
39 default=os.environ.get('OS_AUTH_URL'),
Rabi Mishra65493fb2016-01-29 22:23:21 +053040 help="Full URI of the OpenStack Identity API (Keystone)"),
Rabi Mishra1d538742016-03-21 21:09:20 +053041 cfg.StrOpt('user_domain_name',
42 default=os.environ.get('OS_USER_DOMAIN_NAME'),
43 help="User domain name, if keystone v3 auth_url"
44 "is used"),
45 cfg.StrOpt('project_domain_name',
46 default=os.environ.get('OS_PROJECT_DOMAIN_NAME'),
47 help="Project domain name, if keystone v3 auth_url"
Rabi Mishra65493fb2016-01-29 22:23:21 +053048 "is used"),
Steve Baker450aa7f2014-08-25 10:37:27 +120049 cfg.StrOpt('region',
50 default=os.environ.get('OS_REGION_NAME'),
Rabi Mishra65493fb2016-01-29 22:23:21 +053051 help="The region name to use"),
Steve Baker450aa7f2014-08-25 10:37:27 +120052 cfg.StrOpt('instance_type',
Steve Baker450aa7f2014-08-25 10:37:27 +120053 help="Instance type for tests. Needs to be big enough for a "
54 "full OS plus the test workload"),
Pavlo Shchelokovskyy46e5cb22015-03-23 12:01:25 +000055 cfg.StrOpt('minimal_instance_type',
56 help="Instance type enough for simplest cases."),
Steve Baker450aa7f2014-08-25 10:37:27 +120057 cfg.StrOpt('image_ref',
Steve Baker450aa7f2014-08-25 10:37:27 +120058 help="Name of image to use for tests which boot servers."),
59 cfg.StrOpt('keypair_name',
Steve Baker450aa7f2014-08-25 10:37:27 +120060 help="Name of existing keypair to launch servers with."),
61 cfg.StrOpt('minimal_image_ref',
Steve Baker450aa7f2014-08-25 10:37:27 +120062 help="Name of minimal (e.g cirros) image to use when "
63 "launching test instances."),
Steve Baker450aa7f2014-08-25 10:37:27 +120064 cfg.BoolOpt('disable_ssl_certificate_validation',
65 default=False,
66 help="Set to True if using self-signed SSL certificates."),
tyagi39aa11a2016-03-07 04:47:00 -080067 cfg.StrOpt('ca_file',
68 default=None,
69 help="CA certificate to pass for servers that have "
70 "https endpoint."),
Steve Baker450aa7f2014-08-25 10:37:27 +120071 cfg.IntOpt('build_interval',
72 default=4,
73 help="Time in seconds between build status checks."),
74 cfg.IntOpt('build_timeout',
75 default=1200,
76 help="Timeout in seconds to wait for a stack to build."),
77 cfg.StrOpt('network_for_ssh',
Rabi Mishraec4b03b2015-05-23 02:20:47 +053078 default='heat-net',
Steve Baker450aa7f2014-08-25 10:37:27 +120079 help="Network used for SSH connections."),
80 cfg.StrOpt('fixed_network_name',
Rabi Mishraec4b03b2015-05-23 02:20:47 +053081 default='heat-net',
Steve Baker450aa7f2014-08-25 10:37:27 +120082 help="Visible fixed network name "),
Pavlo Shchelokovskyy6fa23802015-03-23 11:22:35 +000083 cfg.StrOpt('floating_network_name',
84 default='public',
85 help="Visible floating network name "),
Steve Baker0b679bb2015-03-11 13:46:42 +130086 cfg.StrOpt('boot_config_env',
Steve Baker803f1502015-03-11 13:47:08 +130087 default=('heat_integrationtests/scenario/templates'
88 '/boot_config_none_env.yaml'),
Steve Baker0b679bb2015-03-11 13:46:42 +130089 help="Path to environment file which defines the "
90 "resource type Heat::InstallConfigAgent. Needs to "
91 "be appropriate for the image_ref."),
kairat_kushaev0ab3d7c2015-01-27 21:48:46 +030092 cfg.StrOpt('fixed_subnet_name',
Rabi Mishraec4b03b2015-05-23 02:20:47 +053093 default='heat-subnet',
kairat_kushaev0ab3d7c2015-01-27 21:48:46 +030094 help="Visible fixed sub-network name "),
Steve Baker450aa7f2014-08-25 10:37:27 +120095 cfg.IntOpt('ssh_timeout',
96 default=300,
97 help="Timeout in seconds to wait for authentication to "
98 "succeed."),
99 cfg.IntOpt('ip_version_for_ssh',
100 default=4,
101 help="IP version used for SSH connections."),
102 cfg.IntOpt('ssh_channel_timeout',
103 default=60,
104 help="Timeout in seconds to wait for output from ssh "
105 "channel."),
106 cfg.IntOpt('tenant_network_mask_bits',
107 default=28,
108 help="The mask bits for tenant ipv4 subnets"),
Rabi Mishra477efc92015-07-31 13:01:45 +0530109 cfg.BoolOpt('skip_scenario_tests',
110 default=False,
111 help="Skip all scenario tests"),
112 cfg.BoolOpt('skip_functional_tests',
113 default=False,
114 help="Skip all functional tests"),
115 cfg.ListOpt('skip_functional_test_list',
Rabi Mishra94c43722015-08-12 18:39:38 +0530116 help="List of functional test class or class.method "
117 "names to skip ex. AutoscalingGroupTest,"
118 "InstanceGroupBasicTest.test_size_updates_work"),
Rabi Mishra477efc92015-07-31 13:01:45 +0530119 cfg.ListOpt('skip_scenario_test_list',
Rabi Mishra94c43722015-08-12 18:39:38 +0530120 help="List of scenario test class or class.method "
121 "names to skip ex. NeutronLoadBalancerTest, "
122 "CeilometerAlarmTest.test_alarm"),
Rabi Mishra477efc92015-07-31 13:01:45 +0530123 cfg.ListOpt('skip_test_stack_action_list',
124 help="List of stack actions in tests to skip "
125 "ex. ABANDON, ADOPT, SUSPEND, RESUME"),
Steve Baker450aa7f2014-08-25 10:37:27 +1200126 cfg.IntOpt('volume_size',
127 default=1,
128 help='Default size in GB for volumes created by volumes tests'),
Anastasia Kuznetsova3e0ab4d2015-03-06 18:10:13 +0400129 cfg.IntOpt('connectivity_timeout',
130 default=120,
131 help="Timeout in seconds to wait for connectivity to "
132 "server."),
Oleksii Chuprykov4be023a2015-07-08 07:17:08 -0400133 cfg.IntOpt('sighup_timeout',
134 default=30,
135 help="Timeout in seconds to wait for adding or removing child"
Thomas Herve2ce4bda2016-01-22 17:55:55 +0100136 "process after receiving of sighup signal"),
Peter Razumovsky483e64b2016-03-04 17:04:28 +0300137 cfg.IntOpt('sighup_config_edit_retries',
138 default=10,
139 help='Count of retries to edit config file during sighup. If '
140 'another worker already edit config file, file can be '
141 'busy, so need to wait and try edit file again.'),
Thomas Herve2ce4bda2016-01-22 17:55:55 +0100142 cfg.StrOpt('heat-config-notify-script',
143 default=('heat-config-notify'),
144 help="Path to the script heat-config-notify"),
Rabi Mishra65493fb2016-01-29 22:23:21 +0530145
Steve Baker450aa7f2014-08-25 10:37:27 +1200146]
147
148
149def init_conf(read_conf=True):
150
151 default_config_files = None
152 if read_conf:
153 confpath = os.path.join(
154 os.path.dirname(os.path.realpath(heat_integrationtests.__file__)),
155 'heat_integrationtests.conf')
156 if os.path.isfile(confpath):
157 default_config_files = [confpath]
158
159 conf = cfg.ConfigOpts()
160 conf(args=[], project='heat_integrationtests',
161 default_config_files=default_config_files)
162
163 for opt in IntegrationTestGroup:
164 conf.register_opt(opt)
165 return conf
166
167
Thomas Hervecd3622e2014-12-17 10:36:51 +0100168def list_opts():
169 yield None, IntegrationTestGroup