Jude Cross | 986e3f5 | 2017-07-24 14:57:20 -0700 | [diff] [blame] | 1 | # 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 | |
| 16 | from oslo_config import cfg |
| 17 | |
| 18 | from octavia_tempest_plugin.common import constants as const |
| 19 | |
| 20 | service_available_group = cfg.OptGroup(name='service_available', |
| 21 | title='Available OpenStack Services') |
| 22 | |
| 23 | ServiceAvailableGroup = [ |
| 24 | cfg.BoolOpt('load_balancer', |
| 25 | default=True, |
| 26 | help="Whether or not the load-balancer service is expected " |
| 27 | "to be available."), |
| 28 | ] |
| 29 | |
| 30 | octavia_group = cfg.OptGroup(name='load_balancer', |
| 31 | title='load-balancer service options') |
| 32 | |
| 33 | OctaviaGroup = [ |
| 34 | # Tempest plugin common options |
| 35 | cfg.StrOpt("region", |
| 36 | default="", |
| 37 | help="The region name to use. If empty, the value " |
| 38 | "of identity.region is used instead. If no such region " |
| 39 | "is found in the service catalog, the first found one is " |
| 40 | "used."), |
| 41 | cfg.StrOpt('catalog_type', |
| 42 | default='load-balancer', |
| 43 | help='Catalog type of the Octavia service.'), |
| 44 | cfg.StrOpt('endpoint_type', |
| 45 | default='publicURL', |
| 46 | choices=['public', 'admin', 'internal', |
| 47 | 'publicURL', 'adminURL', 'internalURL'], |
| 48 | help="The endpoint type to use for the load-balancer service"), |
| 49 | cfg.IntOpt('build_interval', |
| 50 | default=5, |
| 51 | help='Time in seconds between build status checks for ' |
| 52 | 'non-load-balancer resources to build'), |
| 53 | cfg.IntOpt('build_timeout', |
Jude Cross | fbbd2b4 | 2017-08-09 15:21:04 -0700 | [diff] [blame] | 54 | default=60, |
Jude Cross | 986e3f5 | 2017-07-24 14:57:20 -0700 | [diff] [blame] | 55 | help='Timeout in seconds to wait for non-load-balancer ' |
| 56 | 'resources to build'), |
| 57 | # load-balancer specific options |
| 58 | cfg.IntOpt('check_interval', |
| 59 | default=5, |
| 60 | help='Interval to check for status changes.'), |
| 61 | cfg.IntOpt('check_timeout', |
| 62 | default=60, |
| 63 | help='Timeout, in seconds, to wait for a status change.'), |
| 64 | cfg.BoolOpt('test_with_noop', |
| 65 | default=False, |
| 66 | help='Runs the tests assuming no-op drivers are being used. ' |
| 67 | 'Tests will assume no actual amphora are created.'), |
| 68 | cfg.IntOpt('lb_build_interval', |
| 69 | default=10, |
| 70 | help='Time in seconds between build status checks for a ' |
| 71 | 'load balancer.'), |
| 72 | cfg.IntOpt('lb_build_timeout', |
| 73 | default=900, |
| 74 | help='Timeout in seconds to wait for a ' |
| 75 | 'load balancer to build.'), |
| 76 | cfg.StrOpt('member_role', |
| 77 | default='load-balancer_member', |
| 78 | help='The load balancing member RBAC role.'), |
| 79 | cfg.StrOpt('admin_role', |
| 80 | default='load-balancer_admin', |
| 81 | help='The load balancing admin RBAC role.'), |
| 82 | cfg.IntOpt('scp_connection_timeout', |
| 83 | default=5, |
| 84 | help='Timeout in seconds to wait for a ' |
| 85 | 'scp connection to complete.'), |
| 86 | cfg.IntOpt('scp_connection_attempts', |
| 87 | default=20, |
| 88 | help='Retries for scp to attempt to connect.'), |
| 89 | cfg.StrOpt('provider', |
| 90 | default='octavia', |
| 91 | help='The provider driver to use for the tests.'), |
| 92 | cfg.StrOpt('RBAC_test_type', default=const.ADVANCED, |
| 93 | choices=[const.ADVANCED, const.OWNERADMIN, const.NONE], |
| 94 | help='Type of RBAC tests to run. "advanced" runs the octavia ' |
| 95 | 'default RBAC tests. "owner_or_admin" runs the legacy ' |
| 96 | 'owner or admin tests. "none" disables the RBAC tests.'), |
| 97 | # Networking |
| 98 | cfg.BoolOpt('test_with_ipv6', |
| 99 | default=True, |
| 100 | help='When true the IPv6 tests will be run.'), |
| 101 | cfg.BoolOpt('disable_boot_network', default=False, |
| 102 | help='True if your cloud does not allow creating networks or ' |
| 103 | 'specifying the boot network for instances.'), |
| 104 | cfg.BoolOpt('enable_security_groups', default=False, |
| 105 | help='When true, security groups will be created for the test ' |
| 106 | 'servers. When false, port security will be disabled on ' |
| 107 | 'the created networks.'), |
| 108 | cfg.StrOpt('test_network_override', |
| 109 | help='Overrides network creation and uses this network ID for ' |
| 110 | 'all tests (VIP, members, etc.). Required if ' |
| 111 | 'test_subnet_override is set.'), |
| 112 | cfg.StrOpt('test_subnet_override', |
| 113 | help='Overrides subnet creation and uses this subnet ID for ' |
| 114 | 'all IPv4 tests (VIP, members, etc.). Optional'), |
| 115 | cfg.StrOpt('test_ipv6_subnet_override', |
| 116 | help='Overrides subnet creation and uses this subnet ID for ' |
| 117 | 'all IPv6 tests (VIP, members, etc.). Optional and only ' |
| 118 | 'valid if test_network_override is set.'), |
| 119 | cfg.StrOpt('vip_subnet_cidr', |
| 120 | default='10.1.1.0/24', |
| 121 | help='CIDR format subnet to use for the vip subnet.'), |
| 122 | cfg.StrOpt('vip_ipv6_subnet_cidr', |
| 123 | default='fdde:1a92:7523:70a0::/64', |
| 124 | help='CIDR format subnet to use for the IPv6 vip subnet.'), |
| 125 | cfg.StrOpt('member_1_ipv4_subnet_cidr', |
| 126 | default='10.2.1.0/24', |
| 127 | help='CIDR format subnet to use for the member 1 subnet.'), |
| 128 | cfg.StrOpt('member_1_ipv6_subnet_cidr', |
| 129 | default='fd7b:f9f7:0fff:4eca::/64', |
| 130 | help='CIDR format subnet to use for the member 1 ipv6 subnet.'), |
| 131 | cfg.StrOpt('member_2_ipv4_subnet_cidr', |
| 132 | default='10.2.2.0/24', |
| 133 | help='CIDR format subnet to use for the member 2 subnet.'), |
| 134 | cfg.StrOpt('member_2_ipv6_subnet_cidr', |
| 135 | default='fd77:1457:4cf0:26a8::/64', |
| 136 | help='CIDR format subnet to use for the member 1 ipv6 subnet.'), |
| 137 | # Environment specific options |
| 138 | # These are used to accomidate clouds with specific limitations |
| 139 | cfg.IntOpt('random_server_name_length', |
| 140 | default=0, |
| 141 | help='If non-zero, generate a random name of the length ' |
| 142 | 'provided for each server, in the format "m[A-Z0-9]*". '), |
| 143 | cfg.StrOpt('availability_zone', |
| 144 | default=None, |
| 145 | help='Availability zone to use for creating servers.'), |
| 146 | ] |