no need for keyauth workaround

Implements: blueprint get-topology-api
Change-Id: I3f2cae56c2d1f4e54cae4e6ea09652bc6a59837f
This commit is contained in:
Eyal 2015-12-07 16:58:23 +02:00
parent 49de750a87
commit 9488663c13

View File

@ -10,11 +10,8 @@
# License for the specific language governing permissions and limitations
# under the License.
import keystoneclient.auth
import logging
from keystonemiddleware import opts as ks_opts
from oslo_config import cfg
from oslo_log import log
from oslo_policy import opts as policy_opts
@ -28,8 +25,6 @@ def prepare_service(args=None, default_opts=None, conf=None):
if conf is None:
conf = cfg.ConfigOpts()
log.register_options(conf)
for group, options in ks_opts.list_auth_token_opts():
conf.register_opts(list(options), group=group)
policy_opts.set_defaults(conf)
for group, options in opts.list_opts():
@ -43,14 +38,4 @@ def prepare_service(args=None, default_opts=None, conf=None):
log.setup(conf, 'vitrage')
conf.log_opt_values(LOG, logging.DEBUG)
# NOTE(sileht): keystonemiddleware assume we use the global CONF object
# (LP#1428317). In gnocchi, this is not the case, so we have to register
# some keystoneclient options ourself. Missing options are hidden into
# private area of keystonemiddleware and keystoneclient, so we
# create a keystoneclient AuthPlugin object, that will register the options
# into our configuration object. This have to be done after the
# configuration files have been loaded because the authplugin options
# depends of the authplugin present in the configuration file.
keystoneclient.auth.register_conf_options(conf, 'keystone_authtoken')
keystoneclient.auth.load_from_conf_options(conf, 'keystone_authtoken')
return conf