File: magnum-common.config.in

package info (click to toggle)
magnum 11.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 7,600 kB
  • sloc: python: 38,851; sh: 10,144; makefile: 71
file content (43 lines) | stat: -rw-r--r-- 1,374 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/sh

set -e

. /usr/share/debconf/confmodule
CONF=/etc/magnum/magnum.conf

#PKGOS-INCLUDE#

handle_docker_volume_type () {
	db_input high magnum/create_volume_type || true
        db_go || true
        db_get magnum/create_volume_type
	if [ "${RET}" = "true" ] ; then
		pkgos_read_config -p high ${CONF} cinder default_docker_volume_type magnum/default_docker_volume_type
	fi
}

read_magnum_trust_config () {
        pkgos_read_config -p high ${CONF} trust trustee_domain_admin_name magnum/magnum_domain_admin_username
        pkgos_read_config -p high ${CONF} trust trustee_domain_admin_password magnum/magnum_domain_admin_password
        pkgos_read_config -p high ${CONF} trust trustee_domain_name magnum/magnum_domain_name
        pkgos_read_config -p high ${CONF} trust trustee_keystone_interface magnum/keystone_interface
}

pkgos_var_user_group magnum
pkgos_dbc_read_conf -pkg magnum-common ${CONF} database connection magnum $@
pkgos_rabbit_read_conf ${CONF} DEFAULT magnum
pkgos_read_admin_creds ${CONF} keystone_authtoken magnum

db_input high magnum/configure_with_debconf || true
db_go || true
db_get magnum/configure_with_debconf
if [ "${RET}" = "true" ] ; then
	read_magnum_trust_config

	# Cinder os_region_name config
	pkgos_read_config -p high ${CONF} cinder_client region_name magnum/cinder_os_region_name
	handle_docker_volume_type
fi
db_go

exit 0