blob: dee2bd269b1fd8b935cee238f33485524243d247 [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.'),
Jude Cross986e3f52017-07-24 14:57:20 -0700118 # Networking
119 cfg.BoolOpt('test_with_ipv6',
120 default=True,
121 help='When true the IPv6 tests will be run.'),
122 cfg.BoolOpt('disable_boot_network', default=False,
123 help='True if your cloud does not allow creating networks or '
124 'specifying the boot network for instances.'),
125 cfg.BoolOpt('enable_security_groups', default=False,
126 help='When true, security groups will be created for the test '
127 'servers. When false, port security will be disabled on '
128 'the created networks.'),
129 cfg.StrOpt('test_network_override',
130 help='Overrides network creation and uses this network ID for '
131 'all tests (VIP, members, etc.). Required if '
132 'test_subnet_override is set.'),
133 cfg.StrOpt('test_subnet_override',
134 help='Overrides subnet creation and uses this subnet ID for '
135 'all IPv4 tests (VIP, members, etc.). Optional'),
136 cfg.StrOpt('test_ipv6_subnet_override',
137 help='Overrides subnet creation and uses this subnet ID for '
138 'all IPv6 tests (VIP, members, etc.). Optional and only '
139 'valid if test_network_override is set.'),
140 cfg.StrOpt('vip_subnet_cidr',
141 default='10.1.1.0/24',
142 help='CIDR format subnet to use for the vip subnet.'),
143 cfg.StrOpt('vip_ipv6_subnet_cidr',
144 default='fdde:1a92:7523:70a0::/64',
145 help='CIDR format subnet to use for the IPv6 vip subnet.'),
146 cfg.StrOpt('member_1_ipv4_subnet_cidr',
147 default='10.2.1.0/24',
148 help='CIDR format subnet to use for the member 1 subnet.'),
149 cfg.StrOpt('member_1_ipv6_subnet_cidr',
150 default='fd7b:f9f7:0fff:4eca::/64',
151 help='CIDR format subnet to use for the member 1 ipv6 subnet.'),
152 cfg.StrOpt('member_2_ipv4_subnet_cidr',
153 default='10.2.2.0/24',
154 help='CIDR format subnet to use for the member 2 subnet.'),
155 cfg.StrOpt('member_2_ipv6_subnet_cidr',
156 default='fd77:1457:4cf0:26a8::/64',
157 help='CIDR format subnet to use for the member 1 ipv6 subnet.'),
Carlos Goncalvesc2e12162019-02-14 23:57:44 +0100158 # Amphora specific options
159 cfg.StrOpt('amphora_ssh_user',
160 default='ubuntu',
161 help='The amphora SSH user.'),
162 cfg.StrOpt('amphora_ssh_key',
163 default='/tmp/octavia_ssh_key',
164 help='The amphora SSH key file.'),
Jude Cross986e3f52017-07-24 14:57:20 -0700165 # Environment specific options
Carlos Goncalvesc2e12162019-02-14 23:57:44 +0100166 # These are used to accomodate clouds with specific limitations
Jude Cross986e3f52017-07-24 14:57:20 -0700167 cfg.IntOpt('random_server_name_length',
168 default=0,
169 help='If non-zero, generate a random name of the length '
170 'provided for each server, in the format "m[A-Z0-9]*". '),
171 cfg.StrOpt('availability_zone',
172 default=None,
173 help='Availability zone to use for creating servers.'),
174]
Reedipf88cffc2018-09-03 13:20:08 +0000175
176lb_feature_enabled_group = cfg.OptGroup(name='loadbalancer-feature-enabled',
177 title='Enabled/Disabled LB features')
178LBFeatureEnabledGroup = [
179 cfg.BoolOpt('health_monitor_enabled',
180 default=True,
Carlos Goncalvescc7dbcd2019-03-14 18:48:12 +0100181 help="Whether Health Monitor is available with provider "
182 "driver or not."),
Michael Johnson0a0f9b32019-01-02 16:58:21 -0800183 cfg.BoolOpt('terminated_tls_enabled',
184 default=True,
185 help="Whether TLS termination is available with provider "
186 "driver or not."),
Reedip6626f252018-12-03 07:31:34 +0000187 cfg.BoolOpt('l7_protocol_enabled',
188 default=True,
Carlos Goncalvescc7dbcd2019-03-14 18:48:12 +0100189 help="Whether L7 Protocols are available with the provider "
190 "driver or not."),
191 cfg.BoolOpt('pool_algorithms_enabled',
192 default=True,
193 help="Whether pool algorithms are available with provider"
194 "driver or not."),
Reedip6626f252018-12-03 07:31:34 +0000195 cfg.StrOpt('l4_protocol',
196 default="TCP",
Carlos Goncalvescc7dbcd2019-03-14 18:48:12 +0100197 help="The type of L4 Protocol which is supported with the "
198 "provider driver."),
Carlos Goncalves5b963c42019-02-03 15:37:28 +0100199 cfg.StrOpt('spare_pool_enabled',
200 default=False,
201 help="Wether spare pool is available with amphora provider "
202 "driver or not."),
Reedipf88cffc2018-09-03 13:20:08 +0000203]