From 45ed967efa16d297808d549e9f0229cf4ecf0757 Mon Sep 17 00:00:00 2001 From: Nir Magnezi Date: Wed, 30 May 2018 14:50:29 +0300 Subject: [PATCH] Configure tempest for Octavia tests Story: 2001768 Task: 12474 Change-Id: I457e6a31ecb631f70e3853e4dc88c9d22cac20b3 --- config_tempest/constants.py | 1 + config_tempest/services/octavia.py | 28 +++++++++++++++++++ config_tempest/services/services.py | 4 ++- .../notes/add_octavia-2ffffc95bca6176b.yaml | 7 +++++ 4 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 config_tempest/services/octavia.py create mode 100644 releasenotes/notes/add_octavia-2ffffc95bca6176b.yaml diff --git a/config_tempest/constants.py b/config_tempest/constants.py index 376ab9b1..c36b95a9 100644 --- a/config_tempest/constants.py +++ b/config_tempest/constants.py @@ -62,6 +62,7 @@ SERVICE_NAMES = { 'metric': 'gnocchi', 'event': 'panko', 'workflowv2': 'mistral', + 'load-balancer': 'octavia', } # what API versions could the service have and should be enabled/disabled diff --git a/config_tempest/services/octavia.py b/config_tempest/services/octavia.py new file mode 100644 index 00000000..982a0bb5 --- /dev/null +++ b/config_tempest/services/octavia.py @@ -0,0 +1,28 @@ +# Copyright 2018 Red Hat, Inc. +# All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +from base import VersionedService + + +class LoadBalancerService(VersionedService): + + def set_versions(self): + super(LoadBalancerService, self).set_versions(top_level=False) + + def set_default_tempest_options(self, conf): + conf.set('load_balancer', 'enable_security_groups', 'True') + conf.set('load_balancer', 'member_role', '_member_') + conf.set('load_balancer', 'admin_role', 'admin') + conf.set('load_balancer', 'RBAC_test_type', 'owner_or_admin') diff --git a/config_tempest/services/services.py b/config_tempest/services/services.py index 808badcd..5758986d 100644 --- a/config_tempest/services/services.py +++ b/config_tempest/services/services.py @@ -25,6 +25,7 @@ from identity import IdentityService from image import ImageService from network import NetworkService from object_storage import ObjectStorageService +from octavia import LoadBalancerService import volume service_dict = {'compute': ComputeService, @@ -34,7 +35,8 @@ service_dict = {'compute': ComputeService, 'volumev3': volume.VolumeService, 'identity': IdentityService, 'ec2': boto.Ec2Service, - 's3': boto.S3Service} + 's3': boto.S3Service, + 'load-balancer': LoadBalancerService} class Services(object): diff --git a/releasenotes/notes/add_octavia-2ffffc95bca6176b.yaml b/releasenotes/notes/add_octavia-2ffffc95bca6176b.yaml new file mode 100644 index 00000000..e5700487 --- /dev/null +++ b/releasenotes/notes/add_octavia-2ffffc95bca6176b.yaml @@ -0,0 +1,7 @@ +--- +features: + - | + The tempest config tool now can configure tempest.conf with the necessary + values, to interact with and test Octavia network load balancing as a + service. +