Browse Source

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
changes/26/227626/2
Shinn'ya Hoshino 6 years ago
parent
commit
9704b93039
1 changed files with 8 additions and 9 deletions
  1. +8
    -9
      devstack/lib/magnum

+ 8
- 9
devstack/lib/magnum View File

@ -180,17 +180,16 @@ function create_magnum_conf {
iniset $MAGNUM_CONF DEFAULT notification_driver "messaging"
fi
# Temporary work until barbican is available
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"
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"
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
iniset $MAGNUM_CONF certificates storage_path "$MAGNUM_LOCAL_CERT_DIR"
iniset $MAGNUM_CONF certificates cert_manager_type "local"
fi
}


Loading…
Cancel
Save