blob: 4f6ea3df718959295a919bd1729b21e4c9c1bc70 [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 Baker450aa7f2014-08-25 10:37:27 +120039 help="Instance type for tests. Needs to be big enough for a "
40 "full OS plus the test workload"),
Pavlo Shchelokovskyy46e5cb22015-03-23 12:01:25 +000041 cfg.StrOpt('minimal_instance_type',
42 help="Instance type enough for simplest cases."),
Steve Baker450aa7f2014-08-25 10:37:27 +120043 cfg.StrOpt('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 Baker450aa7f2014-08-25 10:37:27 +120049 help="Name of minimal (e.g cirros) image to use when "
50 "launching test instances."),
51 cfg.StrOpt('auth_version',
52 default='v2',
53 help="Identity API version to be used for authentication "
54 "for API tests."),
55 cfg.BoolOpt('disable_ssl_certificate_validation',
56 default=False,
57 help="Set to True if using self-signed SSL certificates."),
58 cfg.IntOpt('build_interval',
59 default=4,
60 help="Time in seconds between build status checks."),
61 cfg.IntOpt('build_timeout',
62 default=1200,
63 help="Timeout in seconds to wait for a stack to build."),
64 cfg.StrOpt('network_for_ssh',
Rabi Mishraec4b03b2015-05-23 02:20:47 +053065 default='heat-net',
Steve Baker450aa7f2014-08-25 10:37:27 +120066 help="Network used for SSH connections."),
67 cfg.StrOpt('fixed_network_name',
Rabi Mishraec4b03b2015-05-23 02:20:47 +053068 default='heat-net',
Steve Baker450aa7f2014-08-25 10:37:27 +120069 help="Visible fixed network name "),
Pavlo Shchelokovskyy6fa23802015-03-23 11:22:35 +000070 cfg.StrOpt('floating_network_name',
71 default='public',
72 help="Visible floating network name "),
Steve Baker0b679bb2015-03-11 13:46:42 +130073 cfg.StrOpt('boot_config_env',
Steve Baker803f1502015-03-11 13:47:08 +130074 default=('heat_integrationtests/scenario/templates'
75 '/boot_config_none_env.yaml'),
Steve Baker0b679bb2015-03-11 13:46:42 +130076 help="Path to environment file which defines the "
77 "resource type Heat::InstallConfigAgent. Needs to "
78 "be appropriate for the image_ref."),
kairat_kushaev0ab3d7c2015-01-27 21:48:46 +030079 cfg.StrOpt('fixed_subnet_name',
Rabi Mishraec4b03b2015-05-23 02:20:47 +053080 default='heat-subnet',
kairat_kushaev0ab3d7c2015-01-27 21:48:46 +030081 help="Visible fixed sub-network name "),
Steve Baker450aa7f2014-08-25 10:37:27 +120082 cfg.IntOpt('ssh_timeout',
83 default=300,
84 help="Timeout in seconds to wait for authentication to "
85 "succeed."),
86 cfg.IntOpt('ip_version_for_ssh',
87 default=4,
88 help="IP version used for SSH connections."),
89 cfg.IntOpt('ssh_channel_timeout',
90 default=60,
91 help="Timeout in seconds to wait for output from ssh "
92 "channel."),
93 cfg.IntOpt('tenant_network_mask_bits',
94 default=28,
95 help="The mask bits for tenant ipv4 subnets"),
Steve Bakerf6c8f122015-02-10 13:54:46 +130096 cfg.BoolOpt('skip_software_config_tests',
97 default=True,
98 help="Skip software config deployment tests"),
Steve Baker450aa7f2014-08-25 10:37:27 +120099 cfg.IntOpt('volume_size',
100 default=1,
101 help='Default size in GB for volumes created by volumes tests'),
Sirushti Murugesan04ee8022015-02-02 23:00:23 +0530102 cfg.BoolOpt('skip_stack_adopt_tests',
103 default=False,
104 help="Skip Stack Adopt Integration tests"),
105 cfg.BoolOpt('skip_stack_abandon_tests',
106 default=False,
107 help="Skip Stack Abandon Integration tests"),
Anastasia Kuznetsova3e0ab4d2015-03-06 18:10:13 +0400108 cfg.IntOpt('connectivity_timeout',
109 default=120,
110 help="Timeout in seconds to wait for connectivity to "
111 "server."),
Steve Baker450aa7f2014-08-25 10:37:27 +1200112]
113
114
115def init_conf(read_conf=True):
116
117 default_config_files = None
118 if read_conf:
119 confpath = os.path.join(
120 os.path.dirname(os.path.realpath(heat_integrationtests.__file__)),
121 'heat_integrationtests.conf')
122 if os.path.isfile(confpath):
123 default_config_files = [confpath]
124
125 conf = cfg.ConfigOpts()
126 conf(args=[], project='heat_integrationtests',
127 default_config_files=default_config_files)
128
129 for opt in IntegrationTestGroup:
130 conf.register_opt(opt)
131 return conf
132
133
Thomas Hervecd3622e2014-12-17 10:36:51 +0100134def list_opts():
135 yield None, IntegrationTestGroup