Ask Your Question

Revision history [back]

Authentication gnocchi api is not working

I am developing an app which uses Gnocchi to collect some measures on OpenStack Pike. I intend to use the gnocchi-api, but it is not clear how should I configure the environment to successfully authenticate. The code below is presented in the gnocchi-api docs and show how to authenticate using keystone.

from keystoneauth1 import loading
conf = cfg.ConfigOpts()
...
auth_plugin = loading.load_auth_from_conf_options(conf, "gnocchi_credentials")
gnocchi = client.Client(session_options={'auth': auth_plugin})

The problem come from the "conf" object: I have no info about what it is (a dictionary?), which data it carries and how to set proper auth info (username, password, project)... I appreciate any help on that!

A minha dúvida é como a variável conf

Authentication gnocchi api is not working

I am developing an app which uses Gnocchi to collect some measures on OpenStack Pike. I intend to use the gnocchi-api, but it is not clear how should I configure the environment to successfully authenticate. The code below is presented in the gnocchi-api docs and show how to authenticate using keystone.

from keystoneauth1 import loading
conf = cfg.ConfigOpts()
...
auth_plugin = loading.load_auth_from_conf_options(conf, "gnocchi_credentials")
gnocchi = client.Client(session_options={'auth': auth_plugin})

The problem come from the "conf" object: I have no info about what it is (a dictionary?), which data it carries and how to set proper auth info (username, password, project)... I appreciate any help on that!

A minha dúvida é como a variável conf