diff options
author | Mihai Prica <prica.mihai@gmail.com> | 2013-07-15 13:50:33 +0300 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2013-08-28 18:41:58 -0400 |
commit | f5e9ca889942455d8bfcbc49824dd475d547cd38 (patch) | |
tree | 4154c024c39fe5875e1d5d8ad0a8e66bf5dd30b4 /meta-openstack/recipes-devtools/python | |
parent | 9483378e842c07245ea1a478461621a3930b6c58 (diff) | |
download | meta-cloud-services-f5e9ca889942455d8bfcbc49824dd475d547cd38.tar.gz |
python-cinder: Use the identity to get credentials
The credentials are defined in the identity bbclass and
the recipe will set them in the configuration files.
Signed-off-by: Mihai Prica <prica.mihai@gmail.com>
Diffstat (limited to 'meta-openstack/recipes-devtools/python')
-rw-r--r-- | meta-openstack/recipes-devtools/python/python-cinder/api-paste.ini | 62 | ||||
-rw-r--r-- | meta-openstack/recipes-devtools/python/python-cinder_2013.1.1.bb | 15 |
2 files changed, 10 insertions, 67 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-cinder/api-paste.ini b/meta-openstack/recipes-devtools/python/python-cinder/api-paste.ini deleted file mode 100644 index 69cf346..0000000 --- a/meta-openstack/recipes-devtools/python/python-cinder/api-paste.ini +++ /dev/null | |||
@@ -1,62 +0,0 @@ | |||
1 | ############# | ||
2 | # OpenStack # | ||
3 | ############# | ||
4 | |||
5 | [composite:osapi_volume] | ||
6 | use = call:cinder.api:root_app_factory | ||
7 | /: apiversions | ||
8 | /v1: openstack_volume_api_v1 | ||
9 | /v2: openstack_volume_api_v2 | ||
10 | |||
11 | [composite:openstack_volume_api_v1] | ||
12 | use = call:cinder.api.middleware.auth:pipeline_factory | ||
13 | noauth = faultwrap sizelimit noauth apiv1 | ||
14 | keystone = faultwrap sizelimit authtoken keystonecontext apiv1 | ||
15 | keystone_nolimit = faultwrap sizelimit authtoken keystonecontext apiv1 | ||
16 | |||
17 | [composite:openstack_volume_api_v2] | ||
18 | use = call:cinder.api.middleware.auth:pipeline_factory | ||
19 | noauth = faultwrap sizelimit noauth apiv2 | ||
20 | keystone = faultwrap sizelimit authtoken keystonecontext apiv2 | ||
21 | keystone_nolimit = faultwrap sizelimit authtoken keystonecontext apiv2 | ||
22 | |||
23 | [filter:faultwrap] | ||
24 | paste.filter_factory = cinder.api.middleware.fault:FaultWrapper.factory | ||
25 | |||
26 | [filter:noauth] | ||
27 | paste.filter_factory = cinder.api.middleware.auth:NoAuthMiddleware.factory | ||
28 | |||
29 | [filter:sizelimit] | ||
30 | paste.filter_factory = cinder.api.middleware.sizelimit:RequestBodySizeLimiter.factory | ||
31 | |||
32 | [app:apiv1] | ||
33 | paste.app_factory = cinder.api.v1.router:APIRouter.factory | ||
34 | |||
35 | [app:apiv2] | ||
36 | paste.app_factory = cinder.api.v2.router:APIRouter.factory | ||
37 | |||
38 | [pipeline:apiversions] | ||
39 | pipeline = faultwrap osvolumeversionapp | ||
40 | |||
41 | [app:osvolumeversionapp] | ||
42 | paste.app_factory = cinder.api.versions:Versions.factory | ||
43 | |||
44 | ########## | ||
45 | # Shared # | ||
46 | ########## | ||
47 | |||
48 | [filter:keystonecontext] | ||
49 | paste.filter_factory = cinder.api.middleware.auth:CinderKeystoneContext.factory | ||
50 | |||
51 | [filter:authtoken] | ||
52 | paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory | ||
53 | service_protocol = http | ||
54 | service_host = 127.0.0.1 | ||
55 | service_port = 5000 | ||
56 | auth_host = 127.0.0.1 | ||
57 | auth_port = 35357 | ||
58 | auth_protocol = http | ||
59 | admin_tenant_name = service | ||
60 | admin_user = cinder | ||
61 | admin_password = password | ||
62 | signing_dir = /var/lib/cinder | ||
diff --git a/meta-openstack/recipes-devtools/python/python-cinder_2013.1.1.bb b/meta-openstack/recipes-devtools/python/python-cinder_2013.1.1.bb index 90d712c..e3d2b7e 100644 --- a/meta-openstack/recipes-devtools/python/python-cinder_2013.1.1.bb +++ b/meta-openstack/recipes-devtools/python/python-cinder_2013.1.1.bb | |||
@@ -9,7 +9,6 @@ SRCNAME = "cinder" | |||
9 | 9 | ||
10 | SRC_URI = "https://launchpad.net/${SRCNAME}/grizzly/${PV}/+download/${SRCNAME}-${PV}.tar.gz \ | 10 | SRC_URI = "https://launchpad.net/${SRCNAME}/grizzly/${PV}/+download/${SRCNAME}-${PV}.tar.gz \ |
11 | file://cinder.conf \ | 11 | file://cinder.conf \ |
12 | file://api-paste.ini \ | ||
13 | file://cinder.init \ | 12 | file://cinder.init \ |
14 | " | 13 | " |
15 | 14 | ||
@@ -18,17 +17,23 @@ SRC_URI[sha256sum] = "c4d7f508f404b555242abc638901a39b02d4345c2d101a0aaad52fec11 | |||
18 | 17 | ||
19 | S = "${WORKDIR}/${SRCNAME}-${PV}" | 18 | S = "${WORKDIR}/${SRCNAME}-${PV}" |
20 | 19 | ||
21 | inherit setuptools update-rc.d | 20 | inherit setuptools update-rc.d identity |
22 | 21 | ||
23 | do_install_append() { | 22 | do_install_append() { |
24 | CINDER_CONF_DIR=${D}${sysconfdir}/cinder | 23 | TEMPLATE_CONF_DIR=${S}${sysconfdir}/${SRCNAME} |
24 | CINDER_CONF_DIR=${D}${sysconfdir}/${SRCNAME} | ||
25 | 25 | ||
26 | install -d ${CINDER_CONF_DIR} | 26 | sed -e "s:%SERVICE_TENANT_NAME%:${SERVICE_TENANT_NAME}:g" \ |
27 | ${TEMPLATE_CONF_DIR}/api-paste.ini > ${WORKDIR}/api-paste.ini | ||
28 | sed -e "s:%SERVICE_USER%:${SRCNAME}:g" -i ${WORKDIR}/api-paste.ini | ||
29 | sed -e "s:%SERVICE_PASSWORD%:${SERVICE_PASSWORD}:g" \ | ||
30 | -i ${WORKDIR}/api-paste.ini | ||
27 | 31 | ||
32 | install -d ${CINDER_CONF_DIR} | ||
28 | install -m 600 ${WORKDIR}/cinder.conf ${CINDER_CONF_DIR}/ | 33 | install -m 600 ${WORKDIR}/cinder.conf ${CINDER_CONF_DIR}/ |
29 | install -m 600 ${WORKDIR}/api-paste.ini ${CINDER_CONF_DIR}/ | 34 | install -m 600 ${WORKDIR}/api-paste.ini ${CINDER_CONF_DIR}/ |
30 | install -m 600 ${S}/etc/cinder/policy.json ${CINDER_CONF_DIR}/ | 35 | install -m 600 ${S}/etc/cinder/policy.json ${CINDER_CONF_DIR}/ |
31 | 36 | ||
32 | if ${@base_contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then | 37 | if ${@base_contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then |
33 | install -d ${D}${sysconfdir}/init.d | 38 | install -d ${D}${sysconfdir}/init.d |
34 | sed 's:@suffix@:api:' < ${WORKDIR}/cinder.init >${WORKDIR}/cinder-api.init.sh | 39 | sed 's:@suffix@:api:' < ${WORKDIR}/cinder.init >${WORKDIR}/cinder-api.init.sh |