Merge "Restore ability to disable API versions"

This commit is contained in:
Jenkins 2017-07-14 15:26:02 +00:00 committed by Gerrit Code Review
commit 50314640c8
1 changed files with 4 additions and 0 deletions

View File

@ -29,4 +29,8 @@ def root_app_factory(loader, global_conf, **local_conf):
LOG.warning('The v1 API is deprecated and is not under active '
'development. You should set enable_v1_api=false '
'and enable_v3_api=true in your cinder.conf file.')
else:
del local_conf['/v1']
if not CONF.enable_v2_api:
del local_conf['/v2']
return paste.urlmap.urlmap_factory(loader, global_conf, **local_conf)