The gnocchiclient
Python API¶
Usage¶
To use gnocchiclient in a project:
>>> from gnocchiclient import auth
>>> from gnocchiclient.v1 import client
>>>
>>> auth_plugin = auth.GnocchiBasicPlugin(user="admin",
>>> endpoint="http://localhost:8041")
>>> gnocchi = client.Client(session_options={'auth': auth_plugin})
>>> gnocchi.resource.list("generic")
With authentication from a keystoneauth1 plugins:
>>> from keystoneauth1 import loading
>>> from oslo_config import cfg
>>> from gnocchiclient import auth
>>> from gnocchiclient.v1 import client
>>>
>>> conf = cfg.ConfigOpts()
>>> ...
>>> auth_plugin = loading.load_auth_from_conf_options(conf, "gnocchi_credentials")
>>> gnocchi = client.Client(session_options={'auth': auth_plugin})
>>> gnocchi.resource.list("generic")
Reference¶
For more information, see the reference:
- The
gnocchiclient.auth
Module - The
gnocchiclient.benchmark
Module - The
gnocchiclient.client
Module - The
gnocchiclient.exceptions
Module - The
gnocchiclient.gendoc
Module - The
gnocchiclient.osc
Module - The
gnocchiclient.shell
Module - The
gnocchiclient.utils
Module - The
gnocchiclient.v1.aggregates
Module - The
gnocchiclient.v1.aggregates_cli
Module - The
gnocchiclient.v1.archive_policy
Module - The
gnocchiclient.v1.archive_policy_cli
Module - The
gnocchiclient.v1.archive_policy_rule
Module - The
gnocchiclient.v1.archive_policy_rule_cli
Module - The
gnocchiclient.v1.base
Module - The
gnocchiclient.v1.build
Module - The
gnocchiclient.v1.build_cli
Module - The
gnocchiclient.v1.capabilities
Module - The
gnocchiclient.v1.capabilities_cli
Module - The
gnocchiclient.v1.client
Module - The
gnocchiclient.v1.metric
Module - The
gnocchiclient.v1.metric_cli
Module - The
gnocchiclient.v1.resource
Module - The
gnocchiclient.v1.resource_cli
Module - The
gnocchiclient.v1.resource_type
Module - The
gnocchiclient.v1.resource_type_cli
Module - The
gnocchiclient.v1.status
Module - The
gnocchiclient.v1.status_cli
Module - The
gnocchiclient.version
Module