Complete the change of adding public_endpoint option

Change-Id: I8190b102ab827a4cf4c23f0f350fae051c1d33f0
Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
This commit is contained in:
Zhi Yan Liu 2014-10-23 13:13:52 +08:00
parent fa3b691011
commit 8cf3d38246
4 changed files with 23 additions and 1 deletions

View File

@ -1331,3 +1331,15 @@ glance-registry service separately, by default they place at
to make profiling work as designed operator needs to make those values of HMAC
key be consistent for all services in your deployment. Without HMAC key the
profiling will not be triggered even profiling feature is enabled.
Configuring Glance public endpoint
----------------------------------
When Glance API service is ran dehind a proxy, operator probably need to
configure a proper public endpoint to versions URL instead of use host owned
which run service really. Glance allows configure a public endpoint URL to
represent the proxy's URL.
* ``public_endpoint=<None|URL>``
Optional. Default: ``None``

View File

@ -109,6 +109,13 @@ backlog = 4096
# and 'store_type'.
#location_strategy = location_order
# Public url to use for versions endpoint. The default is None,
# which will use the request's host_url attribute to populate the URL base.
# If Glance is operating behind a proxy, you will want to change this to
# represent the proxy's URL.
#public_endpoint=<None>
# ================= Syslog Options ============================
# Send logs to syslog (/dev/log) instead of to file specified

View File

@ -25,6 +25,7 @@ import itertools
import glance.api.middleware.context
import glance.api.policy
import glance.api.versions
import glance.common.config
import glance.common.location_strategy
import glance.common.location_strategy.store_type
@ -55,6 +56,7 @@ _api_opts = [
(None, list(itertools.chain(*(_global_opt_lists + [
glance.api.middleware.context.context_opts,
glance.api.policy.policy_opts,
glance.api.versions.versions_opts,
glance.common.config.common_opts,
glance.common.location_strategy.location_strategy_opts,
glance.common.property_utils.property_opts,

View File

@ -144,7 +144,8 @@ class OptsTestCase(utils.BaseTestCase):
'eventlet_executor_pool_size',
'store_type_preference',
'flavor',
'config_file'
'config_file',
'public_endpoint'
]
self._check_opt_groups(opt_list, expected_opt_groups)