blob: 1bc4a63fa2aa420bf3e254393a77cc578c6be4c2 [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.'),
117 # Networking
118 cfg.BoolOpt('test_with_ipv6',
119 default=True,
120 help='When true the IPv6 tests will be run.'),
121 cfg.BoolOpt('disable_boot_network', default=False,
122 help='True if your cloud does not allow creating networks or '
123 'specifying the boot network for instances.'),
124 cfg.BoolOpt('enable_security_groups', default=False,
125 help='When true, security groups will be created for the test '
126 'servers. When false, port security will be disabled on '
127 'the created networks.'),
128 cfg.StrOpt('test_network_override',
129 help='Overrides network creation and uses this network ID for '
130 'all tests (VIP, members, etc.). Required if '
131 'test_subnet_override is set.'),
132 cfg.StrOpt('test_subnet_override',
133 help='Overrides subnet creation and uses this subnet ID for '
134 'all IPv4 tests (VIP, members, etc.). Optional'),
135 cfg.StrOpt('test_ipv6_subnet_override',
136 help='Overrides subnet creation and uses this subnet ID for '
137 'all IPv6 tests (VIP, members, etc.). Optional and only '
138 'valid if test_network_override is set.'),
139 cfg.StrOpt('vip_subnet_cidr',
140 default='10.1.1.0/24',
141 help='CIDR format subnet to use for the vip subnet.'),
142 cfg.StrOpt('vip_ipv6_subnet_cidr',
143 default='fdde:1a92:7523:70a0::/64',
144 help='CIDR format subnet to use for the IPv6 vip subnet.'),
145 cfg.StrOpt('member_1_ipv4_subnet_cidr',
146 default='10.2.1.0/24',
147 help='CIDR format subnet to use for the member 1 subnet.'),
148 cfg.StrOpt('member_1_ipv6_subnet_cidr',
149 default='fd7b:f9f7:0fff:4eca::/64',
150 help='CIDR format subnet to use for the member 1 ipv6 subnet.'),
151 cfg.StrOpt('member_2_ipv4_subnet_cidr',
152 default='10.2.2.0/24',
153 help='CIDR format subnet to use for the member 2 subnet.'),
154 cfg.StrOpt('member_2_ipv6_subnet_cidr',
155 default='fd77:1457:4cf0:26a8::/64',
156 help='CIDR format subnet to use for the member 1 ipv6 subnet.'),
157 # Environment specific options
158 # These are used to accomidate clouds with specific limitations
159 cfg.IntOpt('random_server_name_length',
160 default=0,
161 help='If non-zero, generate a random name of the length '
162 'provided for each server, in the format "m[A-Z0-9]*". '),
163 cfg.StrOpt('availability_zone',
164 default=None,
165 help='Availability zone to use for creating servers.'),
166]
Reedipf88cffc2018-09-03 13:20:08 +0000167
168lb_feature_enabled_group = cfg.OptGroup(name='loadbalancer-feature-enabled',
169 title='Enabled/Disabled LB features')
170LBFeatureEnabledGroup = [
171 cfg.BoolOpt('health_monitor_enabled',
172 default=True,
173 help="Whether Health Monitor is available with provider"
174 " driver or not."),
Michael Johnson0a0f9b32019-01-02 16:58:21 -0800175 cfg.BoolOpt('terminated_tls_enabled',
176 default=True,
177 help="Whether TLS termination is available with provider "
178 "driver or not."),
Reedipf88cffc2018-09-03 13:20:08 +0000179]