diff options
author | Liam R. Howlett <Liam.Howlett@WindRiver.com> | 2014-08-28 15:04:00 -0400 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2014-09-16 23:56:37 -0400 |
commit | 5a8c9bc5a9079aab541881feaf3c16477243e172 (patch) | |
tree | 929d19a36d7630584439c3649d355eed58604510 | |
parent | a7e4f8f04c1b1cf83de4a4a45f75aefc15f8a6bf (diff) | |
download | meta-cloud-services-5a8c9bc5a9079aab541881feaf3c16477243e172.tar.gz |
python-keystone: Fix recipe whitespace.
Conform as much as possible to the bitbake coding standard. (80 or less
chars/line, 4x space indent).
Signed-off-by: Liam R. Howlett <Liam.Howlett@WindRiver.com>
-rw-r--r-- | meta-openstack/recipes-devtools/python/python-keystone_git.bb | 72 |
1 files changed, 45 insertions, 27 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-keystone_git.bb b/meta-openstack/recipes-devtools/python/python-keystone_git.bb index 88a6d5d..a3511db 100644 --- a/meta-openstack/recipes-devtools/python/python-keystone_git.bb +++ b/meta-openstack/recipes-devtools/python/python-keystone_git.bb | |||
@@ -31,9 +31,10 @@ LDAP_DN ?= "dc=my-domain,dc=com" | |||
31 | SERVICECREATE_PACKAGES = "${SRCNAME}-setup" | 31 | SERVICECREATE_PACKAGES = "${SRCNAME}-setup" |
32 | KEYSTONE_HOST="${CONTROLLER_IP}" | 32 | KEYSTONE_HOST="${CONTROLLER_IP}" |
33 | 33 | ||
34 | # USERCREATE_PARAM and SERVICECREATE_PARAM contain the list of parameters to be set. | 34 | # USERCREATE_PARAM and SERVICECREATE_PARAM contain the list of parameters to be |
35 | # If the flag for a parameter in the list is not set here, the default value will be given to that parameter. | 35 | # set. If the flag for a parameter in the list is not set here, the default |
36 | # Parameters not in the list will be set to empty. | 36 | # value will be given to that parameter. Parameters not in the list will be set |
37 | # to empty. | ||
37 | 38 | ||
38 | USERCREATE_PARAM_${SRCNAME}-setup = "name pass tenant role email" | 39 | USERCREATE_PARAM_${SRCNAME}-setup = "name pass tenant role email" |
39 | python () { | 40 | python () { |
@@ -45,6 +46,7 @@ python () { | |||
45 | } | 46 | } |
46 | d.setVarFlags("USERCREATE_PARAM_%s-setup" % d.getVar('SRCNAME',True), flags) | 47 | d.setVarFlags("USERCREATE_PARAM_%s-setup" % d.getVar('SRCNAME',True), flags) |
47 | } | 48 | } |
49 | |||
48 | SERVICECREATE_PARAM_${SRCNAME}-setup = "name type description region publicurl adminurl internalurl" | 50 | SERVICECREATE_PARAM_${SRCNAME}-setup = "name type description region publicurl adminurl internalurl" |
49 | python () { | 51 | python () { |
50 | flags = {'type':'identity',\ | 52 | flags = {'type':'identity',\ |
@@ -66,23 +68,32 @@ do_install_append() { | |||
66 | 68 | ||
67 | install -m 600 ${WORKDIR}/keystone.conf ${KEYSTONE_CONF_DIR}/ | 69 | install -m 600 ${WORKDIR}/keystone.conf ${KEYSTONE_CONF_DIR}/ |
68 | install -m 755 ${WORKDIR}/identity.sh ${KEYSTONE_CONF_DIR}/ | 70 | install -m 755 ${WORKDIR}/identity.sh ${KEYSTONE_CONF_DIR}/ |
69 | install -m 600 ${S}/etc/logging.conf.sample ${KEYSTONE_CONF_DIR}/logging.conf | 71 | install -m 600 ${S}/etc/logging.conf.sample \ |
72 | ${KEYSTONE_CONF_DIR}/logging.conf | ||
70 | install -m 600 ${S}/etc/policy.json ${KEYSTONE_CONF_DIR}/policy.json | 73 | install -m 600 ${S}/etc/policy.json ${KEYSTONE_CONF_DIR}/policy.json |
71 | install -m 600 ${S}/etc/keystone.conf.sample ${KEYSTONE_CONF_DIR}/keystone.conf.sample | 74 | install -m 600 ${S}/etc/keystone.conf.sample \ |
72 | install -m 600 ${S}/etc/keystone-paste.ini ${KEYSTONE_CONF_DIR}/keystone-paste.ini | 75 | ${KEYSTONE_CONF_DIR}/keystone.conf.sample |
76 | install -m 600 ${S}/etc/keystone-paste.ini \ | ||
77 | ${KEYSTONE_CONF_DIR}/keystone-paste.ini | ||
73 | 78 | ||
74 | cp -r ${S}/examples ${KEYSTONE_PACKAGE_DIR} | 79 | cp -r ${S}/examples ${KEYSTONE_PACKAGE_DIR} |
75 | 80 | ||
76 | sed -e "s:%SERVICE_TOKEN%:${SERVICE_TOKEN}:g" -i ${KEYSTONE_CONF_DIR}/keystone.conf | 81 | sed -e "s:%SERVICE_TOKEN%:${SERVICE_TOKEN}:g" \ |
82 | -i ${KEYSTONE_CONF_DIR}/keystone.conf | ||
77 | sed -e "s:%DB_USER%:${DB_USER}:g" -i ${KEYSTONE_CONF_DIR}/keystone.conf | 83 | sed -e "s:%DB_USER%:${DB_USER}:g" -i ${KEYSTONE_CONF_DIR}/keystone.conf |
78 | sed -e "s:%DB_PASSWORD%:${DB_PASSWORD}:g" -i ${KEYSTONE_CONF_DIR}/keystone.conf | 84 | sed -e "s:%DB_PASSWORD%:${DB_PASSWORD}:g" \ |
85 | -i ${KEYSTONE_CONF_DIR}/keystone.conf | ||
79 | 86 | ||
80 | sed -e "s:%CONTROLLER_IP%:${CONTROLLER_IP}:g" -i ${KEYSTONE_CONF_DIR}/keystone.conf | 87 | sed -e "s:%CONTROLLER_IP%:${CONTROLLER_IP}:g" \ |
81 | sed -e "s:%CONTROLLER_IP%:${CONTROLLER_IP}:g" -i ${KEYSTONE_CONF_DIR}/identity.sh | 88 | -i ${KEYSTONE_CONF_DIR}/keystone.conf |
89 | sed -e "s:%CONTROLLER_IP%:${CONTROLLER_IP}:g" \ | ||
90 | -i ${KEYSTONE_CONF_DIR}/identity.sh | ||
82 | 91 | ||
83 | sed -e "s:%TOKEN_FORMAT%:${TOKEN_FORMAT}:g" -i ${KEYSTONE_CONF_DIR}/keystone.conf | 92 | sed -e "s:%TOKEN_FORMAT%:${TOKEN_FORMAT}:g" \ |
93 | -i ${KEYSTONE_CONF_DIR}/keystone.conf | ||
84 | 94 | ||
85 | if ${@base_contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then | 95 | if ${@base_contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; |
96 | then | ||
86 | install -d ${D}${sysconfdir}/init.d | 97 | install -d ${D}${sysconfdir}/init.d |
87 | install -m 0755 ${WORKDIR}/keystone ${D}${sysconfdir}/init.d/keystone | 98 | install -m 0755 ${WORKDIR}/keystone ${D}${sysconfdir}/init.d/keystone |
88 | fi | 99 | fi |
@@ -90,16 +101,21 @@ do_install_append() { | |||
90 | install -d ${KEYSTONE_PACKAGE_DIR}/tests/tmp | 101 | install -d ${KEYSTONE_PACKAGE_DIR}/tests/tmp |
91 | 102 | ||
92 | if [ -e "${KEYSTONE_PACKAGE_DIR}/tests/test_overrides.conf" ];then | 103 | if [ -e "${KEYSTONE_PACKAGE_DIR}/tests/test_overrides.conf" ];then |
93 | sed -e "s:%KEYSTONE_PACKAGE_DIR%:${PYTHON_SITEPACKAGES_DIR}/keystone:g" -i ${KEYSTONE_PACKAGE_DIR}/tests/test_overrides.conf | 104 | sed -e "s:%KEYSTONE_PACKAGE_DIR%:${PYTHON_SITEPACKAGES_DIR}/keystone:g" \ |
105 | -i ${KEYSTONE_PACKAGE_DIR}/tests/test_overrides.conf | ||
94 | fi | 106 | fi |
95 | 107 | ||
96 | cp run_tests.sh ${KEYSTONE_CONF_DIR} | 108 | cp run_tests.sh ${KEYSTONE_CONF_DIR} |
97 | 109 | ||
98 | sed -e "s/%ADMIN_PASSWORD%/${ADMIN_PASSWORD}/g" -i ${D}${sysconfdir}/init.d/keystone | 110 | sed -e "s/%ADMIN_PASSWORD%/${ADMIN_PASSWORD}/g" \ |
99 | sed -e "s/%SERVICE_PASSWORD%/${SERVICE_PASSWORD}/g" -i ${D}${sysconfdir}/init.d/keystone | 111 | -i ${D}${sysconfdir}/init.d/keystone |
100 | sed -e "s/%SERVICE_TENANT_NAME%/${SERVICE_TENANT_NAME}/g" -i ${D}${sysconfdir}/init.d/keystone | 112 | sed -e "s/%SERVICE_PASSWORD%/${SERVICE_PASSWORD}/g" \ |
113 | -i ${D}${sysconfdir}/init.d/keystone | ||
114 | sed -e "s/%SERVICE_TENANT_NAME%/${SERVICE_TENANT_NAME}/g" \ | ||
115 | -i ${D}${sysconfdir}/init.d/keystone | ||
101 | 116 | ||
102 | if ${@base_contains('DISTRO_FEATURES', 'OpenLDAP', 'true', 'false', d)}; then | 117 | if ${@base_contains('DISTRO_FEATURES', 'OpenLDAP', 'true', 'false', d)}; |
118 | then | ||
103 | sed -i -e '/^\[identity\]/a \ | 119 | sed -i -e '/^\[identity\]/a \ |
104 | driver = keystone.identity.backends.hybrid_identity.Identity \ | 120 | driver = keystone.identity.backends.hybrid_identity.Identity \ |
105 | \ | 121 | \ |
@@ -138,7 +154,8 @@ role_name_attribute = ou \ | |||
138 | role_tree_dn = ou=Roles,${LDAP_DN} \ | 154 | role_tree_dn = ou=Roles,${LDAP_DN} \ |
139 | ' ${D}/etc/keystone/keystone.conf | 155 | ' ${D}/etc/keystone/keystone.conf |
140 | 156 | ||
141 | install -m 0755 ${WORKDIR}/convert_keystone_backend.py ${D}${sysconfdir}/keystone/convert_keystone_backend.py | 157 | install -m 0755 ${WORKDIR}/convert_keystone_backend.py \ |
158 | ${D}${sysconfdir}/keystone/convert_keystone_backend.py | ||
142 | fi | 159 | fi |
143 | } | 160 | } |
144 | 161 | ||
@@ -158,14 +175,15 @@ pkg_postinst_${SRCNAME}-setup () { | |||
158 | # This is to make sure keystone is configured and running | 175 | # This is to make sure keystone is configured and running |
159 | PIDFILE="/var/run/keystone-all.pid" | 176 | PIDFILE="/var/run/keystone-all.pid" |
160 | if [ -z `cat $PIDFILE 2>/dev/null` ]; then | 177 | if [ -z `cat $PIDFILE 2>/dev/null` ]; then |
161 | sudo -u postgres createdb keystone | 178 | sudo -u postgres createdb keystone |
162 | keystone-manage db_sync | 179 | keystone-manage db_sync |
163 | keystone-manage pki_setup --keystone-user=root --keystone-group=root | 180 | keystone-manage pki_setup --keystone-user=root --keystone-group=root |
164 | 181 | ||
165 | if ${@base_contains('DISTRO_FEATURES', 'OpenLDAP', 'true', 'false', d)}; then | 182 | if ${@base_contains('DISTRO_FEATURES', 'OpenLDAP', 'true', 'false', d)}; |
166 | /etc/init.d/openldap start | 183 | then |
167 | fi | 184 | /etc/init.d/openldap start |
168 | /etc/init.d/keystone start | 185 | fi |
186 | /etc/init.d/keystone start | ||
169 | fi | 187 | fi |
170 | } | 188 | } |
171 | 189 | ||
@@ -190,7 +208,7 @@ FILES_${PN} = "${libdir}/*" | |||
190 | FILES_${SRCNAME}-tests = "${sysconfdir}/${SRCNAME}/run_tests.sh" | 208 | FILES_${SRCNAME}-tests = "${sysconfdir}/${SRCNAME}/run_tests.sh" |
191 | 209 | ||
192 | FILES_${SRCNAME} = "${bindir}/* \ | 210 | FILES_${SRCNAME} = "${bindir}/* \ |
193 | ${sysconfdir}/${SRCNAME}/* \ | 211 | ${sysconfdir}/${SRCNAME}/* \ |
194 | ${sysconfdir}/init.d/* \ | 212 | ${sysconfdir}/init.d/* \ |
195 | ${localstatedir}/* \ | 213 | ${localstatedir}/* \ |
196 | " | 214 | " |