From d625ec79c296e45b2dca3fc33b6948f469e9eb9c Mon Sep 17 00:00:00 2001 From: Goutham Pacha Ravi Date: Fri, 19 Mar 2021 12:45:48 -0700 Subject: [PATCH] Fix manila backend_names and enable_protocols A backend in manila can have multiple storage pools and capabilities for each pool are considered to create configuration for tempest tests. These capabilities however may overlap with each other, so we need some de-duplication. Change-Id: I108615ab197b8959fe944e21ae7c1a36125ca531 --- config_tempest/services/share.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config_tempest/services/share.py b/config_tempest/services/share.py index ed1f87b1..b6d2a749 100644 --- a/config_tempest/services/share.py +++ b/config_tempest/services/share.py @@ -44,12 +44,12 @@ class ShareService(VersionedService): "pools - storage back-ends can't be discovered.") return if pools: - backends = [] - enable_protocols = [] + backends = set() + enable_protocols = set() for pool in pools: - backends.append(pool['backend']) + backends.add(pool['backend']) protocol = pool['capabilities']['storage_protocol'].lower() - enable_protocols.extend(protocol.split('_')) + enable_protocols.update(protocol.split('_')) conf.set('share', 'backend_names', ','.join(backends)) conf.set('share', 'enable_protocols', ','.join(enable_protocols))