Debian Codegraph @

tests/pkgos_func/functional_nova_keystone_authtoken/convert_script

raw
1 # Start conversion
2 pkgos_add_directive nova-test.ini keystone_authtoken "password =" "# Password for auth."
3 pkgos_deprecate_directive nova-test.ini keystone_authtoken admin_password keystone_authtoken password
4 pkgos_add_directive nova-test.ini keystone_authtoken "project_name =" "# Project name for auth."
5 pkgos_deprecate_directive nova-test.ini keystone_authtoken admin_tenant_name keystone_authtoken project_name
6 pkgos_add_directive nova-test.ini keystone_authtoken "username =" "# Project name for auth."
7 pkgos_deprecate_directive nova-test.ini keystone_authtoken admin_user keystone_authtoken username
8 pkgos_add_directive nova-test.ini keystone_authtoken "www_authenticate_uri =" "# Complete 'public' Identity API endpoint."
9 pkgos_deprecate_directive nova-test.ini keystone_authtoken auth_uri keystone_authtoken www_authenticate_uri
10 pkgos_add_directive nova-test.ini keystone_authtoken "auth_url =" "# Complete 'admin' Identity API endpoint."
11 pkgos_inifile get nova-test.ini keystone_authtoken auth_protocol
12 if [ "${RET}" = "http" ] ; then
13 PROTO=http
14 else
15 PROTO=https
16 fi
17 pkgos_inifile get nova-test.ini keystone_authtoken auth_host
18 ADDR=${RET}
19 if [ "${RET}" != "NOT_FOUND" ] && [ -n "${RET}" ] ; then
20 pkgos_inifile get nova-test.ini keystone_authtoken www_authenticate_uri
21 if [ -z "${RET}" ] ; then
22 pkgos_inifile set nova-test.ini keystone_authtoken www_authenticate_uri ${PROTO}://${ADDR}:5000
23 fi
24 pkgos_inifile get nova-test.ini keystone_authtoken auth_url
25 if [ -z "${RET}" ] ; then
26 pkgos_inifile set nova-test.ini keystone_authtoken auth_url ${PROTO}://${ADDR}:5000
27 fi
28 fi
29
30 pkgos_search_directive_line_num nova-test.ini keystone_authtoken auth_host
31 if [ "${RET}" != "NOT_FOUND" ] && [ -n "${RET}" ] ; then
32 sed -i ${RET}'s/^auth_host/#auth_host/' nova-test.ini
33 fi
34 pkgos_search_directive_line_num nova-test.ini keystone_authtoken auth_protocol
35 if [ "${RET}" != "NOT_FOUND" ] && [ -n "${RET}" ] ; then
36 sed -i ${RET}'s/^auth_protocol/#auth_protocol/' nova-test.ini
37 fi
38 # End conversion