Merge pull request #351 from gnuoy/keystone-wait_for_cacert
Add wait_for_cacert
This commit is contained in:
@@ -14,8 +14,12 @@
|
||||
|
||||
"""Code for setting up keystone."""
|
||||
|
||||
import logging
|
||||
|
||||
import keystoneauth1
|
||||
|
||||
import zaza.charm_lifecycle.utils as lifecycle_utils
|
||||
import zaza.model
|
||||
import zaza.openstack.utilities.openstack as openstack_utils
|
||||
from zaza.openstack.charm_tests.keystone import (
|
||||
BaseKeystoneTest,
|
||||
@@ -30,6 +34,25 @@ from zaza.openstack.charm_tests.keystone import (
|
||||
)
|
||||
|
||||
|
||||
def wait_for_cacert(model_name=None):
|
||||
"""Wait for keystone to install a cacert.
|
||||
|
||||
:param model_name: Name of model to query.
|
||||
:type model_name: str
|
||||
"""
|
||||
logging.info("Waiting for cacert")
|
||||
zaza.model.block_until_file_has_contents(
|
||||
'keystone',
|
||||
openstack_utils.KEYSTONE_REMOTE_CACERT,
|
||||
'CERTIFICATE',
|
||||
model_name=model_name)
|
||||
zaza.model.block_until_all_units_idle(model_name=model_name)
|
||||
test_config = lifecycle_utils.get_charm_config(fatal=False)
|
||||
zaza.model.wait_for_application_states(
|
||||
states=test_config.get('target_deploy_status', {}),
|
||||
model_name=model_name)
|
||||
|
||||
|
||||
def add_demo_user():
|
||||
"""Add a demo user to the current deployment."""
|
||||
def _v2():
|
||||
|
||||
Reference in New Issue
Block a user