blob: 52da1f248b78ecb68c6f8e1fe9777a42440d6704 [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.'),
48 cfg.StrOpt('endpoint_type',
49 default='publicURL',
50 choices=['public', 'admin', 'internal',
51 'publicURL', 'adminURL', 'internalURL'],
52 help="The endpoint type to use for the load-balancer service"),
53 cfg.IntOpt('build_interval',
54 default=5,
55 help='Time in seconds between build status checks for '
56 'non-load-balancer resources to build'),
57 cfg.IntOpt('build_timeout',
Jacky Hu2b95f2f2018-09-30 09:12:25 +080058 default=300,
Jude Cross986e3f52017-07-24 14:57:20 -070059 help='Timeout in seconds to wait for non-load-balancer '
60 'resources to build'),
Michael Johnson0a0f9b32019-01-02 16:58:21 -080061 cfg.StrOpt('octavia_svc_username', default='admin',
62 help='The service_auth username the Octavia services are using'
63 'to access other OpenStack services.'),
Jude Cross986e3f52017-07-24 14:57:20 -070064 # load-balancer specific options
65 cfg.IntOpt('check_interval',
66 default=5,
67 help='Interval to check for status changes.'),
68 cfg.IntOpt('check_timeout',
69 default=60,
70 help='Timeout, in seconds, to wait for a status change.'),
71 cfg.BoolOpt('test_with_noop',
72 default=False,
73 help='Runs the tests assuming no-op drivers are being used. '
74 'Tests will assume no actual amphora are created.'),
75 cfg.IntOpt('lb_build_interval',
76 default=10,
77 help='Time in seconds between build status checks for a '
78 'load balancer.'),
79 cfg.IntOpt('lb_build_timeout',
80 default=900,
81 help='Timeout in seconds to wait for a '
82 'load balancer to build.'),
83 cfg.StrOpt('member_role',
84 default='load-balancer_member',
85 help='The load balancing member RBAC role.'),
86 cfg.StrOpt('admin_role',
87 default='load-balancer_admin',
88 help='The load balancing admin RBAC role.'),
89 cfg.IntOpt('scp_connection_timeout',
90 default=5,
91 help='Timeout in seconds to wait for a '
92 'scp connection to complete.'),
93 cfg.IntOpt('scp_connection_attempts',
94 default=20,
95 help='Retries for scp to attempt to connect.'),
96 cfg.StrOpt('provider',
97 default='octavia',
98 help='The provider driver to use for the tests.'),
99 cfg.StrOpt('RBAC_test_type', default=const.ADVANCED,
100 choices=[const.ADVANCED, const.OWNERADMIN, const.NONE],
101 help='Type of RBAC tests to run. "advanced" runs the octavia '
102 'default RBAC tests. "owner_or_admin" runs the legacy '
103 'owner or admin tests. "none" disables the RBAC tests.'),
Michael Johnsonfc223fe2019-01-15 16:40:05 -0800104 cfg.DictOpt('enabled_provider_drivers',
105 help=('List of enabled provider drivers and description '
106 'dictionaries. Must match the driver name in the '
107 'octavia.api.drivers entrypoint. Example: '
108 '{\'amphora\': \'The Octavia Amphora driver.\', '
109 '\'octavia\': \'Deprecated alias of the Octavia '
110 'Amphora driver.\'}'),
111 default={'amphora': 'The Octavia Amphora driver.',
112 'octavia': 'Deprecated alias of the Octavia Amphora '
113 'driver.'}),
Carlos Goncalvesee09a1b2019-07-22 11:45:04 +0200114 cfg.StrOpt('loadbalancer_topology',
115 default=const.SINGLE,
116 choices=const.SUPPORTED_LB_TOPOLOGIES,
117 help='Load balancer topology configuration.'),
Michael Johnson77df0322019-01-15 18:27:58 -0800118 cfg.DictOpt('expected_flavor_capability',
119 help=('Defines a provider flavor capability that is expected '
120 'to be present in the selected provider under test. '
121 'It is specified in a "name": "description" dict. '
122 'Example: {"loadbalancer_topology": "The load balancer '
123 'topology. One of: SINGLE - One amphora per load '
124 'balancer. ACTIVE_STANDBY - Two amphora per load '
125 'balancer."}'),
126 default={'loadbalancer_topology': 'The load balancer '
127 'topology. One of: SINGLE - One amphora per load '
128 'balancer. ACTIVE_STANDBY - Two amphora per load '
129 'balancer.'}),
Jude Cross986e3f52017-07-24 14:57:20 -0700130 # Networking
131 cfg.BoolOpt('test_with_ipv6',
132 default=True,
133 help='When true the IPv6 tests will be run.'),
134 cfg.BoolOpt('disable_boot_network', default=False,
135 help='True if your cloud does not allow creating networks or '
136 'specifying the boot network for instances.'),
137 cfg.BoolOpt('enable_security_groups', default=False,
138 help='When true, security groups will be created for the test '
139 'servers. When false, port security will be disabled on '
140 'the created networks.'),
141 cfg.StrOpt('test_network_override',
142 help='Overrides network creation and uses this network ID for '
143 'all tests (VIP, members, etc.). Required if '
144 'test_subnet_override is set.'),
145 cfg.StrOpt('test_subnet_override',
146 help='Overrides subnet creation and uses this subnet ID for '
147 'all IPv4 tests (VIP, members, etc.). Optional'),
148 cfg.StrOpt('test_ipv6_subnet_override',
149 help='Overrides subnet creation and uses this subnet ID for '
150 'all IPv6 tests (VIP, members, etc.). Optional and only '
151 'valid if test_network_override is set.'),
152 cfg.StrOpt('vip_subnet_cidr',
153 default='10.1.1.0/24',
154 help='CIDR format subnet to use for the vip subnet.'),
155 cfg.StrOpt('vip_ipv6_subnet_cidr',
156 default='fdde:1a92:7523:70a0::/64',
157 help='CIDR format subnet to use for the IPv6 vip subnet.'),
158 cfg.StrOpt('member_1_ipv4_subnet_cidr',
159 default='10.2.1.0/24',
160 help='CIDR format subnet to use for the member 1 subnet.'),
161 cfg.StrOpt('member_1_ipv6_subnet_cidr',
162 default='fd7b:f9f7:0fff:4eca::/64',
163 help='CIDR format subnet to use for the member 1 ipv6 subnet.'),
164 cfg.StrOpt('member_2_ipv4_subnet_cidr',
165 default='10.2.2.0/24',
166 help='CIDR format subnet to use for the member 2 subnet.'),
167 cfg.StrOpt('member_2_ipv6_subnet_cidr',
168 default='fd77:1457:4cf0:26a8::/64',
169 help='CIDR format subnet to use for the member 1 ipv6 subnet.'),
Carlos Goncalvesc2e12162019-02-14 23:57:44 +0100170 # Amphora specific options
171 cfg.StrOpt('amphora_ssh_user',
172 default='ubuntu',
173 help='The amphora SSH user.'),
174 cfg.StrOpt('amphora_ssh_key',
175 default='/tmp/octavia_ssh_key',
176 help='The amphora SSH key file.'),
Jude Cross986e3f52017-07-24 14:57:20 -0700177 # Environment specific options
Carlos Goncalvesc2e12162019-02-14 23:57:44 +0100178 # These are used to accomodate clouds with specific limitations
Jude Cross986e3f52017-07-24 14:57:20 -0700179 cfg.IntOpt('random_server_name_length',
180 default=0,
181 help='If non-zero, generate a random name of the length '
182 'provided for each server, in the format "m[A-Z0-9]*". '),
183 cfg.StrOpt('availability_zone',
184 default=None,
185 help='Availability zone to use for creating servers.'),
186]
Reedipf88cffc2018-09-03 13:20:08 +0000187
188lb_feature_enabled_group = cfg.OptGroup(name='loadbalancer-feature-enabled',
189 title='Enabled/Disabled LB features')
190LBFeatureEnabledGroup = [
191 cfg.BoolOpt('health_monitor_enabled',
192 default=True,
Carlos Goncalvescc7dbcd2019-03-14 18:48:12 +0100193 help="Whether Health Monitor is available with provider "
194 "driver or not."),
Michael Johnson0a0f9b32019-01-02 16:58:21 -0800195 cfg.BoolOpt('terminated_tls_enabled',
196 default=True,
197 help="Whether TLS termination is available with provider "
198 "driver or not."),
Reedip6626f252018-12-03 07:31:34 +0000199 cfg.BoolOpt('l7_protocol_enabled',
200 default=True,
Carlos Goncalvescc7dbcd2019-03-14 18:48:12 +0100201 help="Whether L7 Protocols are available with the provider "
202 "driver or not."),
203 cfg.BoolOpt('pool_algorithms_enabled',
204 default=True,
205 help="Whether pool algorithms are available with provider"
206 "driver or not."),
Reedip6626f252018-12-03 07:31:34 +0000207 cfg.StrOpt('l4_protocol',
208 default="TCP",
Carlos Goncalvescc7dbcd2019-03-14 18:48:12 +0100209 help="The type of L4 Protocol which is supported with the "
210 "provider driver."),
Carlos Goncalves5b963c42019-02-03 15:37:28 +0100211 cfg.StrOpt('spare_pool_enabled',
212 default=False,
213 help="Wether spare pool is available with amphora provider "
214 "driver or not."),
Reedipf88cffc2018-09-03 13:20:08 +0000215]