blob: 91aa2c48bd2cc39da129124bd3c3e8662a07cef5 [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
Michael Johnson0a0f9b32019-01-02 16:58:21 -080034# Pull in the service_available for barbican if it is not defined.
35# If the barbican tempest plugin isn't loaded, this won't load from
36# tempest.conf.
37try:
38 if cfg.CONF.service_available.barbican is not None:
39 LOG.info('Barbican service_available state: {}'.format(
40 cfg.CONF.service_available.barbican))
41except cfg.NoSuchOptError:
42 ServiceAvailableGroup.append(
43 cfg.BoolOpt('barbican', default=False,
44 help="Whether or not the barbican service is expected to "
45 "be available."))
46
Jude Cross986e3f52017-07-24 14:57:20 -070047octavia_group = cfg.OptGroup(name='load_balancer',
48 title='load-balancer service options')
49
50OctaviaGroup = [
51 # Tempest plugin common options
52 cfg.StrOpt("region",
53 default="",
54 help="The region name to use. If empty, the value "
55 "of identity.region is used instead. If no such region "
56 "is found in the service catalog, the first found one is "
57 "used."),
58 cfg.StrOpt('catalog_type',
59 default='load-balancer',
60 help='Catalog type of the Octavia service.'),
61 cfg.StrOpt('endpoint_type',
62 default='publicURL',
63 choices=['public', 'admin', 'internal',
64 'publicURL', 'adminURL', 'internalURL'],
65 help="The endpoint type to use for the load-balancer service"),
66 cfg.IntOpt('build_interval',
67 default=5,
68 help='Time in seconds between build status checks for '
69 'non-load-balancer resources to build'),
70 cfg.IntOpt('build_timeout',
Jacky Hu2b95f2f2018-09-30 09:12:25 +080071 default=300,
Jude Cross986e3f52017-07-24 14:57:20 -070072 help='Timeout in seconds to wait for non-load-balancer '
73 'resources to build'),
Michael Johnson0a0f9b32019-01-02 16:58:21 -080074 cfg.StrOpt('octavia_svc_username', default='admin',
75 help='The service_auth username the Octavia services are using'
76 'to access other OpenStack services.'),
Jude Cross986e3f52017-07-24 14:57:20 -070077 # load-balancer specific options
78 cfg.IntOpt('check_interval',
79 default=5,
80 help='Interval to check for status changes.'),
81 cfg.IntOpt('check_timeout',
82 default=60,
83 help='Timeout, in seconds, to wait for a status change.'),
84 cfg.BoolOpt('test_with_noop',
85 default=False,
86 help='Runs the tests assuming no-op drivers are being used. '
87 'Tests will assume no actual amphora are created.'),
88 cfg.IntOpt('lb_build_interval',
89 default=10,
90 help='Time in seconds between build status checks for a '
91 'load balancer.'),
92 cfg.IntOpt('lb_build_timeout',
93 default=900,
94 help='Timeout in seconds to wait for a '
95 'load balancer to build.'),
96 cfg.StrOpt('member_role',
97 default='load-balancer_member',
98 help='The load balancing member RBAC role.'),
99 cfg.StrOpt('admin_role',
100 default='load-balancer_admin',
101 help='The load balancing admin RBAC role.'),
102 cfg.IntOpt('scp_connection_timeout',
103 default=5,
104 help='Timeout in seconds to wait for a '
105 'scp connection to complete.'),
106 cfg.IntOpt('scp_connection_attempts',
107 default=20,
108 help='Retries for scp to attempt to connect.'),
109 cfg.StrOpt('provider',
110 default='octavia',
111 help='The provider driver to use for the tests.'),
112 cfg.StrOpt('RBAC_test_type', default=const.ADVANCED,
113 choices=[const.ADVANCED, const.OWNERADMIN, const.NONE],
114 help='Type of RBAC tests to run. "advanced" runs the octavia '
115 'default RBAC tests. "owner_or_admin" runs the legacy '
116 'owner or admin tests. "none" disables the RBAC tests.'),
Michael Johnsonfc223fe2019-01-15 16:40:05 -0800117 cfg.DictOpt('enabled_provider_drivers',
118 help=('List of enabled provider drivers and description '
119 'dictionaries. Must match the driver name in the '
120 'octavia.api.drivers entrypoint. Example: '
121 '{\'amphora\': \'The Octavia Amphora driver.\', '
122 '\'octavia\': \'Deprecated alias of the Octavia '
123 'Amphora driver.\'}'),
124 default={'amphora': 'The Octavia Amphora driver.',
125 'octavia': 'Deprecated alias of the Octavia Amphora '
126 'driver.'}),
Jude Cross986e3f52017-07-24 14:57:20 -0700127 # Networking
128 cfg.BoolOpt('test_with_ipv6',
129 default=True,
130 help='When true the IPv6 tests will be run.'),
131 cfg.BoolOpt('disable_boot_network', default=False,
132 help='True if your cloud does not allow creating networks or '
133 'specifying the boot network for instances.'),
134 cfg.BoolOpt('enable_security_groups', default=False,
135 help='When true, security groups will be created for the test '
136 'servers. When false, port security will be disabled on '
137 'the created networks.'),
138 cfg.StrOpt('test_network_override',
139 help='Overrides network creation and uses this network ID for '
140 'all tests (VIP, members, etc.). Required if '
141 'test_subnet_override is set.'),
142 cfg.StrOpt('test_subnet_override',
143 help='Overrides subnet creation and uses this subnet ID for '
144 'all IPv4 tests (VIP, members, etc.). Optional'),
145 cfg.StrOpt('test_ipv6_subnet_override',
146 help='Overrides subnet creation and uses this subnet ID for '
147 'all IPv6 tests (VIP, members, etc.). Optional and only '
148 'valid if test_network_override is set.'),
149 cfg.StrOpt('vip_subnet_cidr',
150 default='10.1.1.0/24',
151 help='CIDR format subnet to use for the vip subnet.'),
152 cfg.StrOpt('vip_ipv6_subnet_cidr',
153 default='fdde:1a92:7523:70a0::/64',
154 help='CIDR format subnet to use for the IPv6 vip subnet.'),
155 cfg.StrOpt('member_1_ipv4_subnet_cidr',
156 default='10.2.1.0/24',
157 help='CIDR format subnet to use for the member 1 subnet.'),
158 cfg.StrOpt('member_1_ipv6_subnet_cidr',
159 default='fd7b:f9f7:0fff:4eca::/64',
160 help='CIDR format subnet to use for the member 1 ipv6 subnet.'),
161 cfg.StrOpt('member_2_ipv4_subnet_cidr',
162 default='10.2.2.0/24',
163 help='CIDR format subnet to use for the member 2 subnet.'),
164 cfg.StrOpt('member_2_ipv6_subnet_cidr',
165 default='fd77:1457:4cf0:26a8::/64',
166 help='CIDR format subnet to use for the member 1 ipv6 subnet.'),
167 # Environment specific options
168 # These are used to accomidate clouds with specific limitations
169 cfg.IntOpt('random_server_name_length',
170 default=0,
171 help='If non-zero, generate a random name of the length '
172 'provided for each server, in the format "m[A-Z0-9]*". '),
173 cfg.StrOpt('availability_zone',
174 default=None,
175 help='Availability zone to use for creating servers.'),
176]
Reedipf88cffc2018-09-03 13:20:08 +0000177
178lb_feature_enabled_group = cfg.OptGroup(name='loadbalancer-feature-enabled',
179 title='Enabled/Disabled LB features')
180LBFeatureEnabledGroup = [
181 cfg.BoolOpt('health_monitor_enabled',
182 default=True,
183 help="Whether Health Monitor is available with provider"
184 " driver or not."),
Michael Johnson0a0f9b32019-01-02 16:58:21 -0800185 cfg.BoolOpt('terminated_tls_enabled',
186 default=True,
187 help="Whether TLS termination is available with provider "
188 "driver or not."),
Reedip6626f252018-12-03 07:31:34 +0000189 cfg.BoolOpt('l7_protocol_enabled',
190 default=True,
191 help="Whether L7 Protocols are available with the provider"
192 " driver or not."),
193 cfg.StrOpt('l4_protocol',
194 default="TCP",
195 help="The type of L4 Protocol which is supported with the"
196 " provider driver."),
Reedipf88cffc2018-09-03 13:20:08 +0000197]