Move the code for local cert to the right place
devstack/lib/magnum#L184-188 was temporary work until barbican is available, but they are still needed only for local cert manager when barbican is not enabled. Therefore move these lines into a location that runs only if it use local cert manager. By the way, remove the comments that no one need anymore and fixed some indentations a little. Change-Id: I74b4b82b26f6a80fd03a8055b9bd8c02715962a5
This commit is contained in:
parent
a9cc251e13
commit
9704b93039
|
@ -180,15 +180,14 @@ function create_magnum_conf {
|
|||
iniset $MAGNUM_CONF DEFAULT notification_driver "messaging"
|
||||
fi
|
||||
|
||||
# Temporary work until barbican is available
|
||||
if is_service_enabled barbican; then
|
||||
iniset $MAGNUM_CONF certificates cert_manager_type "barbican"
|
||||
else
|
||||
MAGNUM_LOCAL_CERT_DIR=${MAGNUM_LOCAL_CERT_DIR:-/var/lib/magnum/certificates/}
|
||||
if [[ ! -d $MAGNUM_LOCAL_CERT_DIR ]]; then
|
||||
sudo mkdir -p $MAGNUM_LOCAL_CERT_DIR
|
||||
sudo chown $STACK_USER $MAGNUM_LOCAL_CERT_DIR
|
||||
fi
|
||||
if is_service_enabled barbican; then
|
||||
iniset $MAGNUM_CONF certificates cert_manager_type "barbican"
|
||||
else
|
||||
iniset $MAGNUM_CONF certificates storage_path "$MAGNUM_LOCAL_CERT_DIR"
|
||||
iniset $MAGNUM_CONF certificates cert_manager_type "local"
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue