Tidyup docstring and method name

This commit is contained in:
Liam Young
2020-02-04 12:48:00 +00:00
parent 9c8a18b66f
commit 5fdde89be0
3 changed files with 17 additions and 3 deletions
Executable
+13
View File
@@ -0,0 +1,13 @@
#!/usr/bin/env python3
from zaza.openstack.utilities import (
cli as cli_utils,
openstack as openstack_utils,
openstack_upgrade as upgrade_utils,
)
applications = []
for group in ['Core Identity', 'Storage', 'Control Plane', 'Compute']:
applications.extend(upgrade_utils.SERVICE_GROUPS[group])
print(applications)
+1 -1
View File
@@ -55,7 +55,7 @@ def basic_setup_and_unseal(cacert=None):
def mojo_unseal_by_unit():
"""Unseal any units reported as sealed using mojo cacert."""
cacert = zaza.openstack.utilities.generic.get_mojo_cacert()
cacert = zaza.openstack.utilities.generic.get_mojo_cacert_path()
vault_creds = vault_utils.get_credentails()
for client in vault_utils.get_clients(cacert=cacert):
if client.hvac_client.is_sealed():
+3 -2
View File
@@ -852,12 +852,13 @@ def systemctl(unit, service, command="restart"):
"{} of {} on {} failed".format(command, service, unit.entity_id))
def get_mojo_cacert():
def get_mojo_cacert_path():
"""Retrieve cacert from Mojo storage location.
:returns: Pathh to cacert
:returns: Path to cacert
:rtype: str
:raises: zaza_exceptions.CACERTNotFound
:raises: :class:`zaza_exceptions.CACERTNotfound`
"""
try:
cert_dir = os.environ['MOJO_LOCAL_DIR']