From d7ec4fd0b8e70f6f96323c7dddcde4b30169a124 Mon Sep 17 00:00:00 2001 From: Bartosz Woronicz Date: Mon, 8 Mar 2021 16:18:52 +0100 Subject: [PATCH] fix formatting issues and docstring That fixes the issues introduced in PR #512 #517 Now flake8 should not complain --- zaza/openstack/charm_tests/vault/tests.py | 1 - zaza/openstack/charm_tests/vault/utils.py | 7 ++++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/zaza/openstack/charm_tests/vault/tests.py b/zaza/openstack/charm_tests/vault/tests.py index 8c3daca..c5211e0 100644 --- a/zaza/openstack/charm_tests/vault/tests.py +++ b/zaza/openstack/charm_tests/vault/tests.py @@ -34,7 +34,6 @@ import zaza.model import zaza.utilities.juju as juju_utils - class BaseVaultTest(test_utils.OpenStackBaseTest): """Base class for vault tests.""" diff --git a/zaza/openstack/charm_tests/vault/utils.py b/zaza/openstack/charm_tests/vault/utils.py index 97fd060..60ac429 100644 --- a/zaza/openstack/charm_tests/vault/utils.py +++ b/zaza/openstack/charm_tests/vault/utils.py @@ -138,9 +138,12 @@ def get_vip_client(cacert=None): def get_cluster_leader(clients): - """Get Vault cluster leader + """Get Vault cluster leader. + :param clients: Clients list to get leader :type clients: List of CharmVaultClient + :returns: CharmVaultClient + :rtype: CharmVaultClient or None We have to make sure we run api calls against the actual leader """ @@ -158,6 +161,8 @@ def get_running_config(client): :param client: Client used to get config :type client: CharmVaultClient + :returns: dict from Vault api response + :rtype: dict The hvac library does not support getting info from endpoint /v1/sys/config/state/sanitized Therefore we implement it here