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
ModuleArchivePolicyAlreadyExists
ArchivePolicyNotFound
ArchivePolicyRuleAlreadyExists
ArchivePolicyRuleNotFound
BadRequest
ClientException
Conflict
ConnectionFailure
ConnectionTimeout
Forbidden
MethodNotAllowed
MetricNotFound
NamedMetricAlreadyExists
NotAcceptable
NotFound
NotImplemented
OverLimit
RateLimit
ResourceAlreadyExists
ResourceNotFound
ResourceTypeAlreadyExists
ResourceTypeNotFound
RetryAfterException
SSLError
Unauthorized
UnknownConnectionError
from_response()
- The
gnocchiclient.gendoc
Module - The
gnocchiclient.osc
Module - The
gnocchiclient.shell
Module - The
gnocchiclient.utils
Moduleadd_query_argument()
build_pagination_options()
dict_from_parsed_args()
dict_to_querystring()
dt_to_localtz()
format_archive_policy()
format_dict_dict()
format_dict_list()
format_move_dict_to_root()
format_resource_for_metric()
format_resource_type()
format_string_list()
get_client()
get_pagination_options()
list2cols()
parse_date()
str_to_bool()
- 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