diff options
author | Cédric Ollivier <cedric.ollivier@orange.com> | 2018-09-05 21:48:24 +0200 |
---|---|---|
committer | Cédric Ollivier <cedric.ollivier@orange.com> | 2018-09-05 22:40:05 +0200 |
commit | 95bd62a751501caf0755e79e33de7a42f72deb27 (patch) | |
tree | 4aceb0eb4473d98a8cfb467c6aeb5ee0ee801651 /functest/opnfv_tests/openstack/barbican | |
parent | 9ec639526ed32d4b05168627c5c016fb66b7d008 (diff) |
Conform with Barbican gates
tempest.conf conforms with Devstack post-actions [1].
One test is still disabled as it may force to sign all images.
A deeper analysis has to be done before enabling it.
[1] https://github.com/openstack/barbican-tempest-plugin/blob/master/tools/pre_test_hook.sh
Change-Id: I163c0e7c4671ca67f0b6c127c29fdcb12a8e426b
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'functest/opnfv_tests/openstack/barbican')
-rw-r--r-- | functest/opnfv_tests/openstack/barbican/__init__.py | 0 | ||||
-rw-r--r-- | functest/opnfv_tests/openstack/barbican/barbican.py | 41 |
2 files changed, 41 insertions, 0 deletions
diff --git a/functest/opnfv_tests/openstack/barbican/__init__.py b/functest/opnfv_tests/openstack/barbican/__init__.py new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/functest/opnfv_tests/openstack/barbican/__init__.py diff --git a/functest/opnfv_tests/openstack/barbican/barbican.py b/functest/opnfv_tests/openstack/barbican/barbican.py new file mode 100644 index 000000000..b9488c2b6 --- /dev/null +++ b/functest/opnfv_tests/openstack/barbican/barbican.py @@ -0,0 +1,41 @@ +#!/usr/bin/env python + +# Copyright (c) 2018 Orange and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 + +# pylint: disable=missing-docstring + +import logging + +from six.moves import configparser + +from functest.opnfv_tests.openstack.tempest import tempest + + +class Barbican(tempest.TempestCommon): + + __logger = logging.getLogger(__name__) + + def configure(self, **kwargs): + super(Barbican, self).configure(**kwargs) + rconfig = configparser.RawConfigParser() + rconfig.read(self.conf_file) + if not rconfig.has_section('auth'): + rconfig.add_section('auth') + rconfig.set('auth', 'tempest_roles', 'creator') + if not rconfig.has_section('glance'): + rconfig.add_section('glance') + rconfig.set('glance', 'verify_glance_signatures', True) + if not rconfig.has_section('ephemeral_storage_encryption'): + rconfig.add_section('ephemeral_storage_encryption') + rconfig.set('ephemeral_storage_encryption', 'enabled', True) + if not rconfig.has_section('image-feature-enabled'): + rconfig.add_section('image-feature-enabled') + rconfig.set('image-feature-enabled', 'api_v1', False) + with open(self.conf_file, 'wb') as config_file: + rconfig.write(config_file) + self.backup_tempest_config(self.conf_file, self.res_dir) |