blob: d05637392fa1bbb386982eaf15c380aabd611ecc [file] [log] [blame]
Jude Cross986e3f52017-07-24 14:57:20 -07001# Copyright 2016 Rackspace Inc.
2#
3# Licensed under the Apache License, Version 2.0 (the "License"); you may
4# not use this file except in compliance with the License. You may obtain
5# a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12# License for the specific language governing permissions and limitations
13# under the License.
14
15
16from oslo_config import cfg
Michael Johnson0a0f9b32019-01-02 16:58:21 -080017from oslo_log import log as logging
Jude Cross986e3f52017-07-24 14:57:20 -070018
19from octavia_tempest_plugin.common import constants as const
20
Michael Johnson0a0f9b32019-01-02 16:58:21 -080021
22LOG = logging.getLogger(__name__)
23
Jude Cross986e3f52017-07-24 14:57:20 -070024service_available_group = cfg.OptGroup(name='service_available',
25 title='Available OpenStack Services')
26
27ServiceAvailableGroup = [
28 cfg.BoolOpt('load_balancer',
29 default=True,
30 help="Whether or not the load-balancer service is expected "
31 "to be available."),
32]
33
34octavia_group = cfg.OptGroup(name='load_balancer',
35 title='load-balancer service options')
36
37OctaviaGroup = [
38 # Tempest plugin common options
39 cfg.StrOpt("region",
40 default="",
41 help="The region name to use. If empty, the value "
42 "of identity.region is used instead. If no such region "
43 "is found in the service catalog, the first found one is "
44 "used."),
45 cfg.StrOpt('catalog_type',
46 default='load-balancer',
47 help='Catalog type of the Octavia service.'),
Ilya Menkov749e41b2020-06-08 12:36:20 +040048 cfg.BoolOpt('allow_invisible_resource_usage',
49 default=False,
50 help='Ability to use network resources that user cannot see '
51 'or "show" on load balancers.'),
Jude Cross986e3f52017-07-24 14:57:20 -070052 cfg.StrOpt('endpoint_type',
53 default='publicURL',
54 choices=['public', 'admin', 'internal',
55 'publicURL', 'adminURL', 'internalURL'],
56 help="The endpoint type to use for the load-balancer service"),
57 cfg.IntOpt('build_interval',
58 default=5,
59 help='Time in seconds between build status checks for '
60 'non-load-balancer resources to build'),
61 cfg.IntOpt('build_timeout',
Jacky Hu2b95f2f2018-09-30 09:12:25 +080062 default=300,
Jude Cross986e3f52017-07-24 14:57:20 -070063 help='Timeout in seconds to wait for non-load-balancer '
64 'resources to build'),
Michael Johnson0a0f9b32019-01-02 16:58:21 -080065 cfg.StrOpt('octavia_svc_username', default='admin',
66 help='The service_auth username the Octavia services are using'
67 'to access other OpenStack services.'),
Jude Cross986e3f52017-07-24 14:57:20 -070068 # load-balancer specific options
69 cfg.IntOpt('check_interval',
70 default=5,
71 help='Interval to check for status changes.'),
72 cfg.IntOpt('check_timeout',
Michael Johnson6d99fc62018-07-22 16:04:48 -070073 default=120,
Jude Cross986e3f52017-07-24 14:57:20 -070074 help='Timeout, in seconds, to wait for a status change.'),
75 cfg.BoolOpt('test_with_noop',
76 default=False,
77 help='Runs the tests assuming no-op drivers are being used. '
78 'Tests will assume no actual amphora are created.'),
79 cfg.IntOpt('lb_build_interval',
80 default=10,
81 help='Time in seconds between build status checks for a '
82 'load balancer.'),
83 cfg.IntOpt('lb_build_timeout',
84 default=900,
85 help='Timeout in seconds to wait for a '
86 'load balancer to build.'),
87 cfg.StrOpt('member_role',
88 default='load-balancer_member',
89 help='The load balancing member RBAC role.'),
90 cfg.StrOpt('admin_role',
91 default='load-balancer_admin',
92 help='The load balancing admin RBAC role.'),
93 cfg.IntOpt('scp_connection_timeout',
94 default=5,
95 help='Timeout in seconds to wait for a '
96 'scp connection to complete.'),
97 cfg.IntOpt('scp_connection_attempts',
98 default=20,
99 help='Retries for scp to attempt to connect.'),
100 cfg.StrOpt('provider',
101 default='octavia',
102 help='The provider driver to use for the tests.'),
103 cfg.StrOpt('RBAC_test_type', default=const.ADVANCED,
104 choices=[const.ADVANCED, const.OWNERADMIN, const.NONE],
105 help='Type of RBAC tests to run. "advanced" runs the octavia '
106 'default RBAC tests. "owner_or_admin" runs the legacy '
107 'owner or admin tests. "none" disables the RBAC tests.'),
Michael Johnsonfc223fe2019-01-15 16:40:05 -0800108 cfg.DictOpt('enabled_provider_drivers',
Carlos Goncalvesdecfc352019-07-25 19:31:52 +0200109 help=('A comma separated list of dictionaries of the '
110 'enabled provider driver names and descriptions. '
111 'Must match the driver name in the '
Michael Johnsonfc223fe2019-01-15 16:40:05 -0800112 'octavia.api.drivers entrypoint. Example: '
Carlos Goncalvesdecfc352019-07-25 19:31:52 +0200113 'amphora:The Octavia Amphora driver.,'
114 'octavia:Deprecated alias of the Octavia '
Ann Taraday7d0b5822019-10-17 15:28:30 +0400115 'Amphora driver.,'
116 'amphorav2:The Octavia Amphora driver that uses '
117 'taskflow jobboard persistence.'),
Michael Johnsonfc223fe2019-01-15 16:40:05 -0800118 default={'amphora': 'The Octavia Amphora driver.',
Ann Taraday7d0b5822019-10-17 15:28:30 +0400119 'amphorav2': 'The Octavia Amphora driver that uses '
120 'taskflow jobboard persistence.',
Michael Johnsonfc223fe2019-01-15 16:40:05 -0800121 'octavia': 'Deprecated alias of the Octavia Amphora '
122 'driver.'}),
Carlos Goncalvesee09a1b2019-07-22 11:45:04 +0200123 cfg.StrOpt('loadbalancer_topology',
124 default=const.SINGLE,
125 choices=const.SUPPORTED_LB_TOPOLOGIES,
126 help='Load balancer topology configuration.'),
Michael Johnson77df0322019-01-15 18:27:58 -0800127 cfg.DictOpt('expected_flavor_capability',
128 help=('Defines a provider flavor capability that is expected '
129 'to be present in the selected provider under test. '
130 'It is specified in a "name": "description" dict. '
131 'Example: {"loadbalancer_topology": "The load balancer '
132 'topology. One of: SINGLE - One amphora per load '
133 'balancer. ACTIVE_STANDBY - Two amphora per load '
134 'balancer."}'),
135 default={'loadbalancer_topology': 'The load balancer '
136 'topology. One of: SINGLE - One amphora per load '
137 'balancer. ACTIVE_STANDBY - Two amphora per load '
138 'balancer.'}),
Adam Harwellc2aa20c2019-11-20 11:15:07 -0800139 cfg.DictOpt('expected_availability_zone_capability',
140 help=('Defines a provider availability zone capability that '
141 'is expected to be present in the selected provider '
142 'under test. It is specified in a "name": "description" '
143 'dict. Example: {"compute_zone": "The compute '
144 'availability zone."}'),
145 default={'compute_zone': 'The compute availability zone.'}),
Jude Cross986e3f52017-07-24 14:57:20 -0700146 # Networking
147 cfg.BoolOpt('test_with_ipv6',
148 default=True,
149 help='When true the IPv6 tests will be run.'),
150 cfg.BoolOpt('disable_boot_network', default=False,
151 help='True if your cloud does not allow creating networks or '
152 'specifying the boot network for instances.'),
153 cfg.BoolOpt('enable_security_groups', default=False,
154 help='When true, security groups will be created for the test '
155 'servers. When false, port security will be disabled on '
156 'the created networks.'),
157 cfg.StrOpt('test_network_override',
158 help='Overrides network creation and uses this network ID for '
159 'all tests (VIP, members, etc.). Required if '
160 'test_subnet_override is set.'),
161 cfg.StrOpt('test_subnet_override',
162 help='Overrides subnet creation and uses this subnet ID for '
163 'all IPv4 tests (VIP, members, etc.). Optional'),
164 cfg.StrOpt('test_ipv6_subnet_override',
165 help='Overrides subnet creation and uses this subnet ID for '
166 'all IPv6 tests (VIP, members, etc.). Optional and only '
167 'valid if test_network_override is set.'),
168 cfg.StrOpt('vip_subnet_cidr',
169 default='10.1.1.0/24',
170 help='CIDR format subnet to use for the vip subnet.'),
171 cfg.StrOpt('vip_ipv6_subnet_cidr',
172 default='fdde:1a92:7523:70a0::/64',
173 help='CIDR format subnet to use for the IPv6 vip subnet.'),
174 cfg.StrOpt('member_1_ipv4_subnet_cidr',
175 default='10.2.1.0/24',
176 help='CIDR format subnet to use for the member 1 subnet.'),
177 cfg.StrOpt('member_1_ipv6_subnet_cidr',
178 default='fd7b:f9f7:0fff:4eca::/64',
179 help='CIDR format subnet to use for the member 1 ipv6 subnet.'),
180 cfg.StrOpt('member_2_ipv4_subnet_cidr',
181 default='10.2.2.0/24',
182 help='CIDR format subnet to use for the member 2 subnet.'),
183 cfg.StrOpt('member_2_ipv6_subnet_cidr',
184 default='fd77:1457:4cf0:26a8::/64',
185 help='CIDR format subnet to use for the member 1 ipv6 subnet.'),
Carlos Goncalvesc2e12162019-02-14 23:57:44 +0100186 # Amphora specific options
187 cfg.StrOpt('amphora_ssh_user',
188 default='ubuntu',
189 help='The amphora SSH user.'),
190 cfg.StrOpt('amphora_ssh_key',
Carlos Goncalves9891de02019-07-28 13:37:33 +0200191 default='/etc/octavia/.ssh/octavia_ssh_key',
Carlos Goncalvesc2e12162019-02-14 23:57:44 +0100192 help='The amphora SSH key file.'),
Jude Cross986e3f52017-07-24 14:57:20 -0700193 # Environment specific options
Carlos Goncalvesc2e12162019-02-14 23:57:44 +0100194 # These are used to accomodate clouds with specific limitations
Jude Cross986e3f52017-07-24 14:57:20 -0700195 cfg.IntOpt('random_server_name_length',
196 default=0,
197 help='If non-zero, generate a random name of the length '
198 'provided for each server, in the format "m[A-Z0-9]*". '),
199 cfg.StrOpt('availability_zone',
200 default=None,
201 help='Availability zone to use for creating servers.'),
Maciej Józefczyk6a508ce2019-07-26 13:10:50 +0000202 cfg.BoolOpt('test_reuse_connection', default=True,
203 help='Reuse TCP connections while testing LB with '
204 'HTTP members (keep-alive).'),
Jude Cross986e3f52017-07-24 14:57:20 -0700205]
Reedipf88cffc2018-09-03 13:20:08 +0000206
207lb_feature_enabled_group = cfg.OptGroup(name='loadbalancer-feature-enabled',
208 title='Enabled/Disabled LB features')
209LBFeatureEnabledGroup = [
210 cfg.BoolOpt('health_monitor_enabled',
211 default=True,
Carlos Goncalvescc7dbcd2019-03-14 18:48:12 +0100212 help="Whether Health Monitor is available with provider "
213 "driver or not."),
Michael Johnson0a0f9b32019-01-02 16:58:21 -0800214 cfg.BoolOpt('terminated_tls_enabled',
215 default=True,
216 help="Whether TLS termination is available with provider "
217 "driver or not."),
Reedip6626f252018-12-03 07:31:34 +0000218 cfg.BoolOpt('l7_protocol_enabled',
219 default=True,
Carlos Goncalvescc7dbcd2019-03-14 18:48:12 +0100220 help="Whether L7 Protocols are available with the provider "
221 "driver or not."),
222 cfg.BoolOpt('pool_algorithms_enabled',
223 default=True,
224 help="Whether pool algorithms are available with provider"
225 "driver or not."),
Reedip6626f252018-12-03 07:31:34 +0000226 cfg.StrOpt('l4_protocol',
227 default="TCP",
Carlos Goncalvescc7dbcd2019-03-14 18:48:12 +0100228 help="The type of L4 Protocol which is supported with the "
229 "provider driver."),
Gregory Thiemongee037eb82019-09-19 16:22:19 +0200230 cfg.BoolOpt('spare_pool_enabled',
231 default=False,
232 help="Wether spare pool is available with amphora provider "
233 "driver or not."),
Reedip Banerjee2bb585d2019-03-22 08:06:12 +0000234 cfg.BoolOpt('session_persistence_enabled',
235 default=True,
236 help="Whether session persistence is supported with the "
237 "provider driver."),
Reedipf88cffc2018-09-03 13:20:08 +0000238]