Skip to content

Commit

Permalink
Updating example glance paste config.
Browse files Browse the repository at this point in the history
The glance config has gone through a number of changes since
the sample paste files were added to keystone:

- Add generic PasteDeploy app and filter factories

[openstack/glance@ba44d1c3]

- Split out paste deployment config from the core glance
  *.conf files into corresponding *-paste.ini files

[openstack/glance@14593a3b]
[openstack/glance@5835b30c]

Updating samples to conform to latest version supported by glance.

Change-Id: I52bcdfd1760f6f844e0a44dabe3294886bb7aafd
  • Loading branch information
Eoghan Glynn committed Jan 25, 2012
1 parent b1581a1 commit 9e9e7f0
Show file tree
Hide file tree
Showing 5 changed files with 105 additions and 58 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Dan Prince <dan.prince@rackspace.com>
Dolph Mathews <dolph.mathews@gmail.com>
Ed Leafe <ed@leafe.com>
Edouard Thuleau <edouard1.thuleau@orange.com>
Eoghan Glynn <eglynn@redhat.com>
gholt <gholt@brim.net>
jabdul <abdulkader.j@hcl.com>
James E. Blair <jeblair@hp.com>
Expand Down
60 changes: 60 additions & 0 deletions examples/paste/glance-api-paste.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#[pipeline:glance-api]
#pipeline = versionnegotiation authtoken context apiv1app

# Default minimal pipeline
[pipeline:glance-api]
pipeline = versionnegotiation context apiv1app

# Use the following pipeline for keystone auth
# i.e. in glance-api.conf:
# [paste_deploy]
# flavor = keystone
#
[pipeline:glance-api-keystone]
pipeline = versionnegotiation authtoken auth-context apiv1app

#[pipeline:versions]
#pipeline = versionsapp

#[app:versionsapp]
#paste.app_factory = glance.api.versions:app_factory

#[app:apiv1app]
#paste.app_factory = glance.api.v1:app_factory

[app:apiv1app]
paste.app_factory = glance.common.wsgi:app_factory
glance.app_factory = glance.api.v1.router:API

#[filter:versionnegotiation]
#paste.filter_factory = glance.api.middleware.version_negotiation:filter_factory

[filter:versionnegotiation]
paste.filter_factory = glance.common.wsgi:filter_factory
glance.filter_factory = glance.api.middleware.version_negotiation:VersionNegotiationFilter

#[filter:imagecache]
#paste.filter_factory = glance.api.middleware.image_cache:filter_factory

#[filter:context]
#paste.filter_factory = glance.common.context:filter_factory

[filter:context]
paste.filter_factory = glance.common.wsgi:filter_factory
glance.filter_factory = glance.common.context:ContextMiddleware

[filter:authtoken]
paste.filter_factory = keystone.middleware.auth_token:filter_factory
service_protocol = http
service_host = 127.0.0.1
service_port = 5000
auth_host = 127.0.0.1
auth_port = 35357
auth_protocol = http
auth_uri = http://127.0.0.1:5000/
admin_token = 999888777666
auth_timeout = 30

[filter:auth-context]
paste.filter_factory = glance.common.wsgi:filter_factory
glance.filter_factory = keystone.middleware.glance_auth_token:KeystoneContextMiddleware
38 changes: 4 additions & 34 deletions examples/paste/glance-api.conf
Original file line number Diff line number Diff line change
Expand Up @@ -131,38 +131,8 @@ image_cache_stall_timeout = 86400
# Turn on/off delayed delete
delayed_delete = False

[pipeline:glance-api]
pipeline = versionnegotiation authtoken context apiv1app
# ============ Paste Deploy Options ===============================

# To enable Image Cache Management API replace pipeline with below:
# pipeline = versionnegotiation authtoken context imagecache apiv1app

[pipeline:versions]
pipeline = versionsapp

[app:versionsapp]
paste.app_factory = glance.api.versions:app_factory

[app:apiv1app]
paste.app_factory = glance.api.v1:app_factory

[filter:versionnegotiation]
paste.filter_factory = glance.api.middleware.version_negotiation:filter_factory

[filter:imagecache]
paste.filter_factory = glance.api.middleware.image_cache:filter_factory

[filter:context]
paste.filter_factory = glance.common.context:filter_factory

[filter:authtoken]
paste.filter_factory = keystone.middleware.auth_token:filter_factory
service_protocol = http
service_host = 127.0.0.1
service_port = 5000
auth_host = 127.0.0.1
auth_port = 35357
auth_protocol = http
auth_uri = http://127.0.0.1:5000/
admin_token = 999888777666
auth_timeout = 30
# Select the keystone deployment flavor
[paste_deploy]
flavor = keystone
37 changes: 37 additions & 0 deletions examples/paste/glance-registry-paste.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Default minimal pipeline
[pipeline:glance-registry]
pipeline = context registryapp

# Use the following pipeline for keystone auth
# i.e. in glance-registry.conf:
# [paste_deploy]
# flavor = keystone
#
[pipeline:glance-registry-keystone]
pipeline = authtoken auth-context registryapp

[app:registryapp]
paste.app_factory = glance.common.wsgi:app_factory
glance.app_factory = glance.registry.api.v1:API

[filter:context]
context_class = glance.registry.context.RequestContext
paste.filter_factory = glance.common.wsgi:filter_factory
glance.filter_factory = glance.common.context:ContextMiddleware

[filter:authtoken]
paste.filter_factory = keystone.middleware.auth_token:filter_factory
service_protocol = http
service_host = 127.0.0.1
service_port = 5000
auth_host = 127.0.0.1
auth_port = 35357
auth_protocol = http
auth_uri = http://127.0.0.1:5000/
admin_token = 999888777666
auth_timeout = 30

[filter:auth-context]
context_class = glance.registry.context.RequestContext
paste.filter_factory = glance.common.wsgi:filter_factory
glance.filter_factory = keystone.middleware.glance_auth_token:KeystoneContextMiddleware
27 changes: 3 additions & 24 deletions examples/paste/glance-registry.conf
Original file line number Diff line number Diff line change
Expand Up @@ -40,27 +40,6 @@ api_limit_max = 1000
# default to `limit_param_default`
limit_param_default = 25

[pipeline:glance-registry]
pipeline = authtoken keystone_shim context registryapp

[app:registryapp]
paste.app_factory = glance.registry.server:app_factory

[filter:context]
context_class = glance.registry.context.RequestContext
paste.filter_factory = glance.common.context:filter_factory

[filter:authtoken]
paste.filter_factory = keystone.middleware.auth_token:filter_factory
service_protocol = http
service_host = 127.0.0.1
service_port = 5000
auth_host = 127.0.0.1
auth_port = 35357
auth_protocol = http
auth_uri = http://127.0.0.1:5000/
admin_token = 999888777666
auth_timeout = 30

[filter:keystone_shim]
paste.filter_factory = keystone.middleware.glance_auth_token:filter_factory
# Select the keystone deployment flavor
[paste_deploy]
flavor = keystone

0 comments on commit 9e9e7f0

Please sign in to comment.