blob: 5a3359012fffe260feafb13afe51f094d936fa12 [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',
Steve Baker7c9115d2015-08-03 11:12:46 +120030 default=(os.environ.get('OS_PROJECT_NAME') or
31 os.environ.get('OS_TENANT_NAME')),
Steve Baker450aa7f2014-08-25 10:37:27 +120032 help="Tenant name to use for API requests."),
33 cfg.StrOpt('auth_url',
34 default=os.environ.get('OS_AUTH_URL'),
35 help="Full URI of the OpenStack Identity API (Keystone), v2"),
36 cfg.StrOpt('region',
37 default=os.environ.get('OS_REGION_NAME'),
38 help="The region name to us"),
39 cfg.StrOpt('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"),
Pavlo Shchelokovskyy46e5cb22015-03-23 12:01:25 +000042 cfg.StrOpt('minimal_instance_type',
43 help="Instance type enough for simplest cases."),
Steve Baker450aa7f2014-08-25 10:37:27 +120044 cfg.StrOpt('image_ref',
Steve Baker450aa7f2014-08-25 10:37:27 +120045 help="Name of image to use for tests which boot servers."),
46 cfg.StrOpt('keypair_name',
47 default=None,
48 help="Name of existing keypair to launch servers with."),
49 cfg.StrOpt('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',
Rabi Mishraec4b03b2015-05-23 02:20:47 +053066 default='heat-net',
Steve Baker450aa7f2014-08-25 10:37:27 +120067 help="Network used for SSH connections."),
68 cfg.StrOpt('fixed_network_name',
Rabi Mishraec4b03b2015-05-23 02:20:47 +053069 default='heat-net',
Steve Baker450aa7f2014-08-25 10:37:27 +120070 help="Visible fixed network name "),
Pavlo Shchelokovskyy6fa23802015-03-23 11:22:35 +000071 cfg.StrOpt('floating_network_name',
72 default='public',
73 help="Visible floating network name "),
Steve Baker0b679bb2015-03-11 13:46:42 +130074 cfg.StrOpt('boot_config_env',
Steve Baker803f1502015-03-11 13:47:08 +130075 default=('heat_integrationtests/scenario/templates'
76 '/boot_config_none_env.yaml'),
Steve Baker0b679bb2015-03-11 13:46:42 +130077 help="Path to environment file which defines the "
78 "resource type Heat::InstallConfigAgent. Needs to "
79 "be appropriate for the image_ref."),
kairat_kushaev0ab3d7c2015-01-27 21:48:46 +030080 cfg.StrOpt('fixed_subnet_name',
Rabi Mishraec4b03b2015-05-23 02:20:47 +053081 default='heat-subnet',
kairat_kushaev0ab3d7c2015-01-27 21:48:46 +030082 help="Visible fixed sub-network name "),
Steve Baker450aa7f2014-08-25 10:37:27 +120083 cfg.IntOpt('ssh_timeout',
84 default=300,
85 help="Timeout in seconds to wait for authentication to "
86 "succeed."),
87 cfg.IntOpt('ip_version_for_ssh',
88 default=4,
89 help="IP version used for SSH connections."),
90 cfg.IntOpt('ssh_channel_timeout',
91 default=60,
92 help="Timeout in seconds to wait for output from ssh "
93 "channel."),
94 cfg.IntOpt('tenant_network_mask_bits',
95 default=28,
96 help="The mask bits for tenant ipv4 subnets"),
Steve Bakerf6c8f122015-02-10 13:54:46 +130097 cfg.BoolOpt('skip_software_config_tests',
98 default=True,
99 help="Skip software config deployment tests"),
Steve Baker450aa7f2014-08-25 10:37:27 +1200100 cfg.IntOpt('volume_size',
101 default=1,
102 help='Default size in GB for volumes created by volumes tests'),
Sirushti Murugesan04ee8022015-02-02 23:00:23 +0530103 cfg.BoolOpt('skip_stack_adopt_tests',
104 default=False,
105 help="Skip Stack Adopt Integration tests"),
106 cfg.BoolOpt('skip_stack_abandon_tests',
107 default=False,
108 help="Skip Stack Abandon Integration tests"),
Angus Salkeldff6e6752015-07-29 12:15:47 +1000109 cfg.BoolOpt('skip_notification_tests',
110 default=False,
111 help="Skip Notification Integration tests"),
Anastasia Kuznetsova3e0ab4d2015-03-06 18:10:13 +0400112 cfg.IntOpt('connectivity_timeout',
113 default=120,
114 help="Timeout in seconds to wait for connectivity to "
115 "server."),
Oleksii Chuprykov4be023a2015-07-08 07:17:08 -0400116 cfg.IntOpt('sighup_timeout',
117 default=30,
118 help="Timeout in seconds to wait for adding or removing child"
119 "process after receiving of sighup signal")
Steve Baker450aa7f2014-08-25 10:37:27 +1200120]
121
122
123def init_conf(read_conf=True):
124
125 default_config_files = None
126 if read_conf:
127 confpath = os.path.join(
128 os.path.dirname(os.path.realpath(heat_integrationtests.__file__)),
129 'heat_integrationtests.conf')
130 if os.path.isfile(confpath):
131 default_config_files = [confpath]
132
133 conf = cfg.ConfigOpts()
134 conf(args=[], project='heat_integrationtests',
135 default_config_files=default_config_files)
136
137 for opt in IntegrationTestGroup:
138 conf.register_opt(opt)
139 return conf
140
141
Thomas Hervecd3622e2014-12-17 10:36:51 +0100142def list_opts():
143 yield None, IntegrationTestGroup