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.authModule - The
gnocchiclient.benchmarkModule - The
gnocchiclient.clientModule - The
gnocchiclient.exceptionsModuleArchivePolicyAlreadyExistsArchivePolicyNotFoundArchivePolicyRuleAlreadyExistsArchivePolicyRuleNotFoundBadRequestClientExceptionConflictConnectionFailureConnectionTimeoutForbiddenMethodNotAllowedMetricNotFoundNamedMetricAlreadyExistsNotAcceptableNotFoundNotImplementedOverLimitRateLimitResourceAlreadyExistsResourceNotFoundResourceTypeAlreadyExistsResourceTypeNotFoundRetryAfterExceptionSSLErrorUnauthorizedUnknownConnectionErrorfrom_response()
- The
gnocchiclient.gendocModule - The
gnocchiclient.oscModule - The
gnocchiclient.shellModule - The
gnocchiclient.utilsModuleadd_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.aggregatesModule - The
gnocchiclient.v1.aggregates_cliModule - The
gnocchiclient.v1.archive_policyModule - The
gnocchiclient.v1.archive_policy_cliModule - The
gnocchiclient.v1.archive_policy_ruleModule - The
gnocchiclient.v1.archive_policy_rule_cliModule - The
gnocchiclient.v1.baseModule - The
gnocchiclient.v1.buildModule - The
gnocchiclient.v1.build_cliModule - The
gnocchiclient.v1.capabilitiesModule - The
gnocchiclient.v1.capabilities_cliModule - The
gnocchiclient.v1.clientModule - The
gnocchiclient.v1.metricModule - The
gnocchiclient.v1.metric_cliModule - The
gnocchiclient.v1.resourceModule - The
gnocchiclient.v1.resource_cliModule - The
gnocchiclient.v1.resource_typeModule - The
gnocchiclient.v1.resource_type_cliModule - The
gnocchiclient.v1.statusModule - The
gnocchiclient.v1.status_cliModule - The
gnocchiclient.versionModule