PYTHON-TROVECLIENT(1)

πŸ“¦
version 8.11.0 Β· 2 versions
, in nixpkgs unstable

πŸ’– NAME πŸ’–

python-troveclient β€” python-troveclient 8.11.0

Okay bestie, this is the client for the OpenStack Trove API. There’s a Python API β€” the troveclient module β€” and an openstack command-line plugin. Two paths, both valid, periodt.

πŸ“š CONTENTS πŸ“š

🌈 Trove Client User Guide 🌈

πŸ–₯️ Command-line Interface πŸ–₯️

Installing this package lets you use the openstack command to interact with Trove. Refer to <https://docs.openstack.org/python-openstackclient/latest> for how to install the openstack command and configuration.

You can find all supported Trove commands in the openstack.database.v1 entry_points section in the setup.cfg file of the repo. Iykyk.

🐍 Python API 🐍

There’s also a complete Python API. Quick-start using keystone:

>>> from troveclient import client
>>> trove_client = client.Client('1.0', session=keystone_session, endpoint_type='public', service_type='database', region_name='RegionOne')
>>> trove_client.datastores.list()
[...]
>>> trove_client.instances.list()
[...]

πŸ§‘β€πŸ’» Using the Client Programmatically πŸ§‘β€πŸ’»

πŸ” Authentication πŸ”

Authenticating is necessary to use every feature of the client. No auth, no slay.

To create the client, create an instance of the Client class. The auth url, username, password, and project name must be specified in the call to the constructor.

from troveclient.v1 import client
tc = client.Client(username="testuser",
        password="PASSWORD",
        project_id="test_project",
        region_name="EAST",
        auth_url="http://api-server:5000/v2.0")

The default authentication strategy assumes a keystone compliant auth system.

Once you have an authenticated client object you can make calls with it, for example:

flavors = tc.flavors.list()
datastores = tc.datastores.list()

πŸš€ Instances πŸš€

The following example creates a 512 MB instance with a 1 GB volume:

from troveclient.v1 import client
tc = client.Client(username="testuser",
        password="PASSWORD",
        project_id="test_project",
        region_name="EAST",
        auth_url="http://api-server:5000/v2.0")

flavor_id = '1'
volume = {'size':1}
databases = [{"name": "my_db",
              "character_set": "latin2",           # These two fields
              "collate": "latin2_general_ci"}]     # are optional.
datastore = 'mysql'
datastore_version = '5.6-104'
users = [{"name": "jsmith", "password": "12345",
          "databases": [{"name": "my_db"}]
         }]
instance = client.instances.create("My Instance", flavor_id, volume,
                                   databases, users, datastore=datastore,
                                   datastore_version=datastore_version)

To retrieve the instance, use the "get" method of "instances":

updated_instance = client.instances.get(instance.id)
print(updated_instance.name)
print("   Status=%s Flavor=%s" %
          (updated_instance.status, updated_instance.flavor['id']))

My Instance
   Status=BUILD Flavor=1

You can delete an instance by calling "delete" on the instance object itself, or by using the delete method on "instances."

# Wait for the instance to be ready before we delete it.
import time
from troveclient.exceptions import NotFound

while instance.status == "BUILD":
    instance.get()
    time.sleep(1)
print("Ready in an %s state." % instance.status)
instance.delete()
# Delete and wait for the instance to go away.
while True:
    try:
        instance = client.instances.get(instance.id)
        assert instance.status == "SHUTDOWN"
    except NotFound:
        break

Ready in an ACTIVE state.

πŸ“„ Listing Items and Pagination πŸ“„

Lists paginate after twenty items, meaning you’ll only get twenty items back even if there are more. To see the next set of items, send a marker. The marker is a key value (in the case of instances, the ID) which is the non-inclusive starting point for all returned items.

The lists returned by the client always include a "next" property. This can be used as the "marker" argument to get the next section of the list back from the server. If no more items are available, then the next property is None.

Pagination applies to all listed objects, like instances, datastores, etc. The example below is for instances.

# There are currently 30 instances.

instances = client.instances.list()
print(len(instances))
print(instances.next is None)

instances2 = client.instances.list(marker=instances.next)
print(len(instances2))
print(instances2.next is None)

20
False
10
True

πŸ“– troveclient Reference Guide πŸ“–

πŸ“¦ troveclient πŸ“¦

πŸ“¦ troveclient package πŸ“¦

🧩 Subpackages 🧩

troveclient.apiclient package

🧩 Submodules 🧩

πŸ”‘ troveclient.apiclient.auth module πŸ”‘

class troveclient.apiclient.auth.BaseAuthPlugin(auth_system=None, **kwargs) Bases: object

Base class for authentication plugins. An authentication plugin needs to override at least the authenticate method to be a valid plugin.

  • classmethod add_common_opts(parser) β€” Add options that are common for several plugins.
  • classmethod add_opts(parser) β€” Populate the parser with the options for this plugin.
  • auth_system = None
  • authenticate(http_client) β€” Authenticate using the plugin-defined method. The method usually analyses self.opts and performs a request to the authentication server.
    • Parameters: http_client (troveclient.client.HTTPClient) β€” client object that needs authentication.
    • Raises: AuthorizationFailure
  • common_opt_names = ['auth_system', 'username', 'password', 'tenant_name', 'token', 'auth_url']
  • static get_opt(opt_name, args) β€” Return option name and value.
    • Parameters:
      • opt_name β€” name of the option, e.g., "username"
      • args β€” parsed arguments
  • opt_names = []
  • parse_opts(args) β€” Parse the actual auth-system options if any. This method is expected to populate the attribute self.opts with a dict containing the options and values needed to make authentication.
  • sufficient_options() β€” Check if all required options are present.
    • Raises: AuthPluginOptionsMissing
  • abstractmethod token_and_endpoint(endpoint_type, service_type) β€” Return token and endpoint.
    • Parameters:
      • service_type (string) β€” Service type of the endpoint
      • endpoint_type (string) β€” Type of endpoint. Possible values: public or publicURL, internal or internalURL, admin or adminURL
    • Returns: tuple of token and endpoint strings
    • Raises: EndpointException

troveclient.apiclient.auth.discover_auth_systems() β€” Discover the available auth-systems. This won’t take into account the old style auth-systems.

troveclient.apiclient.auth.load_auth_system_opts(parser) β€” Load options needed by the available auth-systems into a parser. This function will try to populate the parser with options from the available plugins.

troveclient.apiclient.auth.load_plugin(auth_system)

troveclient.apiclient.auth.load_plugin_from_args(args) β€” Load required plugin and populate it with options. Try to guess auth system if it is not specified. Systems are tried in alphabetical order.

  • Raises: AuthPluginOptionsMissing

🧱 troveclient.apiclient.base module 🧱

Base utilities to build API operation managers and objects on top of. Very foundation-coded.

class troveclient.apiclient.base.BaseManager(client) Bases: HookableMixin

Basic manager type providing common operations. Managers interact with a particular type of API (servers, flavors, images, etc.) and provide CRUD operations for them.

  • resource_class = None

class troveclient.apiclient.base.CrudManager(client) Bases: BaseManager

Base manager class for manipulating entities. Children of this class are expected to define a collection_key and key.

  • collection_key: Usually a plural noun by convention (e.g. entities); used to refer to collections in both URL’s (e.g. /v3/entities) and JSON objects containing a list of member resources (e.g. {'entities': [{}, {}, {}]}).
  • key: Usually a singular noun by convention (e.g. entity); used to refer to an individual member of the collection.
  • build_url(base_url=None, **kwargs) β€” Builds a resource URL for the given kwargs.

Given an example collection where collection_key = 'entities' and key = 'entity', the following URL’s could be generated.

By default, the URL will represent a collection of entities, e.g.:

/entities

If kwargs contains an entity_id, then the URL will represent a specific member, e.g.:

/entities/{entity_id}
  • Parameters: base_url β€” if provided, the generated URL will be appended to it.
  • collection_key = None
  • create(**kwargs)
  • delete(**kwargs)
  • find(base_url=None, **kwargs) β€” Find a single item with attributes matching **kwargs.
    • Parameters: base_url β€” if provided, the generated URL will be appended to it.
  • get(**kwargs)
  • head(**kwargs)
  • key = None
  • list(base_url=None, **kwargs) β€” List the collection.
    • Parameters: base_url β€” if provided, the generated URL will be appended to it.
  • put(base_url=None, **kwargs) β€” Update an element.
    • Parameters: base_url β€” if provided, the generated URL will be appended to it.
  • update(**kwargs)

class troveclient.apiclient.base.Extension(name, module) Bases: HookableMixin

Extension descriptor.

  • SUPPORTED_HOOKS = ('__pre_parse_args__', '__post_parse_args__')
manager_class = None

🌸 troveclient.apiclient.base.HookableMixin

Bases: object

okay so this is the mixin that lets classes register hooks and then run them β€” it's giving "backstage pass" energy, fr fr. πŸŽ€

classmethod add_hook(hook_type, hook_func) Add a new hook of the specified type. Literally just registering it, bestie.

Parameters:

  • cls β€” the class that registers hooks
  • hook_type β€” hook type, e.g., '__pre_parse_args__'
  • hook_func β€” hook function

classmethod run_hooks(hook_type, *args, **kwargs) Run all hooks of the specified type. all of them. no skipping. ✨

Parameters:

  • cls β€” the class that registers hooks
  • hook_type β€” hook type, e.g., '__pre_parse_args__'
  • args β€” args to be passed to every hook function
  • kwargs β€” kwargs to be passed to every hook function

πŸ” troveclient.apiclient.base.ManagerWithFind(client)

Bases: BaseManager

A manager with the extra find()/findall() methods β€” like a regular manager but with search superpowers. πŸ‘‘

find(**kwargs) Find a single item whose attributes match **kwargs.

real talk: this isn't very efficient β€” it loads the entire list and then filters on the Python side. so like, it works, but it's giving brute force. πŸ’€

findall(**kwargs) Find all items whose attributes match **kwargs.

same warning, bestie: not very efficient either β€” loads the entire list, then filters on the Python side.

abstractmethod list()


πŸŽ€ troveclient.apiclient.base.Resource(manager, info, loaded=False)

Bases: object

The base class for OpenStack resources (tenant, user, etc.). Honestly it's pretty much just a bag for attributes β€” a cute little container, no cap. πŸ’…

  • HUMAN_ID = False
  • NAME_ATTR = 'name'

property human_id A human-readable ID that you can use for bash completion. 🐚

property is_loaded

to_dict()


🫢 troveclient.apiclient.base.getid(obj)

Return the id if the argument is a Resource.

It abstracts that super common pattern of letting you pass either an object or an object's ID (UUID) whenever you're dealing with relationships. iconic convenience behavior honestly. ✨


🌈 troveclient.apiclient.client module

OpenStack Client interface. Handles the REST calls and responses. this is the main character of the networking world fr fr. πŸ”₯

πŸ’œ class troveclient.apiclient.client.BaseClient(http_client, extensions=None)

Bases: object

The top-level object to access the OpenStack API. πŸ†

This client uses HTTPClient to send requests β€” and HTTPClient handles a whole bunch of issues such as authentication, so you don't have to.

  • cached_endpoint = None
  • client_request(method, url, **kwargs)
  • delete(url, **kwargs)
  • endpoint_type = None
  • get(url, **kwargs)

static get_class(api_name, version, version_map) Returns the client class for the requested API version. 🎯

Parameters:

  • api_name β€” the name of the API, e.g. 'compute', 'image', etc
  • version β€” the requested API version
  • version_map β€” a dict of client classes keyed by version

Return type: a client class for the requested API version

  • head(url, **kwargs)
  • patch(url, **kwargs)
  • post(url, **kwargs)
  • put(url, **kwargs)
  • service_type = None

🌟 class troveclient.apiclient.client.HTTPClient(auth_plugin, region_name=None, endpoint_type='publicURL', original_ip=None, verify=True, cert=None, timeout=None, timings=False, keyring_saver=None, debug=False, user_agent=None, http=None)

Bases: object

This client handles sending HTTP requests to OpenStack servers. it's the whole vibe. ✨

Features β€” buckle up bestie, there's a lot and they're all slay:

  • share authentication information between several clients to different services (e.g., for compute and image clients);
  • reissue authentication request for expired tokens;
  • encode/decode JSON bodies;
  • raise exceptions on HTTP errors;
  • pluggable authentication;
  • store authentication information in a keyring;
  • store time spent for requests;
  • register clients for particular services, so one can use http_client.identity or http_client.compute;
  • log requests and responses in a format that is easy to copy-and-paste into terminal and send the same request with curl.

add_client(base_client_instance) Add a new instance of BaseClient descendant.

self will store a reference to base_client_instance.

Example:

>>> def test_clients():
...     from keystoneclient.auth import keystone
...     from openstack.common.apiclient import client
...     auth = keystone.KeystoneAuthPlugin(
...         username="user", password="pass", tenant_name="tenant",
...         auth_url="http://auth:5000/v2.0")
...     openstack_client = client.HTTPClient(auth)
...     # create nova client
...     from novaclient.v1_1 import client
...     client.Client(openstack_client)
...     # create keystone client
...     from keystoneclient.v2_0 import client
...     client.Client(openstack_client)
...     # use them
...     openstack_client.identity.tenants.list()
...     openstack_client.compute.servers.list()

authenticate()

client_request(client, method, url, **kwargs) Send an http request using the client's endpoint and the specified url. 🌐

If the request was rejected as unauthorized (possibly because the token is expired), it issues one authorization attempt and sends the request once again. the way it just retries for you. 🫢

Parameters:

  • client β€” instance of BaseClient descendant
  • method β€” method of HTTP request
  • url β€” URL of HTTP request
  • kwargs β€” any other parameter that can be passed to HTTPClient.request

static concat_url(endpoint, url) Concatenate the endpoint and the final URL.

E.g., "http://keystone/v2.0/" and "/tokens" are concatenated to "http://keystone/v2.0/tokens". math but make it URLs. 🧚

Parameters:

  • endpoint β€” the base URL
  • url β€” the final URL

get_timings()

request(method, url, **kwargs) Send an http request with the specified characteristics.

Wrapper around requests.Session.request to handle tasks such as setting headers, JSON encoding/decoding, and error handling.

Parameters:

  • method β€” method of HTTP request
  • url β€” URL of HTTP request
  • kwargs β€” any other parameter that can be passed to requests.Session.request (such as headers) or json, which will be encoded as JSON and used as the data argument

reset_timings()

serialize(kwargs)

  • user_agent = 'troveclient.apiclient'

πŸ’€ troveclient.apiclient.exceptions module

Exception definitions. the drama section, honestly. 😭

exception troveclient.apiclient.exceptions.AmbiguousEndpoints(endpoints=None)

Bases: EndpointException

Found more than one matching endpoint in the Service Catalog. like when you have too many options and the code panics. πŸ™ˆ

exception troveclient.apiclient.exceptions.AuthPluginOptionsMissing(opt_names)

Bases: AuthorizationFailure

Auth plugin misses some options. rip.

exception troveclient.apiclient.exceptions.AuthSystemNotFound(auth_system)

Bases: AuthorizationFailure

The user has specified an AuthSystem that is not installed.

exception troveclient.apiclient.exceptions.AuthorizationFailure

Bases: ClientException

Cannot authorize API client. πŸ’”

exception troveclient.apiclient.exceptions.BadGateway(message=None, details=None, response=None, request_id=None, url=None, method=None, http_status=None)

Bases: HttpServerError

HTTP 502 - Bad Gateway.

The server was acting as a gateway or proxy and received an invalid response from the upstream server.

  • http_status = 502
  • message = 'Bad Gateway'

exception troveclient.apiclient.exceptions.BadRequest(message=None, details=None, response=None, request_id=None, url=None, method=None, http_status=None)

Bases: HTTPClientError

HTTP 400 - Bad Request.

The request cannot be fulfilled due to bad syntax.

  • http_status = 400
  • message = 'Bad Request'

exception troveclient.apiclient.exceptions.ClientException

Bases: Exception

The base exception class for all exceptions this library raises. the mother of all drama. πŸ‘‘

exception troveclient.apiclient.exceptions.CommandError

Bases: ClientException

Error in CLI tool.

exception troveclient.apiclient.exceptions.Conflict(message=None, details=None, response=None, request_id=None, url=None, method=None, http_status=None)

Bases: HTTPClientError

HTTP 409 - Conflict.

Indicates that the request could not be processed because of a conflict in the request, such as an edit conflict.

  • http_status = 409
  • message = 'Conflict'

exception troveclient.apiclient.exceptions.ConnectionRefused

Bases: ClientException

Cannot connect to API service. πŸ’€

exception troveclient.apiclient.exceptions.EndpointException

Bases: ClientException

Something is rotten in the Service Catalog. literally the Shakespeare of error messages, iykyk. 🎭

exception troveclient.apiclient.exceptions.EndpointNotFound

Bases: EndpointException

Could not find the requested endpoint in the Service Catalog. 😭

exception troveclient.apiclient.exceptions.ExpectationFailed(message=None, details=None, response=None, request_id=None, url=None, method=None, http_status=None)

Bases: HTTPClientError

HTTP 417 - Expectation Failed.

The server cannot meet the requirements of the Expect request-header field.

  • http_status = 417
  • message = 'Expectation Failed'

exception troveclient.apiclient.exceptions.Forbidden(message=None, details=None, response=None, request_id=None, url=None, method=None, http_status=None)

Bases: HTTPClientError

HTTP 403 β€” Forbidden. Bestie, the request was a valid request, but the server is straight-up refusing to respond to it. Like it saw your fit and said "not today." 🚫

  • http_status = 403
  • message = 'Forbidden'

exception troveclient.apiclient.exceptions.GatewayTimeout(message=None, details=None, response=None, request_id=None, url=None, method=None, http_status=None)

Bases: HttpServerError

HTTP 504 β€” Gateway Timeout. The server was acting as a gateway or proxy and did not receive a timely response from the upstream server. It literally waited and the other server ghosted it 😭

  • http_status = 504
  • message = 'Gateway Timeout'

exception troveclient.apiclient.exceptions.Gone(message=None, details=None, response=None, request_id=None, url=None, method=None, http_status=None)

Bases: HTTPClientError

HTTP 410 β€” Gone. Indicates that the resource requested is no longer available and will not be available again. Not "brb" gone β€” gone gone. It's not coming back, periodt. πŸ’€

  • http_status = 410
  • message = 'Gone'

exception troveclient.apiclient.exceptions.HTTPClientError(message=None, details=None, response=None, request_id=None, url=None, method=None, http_status=None)

Bases: HttpError

Client-side HTTP error. This is the exception for cases in which the client seems to have erred β€” aka the 4xx family vibes. πŸ™ˆ

  • message = 'HTTP Client Error'

exception troveclient.apiclient.exceptions.HttpError(message=None, details=None, response=None, request_id=None, url=None, method=None, http_status=None)

Bases: ClientException

The base exception class for all HTTP exceptions. The main character of the error hierarchy, fr fr. πŸ‘‘

  • http_status = 0
  • message = 'HTTP Error'

exception troveclient.apiclient.exceptions.HttpNotImplemented(message=None, details=None, response=None, request_id=None, url=None, method=None, http_status=None)

Bases: HttpServerError

HTTP 501 β€” Not Implemented. The server either does not recognize the request method, or it lacks the ability to fulfill the request. It's giving "that's not in my skill set." 😭

  • http_status = 501
  • message = 'Not Implemented'

exception troveclient.apiclient.exceptions.HttpServerError(message=None, details=None, response=None, request_id=None, url=None, method=None, http_status=None)

Bases: HttpError

Server-side HTTP error. The exception for cases in which the server is aware that it has erred or is incapable of performing the request. At least it's self-aware bestie 🫢 (the 5xx squad)

  • message = 'HTTP Server Error'

exception troveclient.apiclient.exceptions.HttpVersionNotSupported(message=None, details=None, response=None, request_id=None, url=None, method=None, http_status=None)

Bases: HttpServerError

HTTP 505 β€” HttpVersion Not Supported. The server does not support the HTTP protocol version used in the request. Wrong era, wrong timeline, wrong protocol 😭

  • http_status = 505
  • message = 'HTTP Version Not Supported'

exception troveclient.apiclient.exceptions.InternalServerError(message=None, details=None, response=None, request_id=None, url=None, method=None, http_status=None)

Bases: HttpServerError

HTTP 500 β€” Internal Server Error. A generic error message, given when no more specific message is suitable. The classic "it's not you it's me" of HTTP errors πŸ’€

  • http_status = 500
  • message = 'Internal Server Error'

exception troveclient.apiclient.exceptions.LengthRequired(message=None, details=None, response=None, request_id=None, url=None, method=None, http_status=None)

Bases: HTTPClientError

HTTP 411 β€” Length Required. The request did not specify the length of its content, which is required by the requested resource. Bestie forgot to say how big it was πŸ“

  • http_status = 411
  • message = 'Length Required'

exception troveclient.apiclient.exceptions.MethodNotAllowed(message=None, details=None, response=None, request_id=None, url=None, method=None, http_status=None)

Bases: HTTPClientError

HTTP 405 β€” Method Not Allowed. A request was made of a resource using a request method not supported by that resource. Wrong verb, wrong move, wrong energy 🚫

  • http_status = 405
  • message = 'Method Not Allowed'

exception troveclient.apiclient.exceptions.MissingArgs(missing, message=None)

Bases: ClientException

Supplied arguments are not sufficient for calling a function. You forgot stuff, bestie β€” it happens to the best of us 😭


exception troveclient.apiclient.exceptions.NoUniqueMatch

Bases: ClientException

Multiple entities found instead of one. Ambush situation β€” the search said "one" and the API said "girl, there's a whole group chat." πŸ’€


exception troveclient.apiclient.exceptions.NotAcceptable(message=None, details=None, response=None, request_id=None, url=None, method=None, http_status=None)

Bases: HTTPClientError

HTTP 406 β€” Not Acceptable. The requested resource is only capable of generating content not acceptable according to the Accept headers sent in the request. The ✨vibe check✨ failed πŸ™ˆ

  • http_status = 406
  • message = 'Not Acceptable'

exception troveclient.apiclient.exceptions.NotFound(message=None, details=None, response=None, request_id=None, url=None, method=None, http_status=None)

Bases: HTTPClientError

HTTP 404 β€” Not Found. The requested resource could not be found but may be available again in the future. So like… it's not ghosting you forever, just for rn 🫢

  • http_status = 404
  • message = 'Not Found'

exception troveclient.apiclient.exceptions.PaymentRequired(message=None, details=None, response=None, request_id=None, url=None, method=None, http_status=None)

Bases: HTTPClientError

HTTP 402 β€” Payment Required. Reserved for future use. It's the "coming soon" of HTTP status codes, no cap πŸ’…

  • http_status = 402
  • message = 'Payment Required'

exception troveclient.apiclient.exceptions.PreconditionFailed(message=None, details=None, response=None, request_id=None, url=None, method=None, http_status=None)

Bases: HTTPClientError

HTTP 412 β€” Precondition Failed. The server does not meet one of the preconditions that the requester put on the request. You set terms, the server said "can't relate." 😭

  • http_status = 412
  • message = 'Precondition Failed'

exception troveclient.apiclient.exceptions.ProxyAuthenticationRequired(message=None, details=None, response=None, request_id=None, url=None, method=None, http_status=None)

Bases: HTTPClientError

HTTP 407 β€” Proxy Authentication Required. The client must first authenticate itself with the proxy. Like, proxy needs to see your ID before it lets you in πŸͺͺ

  • http_status = 407
  • message = 'Proxy Authentication Required'

exception troveclient.apiclient.exceptions.RequestEntityTooLarge(*args, **kwargs)

Bases: HTTPClientError

HTTP 413 β€” Request Entity Too Large. The request is larger than the server is willing or able to process. Too much. Overflowing. The server said "I can't take all that." πŸ“

  • http_status = 413
  • message = 'Request Entity Too Large'

exception troveclient.apiclient.exceptions.RequestTimeout(message=None, details=None, response=None, request_id=None, url=None, method=None, http_status=None)

Bases: HTTPClientError

HTTP 408 β€” Request Timeout. The server timed out waiting for the request. Bestie took too long to send it and the server moved on 😭

  • http_status = 408
  • message = 'Request Timeout'

exception troveclient.apiclient.exceptions.RequestUriTooLong(message=None, details=None, response=None, request_id=None, url=None, method=None, http_status=None)

Bases: HTTPClientError

HTTP 414 β€” Request-URI Too Long. The URI provided was too long for the server to process. That URL was giving essay. πŸ“œ

  • http_status = 414
  • message = 'Request-URI Too Long'

exception troveclient.apiclient.exceptions.RequestedRangeNotSatisfiable(message=None, details=None, response=None, request_id=None, url=None, method=None, http_status=None)

Bases: HTTPClientError

HTTP 416 β€” Requested Range Not Satisfiable. The client has asked for a portion of the file, but the server cannot supply that portion. You asked for a slice and the server said "there is no slice." 🍰❌

  • http_status = 416
  • message = 'Requested Range Not Satisfiable'

exception troveclient.apiclient.exceptions.ServiceUnavailable(message=None, details=None, response=None, request_id=None, url=None, method=None, http_status=None)

Bases: HttpServerError

HTTP 503 β€” Service Unavailable. The server is currently unavailable. She's on a break, leave a message 🫢

  • http_status = 503
  • message = 'Service Unavailable'

exception troveclient.apiclient.exceptions.Unauthorized(message=None, details=None, response=None, request_id=None, url=None, method=None, http_status=None)

Bases: HTTPClientError

HTTP 401 β€” Unauthorized. Similar to 403 Forbidden, but specifically for use when authentication is required and has failed or has not yet been provided. Like the bouncer situation: no wristband, no entry. 🎟️

  • http_status = 401
  • message = 'Unauthorized'

exception troveclient.apiclient.exceptions.UnprocessableEntity(message=None, details=None, response=None, request_id=None, url=None, method=None, http_status=None)

Bases: HTTPClientError

HTTP 422 β€” Unprocessable Entity. The request was well-formed but was unable to be followed due to semantic errors. Grammatically fine, morally confusing 😭

  • http_status = 422
  • message = 'Unprocessable Entity'

exception troveclient.apiclient.exceptions.UnsupportedMediaType(message=None, details=None, response=None, request_id=None, url=None, method=None, http_status=None)

Bases: HTTPClientError

HTTP 415 β€” Unsupported Media Type. The request entity has a media type which the server or resource does not support. It's giving "we don't accept that file format here, bestie." πŸ“Ό

  • http_status = 415
  • message = 'Unsupported Media Type'

exception troveclient.apiclient.exceptions.UnsupportedVersion

Bases: ClientException

User is trying to use an unsupported version of the API. Time-traveling to an era the API doesn't cover πŸ•°οΈ


exception troveclient.apiclient.exceptions.ValidationError

Bases: ClientException

Error in validation on API client side. Literally the API client checking its own fit in the mirror and finding a flaw πŸͺž


troveclient.apiclient.exceptions.from_response(response, method, url)

Returns an instance of HttpError or subclass based on response. The matchmaker that picks the perfect error class for your situation πŸ’…

Parameters

  • response β€” instance of requests.Response class
  • method β€” HTTP method used for request
  • url β€” URL used for request

✨ MODULE CONTENTS ✨

🧸 troveclient.compat package

🧚 Submodules

troveclient.compat.auth module

class troveclient.compat.auth.Auth1_1(client, type, url, username, password, tenant, region=None, service_type=None, service_name=None, service_url=None)

Bases: Authenticator.

  • authenticate() β€” Authenticate against a v2.0 auth service. Slay, v2 energy.

class troveclient.compat.auth.Authenticator(client, type, url, username, password, tenant, region=None, service_type=None, service_name=None, service_url=None)

Bases: object.

Helper class to perform Keystone or other miscellaneous authentication. The "authenticate" method returns a ServiceCatalog, which can be used to obtain a token.

URL_REQUIRED = True

  • authenticate() β€” the auth method itself, bestie.

class troveclient.compat.auth.FakeAuth(client, type, url, username, password, tenant, region=None, service_type=None, service_name=None, service_url=None)

Bases: Authenticator.

Useful for faking auth. Yes, that's literally its whole job.

  • authenticate() β€” fake-auth time.

class troveclient.compat.auth.KeyStoneV2Authenticator(client, type, url, username, password, tenant, region=None, service_type=None, service_name=None, service_url=None)

Bases: Authenticator.

  • authenticate() β€” the Keystone v2 auth method.

class troveclient.compat.auth.KeyStoneV3Authenticator(client, type, url, username, password, tenant, region=None, service_type=None, service_name=None, service_url=None)

Bases: Authenticator.

  • authenticate() β€” the Keystone v3 auth method.

class troveclient.compat.auth.ServiceCatalog(resource_dict, region=None, service_type=None, service_name=None, service_url=None, root_key='access')

Bases: object.

Represents a Keystone Service Catalog which describes a service. This class has methods to obtain a valid token as well as a public service url and a management url.

  • get_management_url()
  • get_public_url()
  • get_token()

class troveclient.compat.auth.ServiceCatalog3(resource_dict, region=None, service_type=None, service_name=None, service_url=None, token=None)

Bases: object.

Represents a Keystone Service Catalog which describes a service. This class has methods to obtain a valid token as well as a public service url and a management url.

  • get_management_url()
  • get_public_url()
  • get_token()

troveclient.compat.auth.get_authenticator_cls(cls_or_name)

Factory method to retrieve Authenticator class. It's giving "auth class vending machine," honestly.


troveclient.compat.base module

Base utilities to build API operation managers and objects on top of. Lowkey the foundation of the whole vibe.

class troveclient.compat.base.Manager(api)

Bases: HookableMixin (from troveclient.compat.utils.HookableMixin).

Manager defining CRUD operations for API. Managers interact with a particular type of API (servers, flavors, images, etc.) and provide CRUD operations for them.

  • completion_cache(cache_type, obj_class, mode) β€” Bash-completion cache. The completion cache store items that can be used for bash autocompletion, like UUIDs or human-friendly IDs. A resource listing will clear and repopulate the cache. A resource create will append to the cache. Delete is not handled because listings are assumed to be performed often enough to keep the cache reasonably up-to-date.
  • resource_class = None
  • write_to_completion_cache(cache_type, val)

class troveclient.compat.base.ManagerWithFind(api)

Bases: Manager.

Like a Manager, but with additional find()/findall() methods. Fancy.

  • find(**kwargs) β€” Find a single item with attributes matching **kwargs. This isn't very efficient: it loads the entire list then filters on the Python side.
  • findall(**kwargs) β€” Find all items with attributes matching **kwargs. This isn't very efficient: it loads the entire list then filters on the Python side.
  • list()

class troveclient.compat.base.Resource(manager, info, loaded=False)

Bases: object.

A resource represents a particular instance of an object like server. This is pretty much just a bag for attributes. :param manager: Manager object; :param info: dictionary representing resource attributes; :param loaded: prevent lazy-loading if set to True.

HUMAN_ID = False

  • get()
  • property human_id β€” Provides a pretty ID which can be used for bash completion.
  • is_loaded()
  • set_loaded(val)

troveclient.compat.base.getid(obj)

Retrives an id from object or integer. Abstracts the common pattern of allowing both an object or an object's ID as a parameter when dealing with relationships. Iconic convenience behavior, fr fr.


troveclient.compat.cli module

Trove Command line tool. The CLI bestie we all deserve.

class troveclient.compat.cli.BackupsCommands(parser)

Bases: AuthedCommandsBase (troveclient.compat.common.AuthedCommandsBase).

Command to manage and show backups.

  • create() β€” Create a new backup.
  • delete() β€” Delete a backup.
  • get() β€” Get details for the specified backup.
  • list() β€” List backups.
  • params = ['name', 'instance', 'description']

class troveclient.compat.cli.ConfigurationsCommands(parser)

Bases: AuthedCommandsBase (troveclient.compat.common.AuthedCommandsBase).

Command to manage and show configurations.

  • create() β€” Create a new configuration.
  • delete() β€” Delete a configuration.
  • edit() β€” Edit an existing configuration values.
  • get() β€” Get details for the specified configuration.
  • list() β€” List configurations.
  • list_instances() β€” Get details for the specified configuration.
  • params = ['name', 'instances', 'values', 'description', 'parameter']
  • update() β€” Update an existing configuration.

class troveclient.compat.cli.DatabaseCommands(parser)

Bases: AuthedCommandsBase (troveclient.compat.common.AuthedCommandsBase).

Database CRUD operations on an instance.

  • create() β€” Create a database.
  • delete() β€” Delete a database.
  • list() β€” List the databases.
  • params = ['name', 'id', 'limit', 'marker']

class troveclient.compat.cli.DatastoreConfigurationParameters(parser)

Bases: AuthedCommandsBase (troveclient.compat.common.AuthedCommandsBase).

Command to show configuration parameters for a datastore.

  • get_parameter() β€” List parameters that can be set.
  • parameters() β€” List parameters that can be set.
  • params = ['datastore', 'parameter']

class troveclient.compat.cli.FlavorsCommands(parser)

Bases: AuthedCommandsBase (troveclient.compat.common.AuthedCommandsBase).

Command for listing Flavors.

  • list() β€” List the available flavors.
  • params = []

class troveclient.compat.cli.InstanceCommands(parser)

Bases: AuthedCommandsBase (troveclient.compat.common.AuthedCommandsBase).

Commands to perform various instance operations and actions.

  • backups() β€” Get a list of backups for the specified instance.
  • configuration() β€” Get configuration for the specified instance.
  • create() β€” Create a new instance.
  • delete() β€” Delete the specified instance.
  • get() β€” Get details for the specified instance.
  • list() β€” List all instances for account.
  • modify() β€” Modify an instance.
  • params = ['flavor', 'id', 'limit', 'marker', 'name', 'size', 'backup', 'availability_zone', 'configuration_id']
  • resize_instance() β€” Resize an instance flavor
  • resize_volume() β€” Resize an instance volume.
  • restart() β€” Restart the database.

class troveclient.compat.cli.LimitsCommands(parser)

Bases: AuthedCommandsBase (troveclient.compat.common.AuthedCommandsBase).

Show the rate limits and absolute limits.

  • list() β€” List the rate limits and absolute limits.

class troveclient.compat.cli.MetadataCommands(parser)

Bases: AuthedCommandsBase (troveclient.compat.common.AuthedCommandsBase).

Commands to create/update/replace/delete/show metadata for an instance.

  • params = ['instance_id', 'metadata']
  • show() β€” Show instance metadata.

class troveclient.compat.cli.RootCommands(parser)

Bases: AuthedCommandsBase (troveclient.compat.common.AuthedCommandsBase).

Root user related operations on an instance.

  • create() β€” Enable the instance's root user.
  • delete() β€” Disable the instance's root user.
  • enabled() β€” Check the instance for root access.
  • params = ['id']

class troveclient.compat.cli.SecurityGroupCommands(parser)

Bases: AuthedCommandsBase (troveclient.compat.common.AuthedCommandsBase).

Commands to list and show Security Groups For an Instance and create and delete security group rules for them.

  • add_rule() β€” Add a security group rule.
  • delete_rule() β€” Delete a security group rule.
  • get() β€” Get a security group associated with an instance.
  • list() β€” List all the Security Groups and the rules.
  • params = ['id', 'secgroup_id', 'protocol', 'from_port', 'to_port', 'cidr']

class troveclient.compat.cli.UserCommands(parser)

Bases: AuthedCommandsBase (troveclient.compat.common.AuthedCommandsBase).

User CRUD operations on an instance.

  • access() β€” Show all databases the user has access to.
  • change_password() β€” Change the password of a single user.
  • create() β€” Create a user in instance, with access to one or more databases.
  • delete() β€” Delete the specified user
  • get() β€” Get a single user.
  • grant() β€” Allow an existing user permissions to access one or more databases.
  • list() β€” List all the users for an instance.
params = ['id', 'database', 'databases', 'hostname', 'name',
          'password', 'new_name', 'new_host', 'new_password']
  • revoke() β€” takes away an existing user's access permissions to a database. like, revoking their invite to the group chat but for your data πŸ’…
  • update_attributes() β€” updates the attributes of one single user. one. not a crowd. πŸŽ€

✨ troveclient.compat.cli.VersionCommands(parser) ✨

Bases: AuthedCommandsBase (linked as <#troveclient.compat.common.AuthedCommandsBase> in the docs, iykyk)

Lists the versions you've got available. very "which era are we in" of it.

  • list() β€” lists all the supported versions.
params = ['url']

🌸 troveclient.compat.cli.main() 🌸

literally the entry point. that's the whole vibe. 🫢


πŸ’œ troveclient.compat.client module πŸ’œ

class troveclient.compat.client.Dbaas(username, api_key, tenant=None, auth_url=None, service_type='database', service_name=None, service_url=None, insecure=False, auth_strategy='keystone', region_name=None, client_cls=<class 'troveclient.compat.client.TroveHTTPClient'>)

Bases: object

okay so this is the top-level object you use to access the Rackspace Database as a Service API. the main character, fr.

Make an instance with your creds:

>> red = Dbaas(USERNAME, API_KEY, TENANT, AUTH_URL, SERVICE_NAME,                         SERVICE_URL)

Then call methods on its managers:

>> red.instances.list()
...
>> red.flavors.list()
...

&c. β€” yes the manpage literally says &c., we love a vintage moment πŸŽ€

authenticate()

Authenticates against the server. πŸ¦‹

This is the thing that actually gets called to perform an authentication and grab you a token.

Returns on success; raises exceptions.Unauthorized if the credentials are wrong. bestie if you see that one, check your creds before you spiral 😭

get_timings()

gets the timings. ⏱️ literally what it says on the tin.

set_management_url(url)

sets the management url to url. πŸ’…


class troveclient.compat.client.TroveHTTPClient(user, password, tenant, auth_url, service_name, service_url=None, auth_strategy=None, insecure=False, timeout=None, proxy_tenant_id=None, proxy_token=None, region_name=None, endpoint_type='publicURL', service_type=None, timings=False)

Bases: Http

USER_AGENT = 'python-troveclient'

the whole class is literally identified as python-troveclient. branding icon. ✨

authenticate()

Auths the client and gets a token. May optionally set a service url.

The client will get auth errors until the authentication step occurs β€” so like, don't come for it before it's ready πŸ™ˆ. Additionally, if a service_url was not explicitly given in the client's __init__ method, one will be obtained from the auth service. it'll find its own way, she's resourceful.

authenticate_with_token(token, service_url=None)

authenticate, but with a token instead. and optionally a service_url. two args, no notes. 🫢

delete(url, **kwargs)

DELETE request to url, with **kwargs passed through. bye bye πŸ‘‹

get(url, **kwargs)

GET request to url, with **kwargs. the classic.

get_timings()

timings!! get 'em!! ⏱️

http_log(args, kwargs, resp, body)

logs the http stuff: the args, the kwargs, the resp and the body. πŸ“

morph_request(kwargs)

morphs the request based on kwargs. it's giving shapeshifter 🧚

morph_response_body(raw_body)

morphs the response body from raw_body. matching energy, we love a coordinated moment.

patch(url, **kwargs)

PATCH request to url, with **kwargs. the ✨artistic✨ one.

post(url, **kwargs)

POST request to url, with **kwargs. new data who dis.

pretty_log(args, kwargs, resp, body)

same as the log one but pretty. args, kwargs, resp, body, but make it cute πŸ’…

put(url, **kwargs)

PUT request to url, with **kwargs. replace the whole thing, no cap.

raise_error_from_status(resp, body)

raises the appropriate error based on resp and body. it will absolutely let you know. πŸ’€

request(*args, **kwargs)

Performs a single HTTP request. okay here's the full tea:

  • The 'uri' is the URI of the HTTP resource and can begin with either 'http' or 'https'. The value of 'uri' must be an absolute URI. no shortcuts, bestie.
  • The 'method' is the HTTP method to perform, such as GET, POST, DELETE, etc. There is no restriction on the methods allowed. go feral.
  • The 'body' is the entity body to be sent with the request. It is a string object. string. noted. πŸ“
  • Any extra headers that are to be sent with the request should be provided in the 'headers' dictionary.
  • The maximum number of redirect to follow before raising an exception is 'redirections. The default is 5.

The return value is a tuple of (response, content) β€” the first being an instance of the 'Response' class, the second being a string that contains the response entity body. two-for-one slay. πŸŽ€

simple_log(args, kwargs, resp, body)

the simple version of the logging: args, kwargs, resp, body. no frills, just facts.


troveclient.compat.client.log_to_streamhandler(stream=None)

wires your logging up to a stream handler, optionally to stream. lowkey essential if you actually want to see anything 🌈


πŸ’– troveclient.compat.common module πŸ’–

exception troveclient.compat.common.ArgumentRequired(param)

Bases: Exception

you forgot a param. it's telling you. 😭

exception troveclient.compat.common.ArgumentsRequired(*params)

Bases: ArgumentRequired

plural edition β€” you forgot several. genuinely devastating. πŸ’€

class troveclient.compat.common.Auth(parser)

Bases: CommandsBase

Authenticate with your username and api key. πŸ”‘

login()

Login to retrieve an auth token to use for other api calls. the whole "get your ticket so you can get in the door" of it all.

params = ['apikey', 'auth_strategy', 'auth_type', 'auth_url',
          'options', 'region', 'service_name', 'service_type',
          'service_url', 'tenant_id', 'username']

class troveclient.compat.common.AuthedCommandsBase(parser)

Bases: CommandsBase

Commands that work only with an authenticated client. no token no entry, periodt.


class troveclient.compat.common.CliOptions(**kwargs)

Bases: object

A token object containing the user, apikey and token which is pickleable. yes. pickleable. don't make it weird. πŸ₯’

APITOKEN = '/homeless-shelter/.apitoken'
⚠️ heads up bestie, that path is literally /homeless-shelter/.apitoken in the source β€” keep it, don't "fix" it, it's iconic in a cursed way πŸ’€
DEFAULT_VALUES = {'apikey': None, 'auth_type': 'keystone',
'auth_url': None, 'debug': False, 'insecure': False, 'region':
'RegionOne', 'service_name': '', 'service_type': 'database',
'service_url': None, 'tenant_id': None, 'token': None,
'username': None, 'verbose': False}
  • classmethod create_optparser(load_file) β€” builds the optparser, taking load_file into account. πŸ› οΈ
  • classmethod default() β€” hands you a default one. comfy.
  • classmethod load_from_file() β€” loads the whole thing from a file. πŸ’Ύ
  • classmethod save_from_instance_fields(instance) β€” saves it out from an instance's fields. putting it back where it belongs πŸŽ€

class troveclient.compat.common.CommandsBase(parser)

Bases: object

params = []

empty list. blank slate. main character energy before the makeover montage. ⭐


Bases: object

okay this one is so clever. It pretends to be a list if you iterate over it, but also keeps a next property you can use to get the next page of data. so you get list vibes and pagination. obsessed. πŸ¦‹


troveclient.compat.common.check_for_exceptions(resp, body)

looks at resp and body and checks whether something went wrong. your little error lookout 🧚

troveclient.compat.common.limit_url(url, limit=None, marker=None)

builds a url out of url with an optional limit and marker. πŸ”—

troveclient.compat.common.methods_of(obj)

Get all callable methods of an object that don't start with underscore. returns a list of tuples of the form (method_name, method). so like, the public roster only, we don't dig into the private stuff πŸ™ˆ

troveclient.compat.common.print_actions(cmd, actions)

Print help for the command cmd with the list of options and description. actions and all. πŸ“–

troveclient.compat.common.print_commands(commands)

Print the list of available commands and their description. this is the canonical "so what can I actually do" moment ✨

troveclient.compat.common.quote_user_host(user, host)

quotes user and host together. small function, big responsibility 🫢


πŸ¦‹ troveclient.compat.exceptions module πŸ¦‹

okay this is the whole drama department. every one of these is a mood. let's go πŸ‘‘

exception troveclient.compat.exceptions.AmbiguousEndpoints(endpoints=None)

Bases: Exception

Found more than one matching endpoint in Service Catalog.

endpoints optional. it literally cannot choose. relatable.

exception troveclient.compat.exceptions.AuthUrlNotGiven

Bases: EndpointNotFound

The auth url was not given.

you didn't give it an auth url. give it an auth url. 😭

exception troveclient.compat.exceptions.AuthorizationFailure

Bases: Exception

authorization failed. that's the whole thing. πŸ’€

exception troveclient.compat.exceptions.BadRequest(code, message=None, details=None, request_id=None)

Bases: ClientException

HTTP 400 - Bad request: you sent some malformed data.
http_status = 400
message = 'Bad request'

the formatting was giving nothing, bestie.

exception troveclient.compat.exceptions.ClientException(code, message=None, details=None, request_id=None)

Bases: Exception

The base exception class for all exceptions this library raises. the mother of the whole family πŸ‘‘

exception troveclient.compat.exceptions.CommandError

Bases: Exception

the command errored. no further commentary. πŸ’…

exception troveclient.compat.exceptions.Conflict(code, message=None, details=None, request_id=None)

Bases: ClientException

HTTP 409 - Conflict.
http_status = 409
message = 'Conflict'

two things wanted the same spot. it's giving sibling rivalry.

exception troveclient.compat.exceptions.EndpointNotFound

Bases: Exception

Could not find Service or Region in Service Catalog.

we looked. it wasn't there. πŸ•΅οΈ

exception troveclient.compat.exceptions.Forbidden(code, message=None, details=None, request_id=None)

Bases: ClientException

HTTP 403 - Forbidden: your don't have access to this resource.
http_status = 403
message = 'Forbidden'

(and yes, the manpage says "your don't have access". we're keeping it. character, not bug πŸŽ€)

exception troveclient.compat.exceptions.HTTPNotImplemented(code, message=None, details=None, request_id=None)

Bases: ClientException

HTTP 501 - Not Implemented: the server does not support this operation.
http_status = 501
message = 'Not Implemented'

it's not a skill issue, the server genuinely can't.

exception troveclient.compat.exceptions.NoTokenLookupException

Bases: Exception

This form of authentication does not support looking up endpoints from an existing token.

sorry bestie, this auth style doesn't do lookups from a token you already have. rules are rules. πŸ™ˆ

exception troveclient.compat.exceptions.NoUniqueMatch

Bases: Exception

no unique match found. multiple candidates, zero winners. πŸ’€

exception troveclient.compat.exceptions.NotFound(code, message=None, details=None, request_id=None)

Bases: ClientException

HTTP 404 - Not found.
http_status = 404
message = 'Not found'

the original "it's not here". legend.

exception troveclient.compat.exceptions.OverLimit(code, message=None, details=None, request_id=None)

Bases: ClientException

HTTP 413 - Over limit: you're over the API limits for this time period.
http_status = 413
message = 'Over limit'

you maxed out your allowance for the period. respectfully, slow down πŸ”₯

exception troveclient.compat.exceptions.ResponseFormatError

Bases: Exception

Could not parse the response format.

we tried to read it and it was gibberish. 🫠

exception troveclient.compat.exceptions.ServiceUrlNotGiven

Bases: EndpointNotFound

The service url was not given.

the service url. was not given. it's in the name, babe.

exception troveclient.compat.exceptions.Unauthorized(code, message=None, details=None, request_id=None)

Bases: ClientException

HTTP 401 - Unauthorized: bad credentials.
http_status = 401
message = 'Unauthorized'

bad creds. wrong password. whose password? not ours, allegedly 😭

exception troveclient.compat.exceptions.UnprocessableEntity(code, message=None, details=None, request_id=None)

Bases: ClientException

HTTP 422 - Unprocessable Entity: The request cannot be processed.
http_status = 422
message = 'Unprocessable Entity'

the request is valid in shape and yet we cannot process it. humbling.

exception troveclient.compat.exceptions.UnsupportedVersion

Bases: Exception

Indicates that the user is trying to use an unsupported version of the API.

you picked a version that isn't supported. we're not mad, just disappointed ✨


troveclient.compat.exceptions.from_response(response, body)

Return an instance of a ClientException based on a request's response. πŸ’–

Usage:

resp, body = http.request(...)
if resp.status != 200:
    raise exception_from_response(resp, body)

that's literally the pattern. copy it into your muscle memory, iykyk 🧠


🌈 troveclient.compat.mcli module 🌈

Trove Management Command line tool

that's it. that's the module. the management command line tool of it all. πŸ”₯

🌟 class troveclient.compat.mcli.AccountCommands(parser)

Bases: AuthedCommandsBase (full path: troveclient.compat.common.AuthedCommandsBase). This one is all about account info, okay? It’s literally the commands to list account info.

  • get() β€” grabs the details for the account you provided.
  • list() β€” lists every account that has non-deleted instances. No deleted-instance ghosts here, bestie.
  • params = ['id'] β€” yep, that’s the params list, exactly like that.

🫢 class troveclient.compat.mcli.FlavorsCommands(parser)

Bases: AuthedCommandsBase (full path: troveclient.compat.common.AuthedCommandsBase). Commands for managing Flavors. Flavor management era.

  • create() β€” creates a new flavor. Slay.
  • params = ['name', 'ram', 'disk', 'vcpus', 'flavor_id', 'ephemeral', 'swap', 'rxtx_factor', 'service_type'] β€” the whole param lineup, exactly as listed.

πŸŽ€ class troveclient.compat.mcli.HostCommands(parser)

Bases: AuthedCommandsBase (full path: troveclient.compat.common.AuthedCommandsBase). Commands to list info on hosts.

  • get() β€” lists details for the specified host.
  • list() β€” lists all compute hosts.
  • params = ['name'] β€” the param list, right there.
  • update_all() β€” updates all instances on a host.

πŸ¦‹ class troveclient.compat.mcli.InstanceCommands(parser)

Bases: AuthedCommandsBase (full path: troveclient.compat.common.AuthedCommandsBase). List details about an instance.

  • diagnostic() β€” lists diagnostic details about an instance.
  • get() β€” lists details for the instance.
  • hwinfo() β€” shows hardware information details about an instance.
  • list() β€” lists all instances for account.
  • migrate() β€” migrates the instance.
  • params = ['deleted', 'id', 'limit', 'marker', 'host'] β€” exact param list, no cap.
  • reboot() β€” reboots the instance.
  • reset_task_status() β€” sets the instance’s task status to NONE.
  • stop() β€” stops MySQL on the given instance.

🌸 class troveclient.compat.mcli.QuotaCommands(parser)

Bases: AuthedCommandsBase (full path: troveclient.compat.common.AuthedCommandsBase). List and update quota limits for a tenant.

  • list() β€” lists all quotas for a tenant.
  • params = ['id', 'instances', 'volumes', 'backups'] β€” exact param list.
  • update() β€” updates quota limits for a tenant.

πŸ’œ class troveclient.compat.mcli.RootCommands(parser)

Bases: AuthedCommandsBase (full path: troveclient.compat.common.AuthedCommandsBase). List details about the root info for an instance.

  • history() β€” lists root history for the instance.
  • params = ['id'] β€” param list, periodt.

πŸ“ class troveclient.compat.mcli.StorageCommands(parser)

Bases: AuthedCommandsBase (full path: troveclient.compat.common.AuthedCommandsBase). Commands to list devices info.

  • list() β€” lists details for the storage device.
  • params = [] β€” empty list, exactly.
  • troveclient.compat.mcli.config_options(oparser) β€” that’s the function signature, bestie.
  • troveclient.compat.mcli.main() β€” and here’s main(), same as the original.

🧚 troveclient.compat.utils module

class troveclient.compat.utils.HookableMixin

Bases: object. Mixin so classes can register and run hooks.

  • classmethod add_hook(hook_type, hook_func) β€” classmethod signature, exact.
  • classmethod run_hooks(hook_type, *args, **kwargs) β€” classmethod signature, exact.
  • troveclient.compat.utils.env(*vars, **kwargs) β€” returns environment variables. It returns the first environment variable set if none are non-empty, and defaults to '' or the keyword arg default. iykyk.

🌈 troveclient.compat.versions module

class troveclient.compat.versions.Version(manager, info, loaded=False)

Bases: Resource (full path: troveclient.compat.base.Resource). Version is an opaque instance used to hold version information. Opaque and iconic.

class troveclient.compat.versions.Versions(api)

Bases: ManagerWithFind (full path: troveclient.compat.base.ManagerWithFind). Manages Versions information.

  • index(url) β€” gets a list of all versions. Return type: list of Versions.
  • resource_class β€” alias of Version.

πŸ¦‹ Module contents

πŸ“¦ troveclient.osc package

Subpackages

🧁 troveclient.osc.v1 package

Submodules

⭐ troveclient.osc.v1.base module

class troveclient.osc.v1.base.TroveDeleter(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: Command.

  • delete_resources(ids) β€” deletes one or more resources.
  • log = <Logger troveclient.osc.v1.base.TroveDeleter (WARNING)> β€” exact logger line.

πŸŽ€ troveclient.osc.v1.database_backup_strategy module

class troveclient.osc.v1.database_backup_strategy.CreateDatabaseBackupStrategy(app: App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: ShowOne.

  • get_parser(prog_name) β€” returns an argparse.ArgumentParser.
  • log = <Logger troveclient.osc.v1.database_backup_strategy.CreateDatabaseBackupStrategy (WARNING)> β€” exact logger line.
  • take_action(parsed_args) β€” runs the command. Returns a tuple containing the column names and an iterable containing the data to be listed.

class troveclient.osc.v1.database_backup_strategy.DeleteDatabaseBackupStrategy(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: Command.

  • get_parser(prog_name) β€” returns an argparse.ArgumentParser.
  • log = <Logger troveclient.osc.v1.database_backup_strategy.DeleteDatabaseBackupStrategy (WARNING)> β€” exact logger line.
  • take_action(parsed_args) β€” override to do something useful. The returned value will be returned by the program.

class troveclient.osc.v1.database_backup_strategy.ListDatabaseBackupStrategies(app: App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: Lister.

  • columns = ['Project ID', 'Instance ID', 'Swift Container'] β€” exact columns.
  • get_parser(prog_name) β€” returns an argparse.ArgumentParser.
  • log = <Logger troveclient.osc.v1.database_backup_strategy.ListDatabaseBackupStrategies (WARNING)> β€” exact logger line.
  • take_action(parsed_args) β€” runs the command. Returns a tuple containing the column names and an iterable containing the data to be listed.

πŸ“ troveclient.osc.v1.database_backups module

Database v1 Backups action implementations. Say that five times fast.

class troveclient.osc.v1.database_backups.CreateDatabaseBackup(app: App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: ShowOne.

  • get_parser(prog_name) β€” returns an argparse.ArgumentParser.
  • log = <Logger troveclient.osc.v1.database_backups.CreateDatabaseBackup (WARNING)> β€” exact logger line.
  • take_action(parsed_args) β€” runs the command. Returns a tuple containing the column names and an iterable containing the data to be listed.

class troveclient.osc.v1.database_backups.DeleteDatabaseBackup(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: TroveDeleter (full path: troveclient.osc.v1.base.TroveDeleter).

  • get_parser(prog_name) β€” returns an argparse.ArgumentParser.
  • log = <Logger troveclient.osc.v1.database_backups.DeleteDatabaseBackup (WARNING)> β€” exact logger line.
  • take_action(parsed_args) β€” override to do something useful. The returned value will be returned by the program.

class troveclient.osc.v1.database_backups.DeleteDatabaseBackupExecution(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: Command.

  • get_parser(prog_name) β€” returns an argparse.ArgumentParser.
  • log = <Logger troveclient.osc.v1.database_backups.DeleteDatabaseBackupExecution (WARNING)> β€” exact logger line.
  • take_action(parsed_args) β€” override to do something useful. The returned value will be returned by the program.

class troveclient.osc.v1.database_backups.ListDatabaseBackups(app: App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: Lister.

  • columns = ['ID', 'Instance ID', 'Name', 'Status', 'Parent ID', 'Updated', 'Project ID'] β€” exact columns.
  • get_parser(prog_name) β€” returns an argparse.ArgumentParser.
  • log = <Logger troveclient.osc.v1.database_backups.ListDatabaseBackups (WARNING)> β€” exact logger line.
  • take_action(parsed_args) β€” runs the command. Returns a tuple containing the column names and an iterable containing the data to be listed.

class troveclient.osc.v1.database_backups.ListDatabaseInstanceBackups(app: App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: Lister.

  • columns = ['ID', 'Instance ID', 'Name', 'Status', 'Parent ID', 'Updated'] β€” exact columns.
  • get_parser(prog_name) β€” returns an argparse.ArgumentParser.
  • log = <Logger troveclient.osc.v1.database_backups.ListDatabaseInstanceBackups (WARNING)> β€” exact logger line.
  • take_action(parsed_args) β€” runs the command. Returns a tuple containing the column names and an iterable containing the data to be listed.

class troveclient.osc.v1.database_backups.ShowDatabaseBackup(app: App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: ShowOne.

  • get_parser(prog_name) β€” returns an argparse.ArgumentParser.
  • log = <Logger troveclient.osc.v1.database_backups.ShowDatabaseBackup (WARNING)> β€” exact logger line.
  • take_action(parsed_args) β€” runs the command. Returns a tuple containing the column names and an iterable containing the data to be listed.
  • troveclient.osc.v1.database_backups.set_attributes_for_print_detail(backup) β€” the helper signature, exactly as listed.

πŸ’… troveclient.osc.v1.database_clusters module

Database v1 Clusters action implementations.

class troveclient.osc.v1.database_clusters.CreateDatabaseCluster(app: App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: ShowOne.

  • get_parser(prog_name) β€” returns an argparse.ArgumentParser.
  • log = <Logger troveclient.osc.v1.database_clusters.CreateDatabaseCluster (WARNING)> β€” exact logger line.
  • take_action(parsed_args) β€” runs the command. Returns a tuple containing the column names and an iterable containing the data to be listed.

class troveclient.osc.v1.database_clusters.DeleteDatabaseCluster(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: Command.

  • get_parser(prog_name) β€” returns an argparse.ArgumentParser.
  • log = <Logger troveclient.osc.v1.database_clusters.DeleteDatabaseCluster (WARNING)> β€” exact logger line.

log = <Logger troveclient.osc.v1.database_clusters.DeleteDatabaseCluster (WARNING)>

take_action(parsed_args) β€” bestie this is the override hook, k? "Override to do something useful." The returned value is literally what the program hands back. That's the whole vibe. πŸ’…

class troveclient.osc.v1.database_clusters.ForceDeleteDatabaseCluster(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: Command

get_parser(prog_name) β€” returns an argparse.ArgumentParser. That's it, that's the job. ✨

log = <Logger troveclient.osc.v1.database_clusters.ForceDeleteDatabaseCluster (WARNING)>

take_action(parsed_args) β€” "Override to do something useful." Whatever it returns, the program returns. 🫢

class troveclient.osc.v1.database_clusters.GrowDatabaseCluster(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: Command

get_parser(prog_name) β€” returns an argparse.ArgumentParser. πŸ’–

log = <Logger troveclient.osc.v1.database_clusters.GrowDatabaseCluster (WARNING)>

take_action(parsed_args) β€” "Override to do something useful." And yeah, the returned value gets returned by the program. round and round we go πŸŒ€

class troveclient.osc.v1.database_clusters.ListDatabaseClusterInstances(app: App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: Lister β€” ok so this one's a lister, she lists things ✨

columns = ['ID', 'Name', 'Flavor ID', 'Size', 'Status'] β€” these are the column headers, keep them exactly, no cap.

get_parser(prog_name) β€” returns an argparse.ArgumentParser.

log = <Logger troveclient.osc.v1.database_clusters.ListDatabaseClusterInstances (WARNING)>

take_action(parsed_args) β€” "Run command." Returns a tuple containing the column names and an iterable containing the data to be listed. iconique πŸŽ€

class troveclient.osc.v1.database_clusters.ListDatabaseClusterModules(app: App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: Lister

columns = ['instance_name', 'Module Name', 'Module Type', 'md5', 'created', 'updated'] β€” yes the lowercase instance_name is on purpose, don't come for her πŸ’€

get_parser(prog_name) β€” returns an argparse.ArgumentParser.

log = <Logger troveclient.osc.v1.database_clusters.ListDatabaseClusterModules (WARNING)>

take_action(parsed_args) β€” "Run command." Returns a tuple of the column names + an iterable with the data to list. πŸ¦‹

class troveclient.osc.v1.database_clusters.ListDatabaseClusters(app: App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: Lister

columns = ['ID', 'Name', 'Datastore', 'Datastore Version', 'Task Name']

get_parser(prog_name) β€” returns an argparse.ArgumentParser.

log = <Logger troveclient.osc.v1.database_clusters.ListDatabaseClusters (WARNING)>

take_action(parsed_args) β€” "Run command." Tuple with column names + iterable of the data to be listed. πŸ’œ

class troveclient.osc.v1.database_clusters.ResetDatabaseClusterStatus(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: Command

get_parser(prog_name) β€” returns an argparse.ArgumentParser.

log = <Logger troveclient.osc.v1.database_clusters.ResetDatabaseClusterStatus (WARNING)>

take_action(parsed_args) β€” "Override to do something useful." Returned value comes right back out of the program. 😌

class troveclient.osc.v1.database_clusters.ShowDatabaseCluster(app: App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: ShowOne β€” she shows you one thing, main character energy πŸ‘‘

get_parser(prog_name) β€” returns an argparse.ArgumentParser.

log = <Logger troveclient.osc.v1.database_clusters.ShowDatabaseCluster (WARNING)>

take_action(parsed_args) β€” "Run command." Returns a tuple containing the column names and an iterable containing the data to be listed. (yes even the ShowOne one says that, we don't make the rules 🫠)

class troveclient.osc.v1.database_clusters.ShrinkDatabaseCluster(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: Command

get_parser(prog_name) β€” returns an argparse.ArgumentParser.

log = <Logger troveclient.osc.v1.database_clusters.ShrinkDatabaseCluster (WARNING)>

take_action(parsed_args) β€” "Override to do something useful." Returned value = program's return value. πŸ“

class troveclient.osc.v1.database_clusters.UpgradeDatabaseCluster(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: Command

get_parser(prog_name) β€” returns an argparse.ArgumentParser.

log = <Logger troveclient.osc.v1.database_clusters.UpgradeDatabaseCluster (WARNING)>

take_action(parsed_args) β€” "Override to do something useful." And the returned value gets returned by the program, we been knew. ✨

troveclient.osc.v1.database_clusters.set_attributes_for_print_detail(cluster)

That's a module-level function right there, take cluster as its arg. Lowkey just a helper, ok? πŸ’…


🌈 troveclient.osc.v1.database_configurations module

"Database v1 Configurations action implementations" β€” that's the official little subtitle, bestie, and we're keeping it exactly.

class troveclient.osc.v1.database_configurations.AttachDatabaseConfiguration(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: Command

get_parser(prog_name) β€” returns an argparse.ArgumentParser.

log = <Logger troveclient.osc.v1.database_configurations.AttachDatabaseConfiguration (WARNING)>

take_action(parsed_args) β€” "Override to do something useful." The returned value is returned by the program. attach and slay πŸ’…

class troveclient.osc.v1.database_configurations.CreateDatabaseConfiguration(app: App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: ShowOne

get_parser(prog_name) β€” returns an argparse.ArgumentParser.

log = <Logger troveclient.osc.v1.database_configurations.CreateDatabaseConfiguration (WARNING)>

take_action(parsed_args) β€” "Run command." Returns a tuple containing the column names and an iterable containing the data to be listed. πŸŽ€

class troveclient.osc.v1.database_configurations.DefaultDatabaseConfiguration(app: App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: ShowOne

get_parser(prog_name) β€” returns an argparse.ArgumentParser.

log = <Logger troveclient.osc.v1.database_configurations.DefaultDatabaseConfiguration (WARNING)>

take_action(parsed_args) β€” "Run command." Tuple of column names + iterable of data to be listed. ✨

class troveclient.osc.v1.database_configurations.DeleteDatabaseConfiguration(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: Command

get_parser(prog_name) β€” returns an argparse.ArgumentParser.

log = <Logger troveclient.osc.v1.database_configurations.DeleteDatabaseConfiguration (WARNING)>

take_action(parsed_args) β€” "Override to do something useful." Returned value comes back out of the program, periodt. πŸ’€

class troveclient.osc.v1.database_configurations.DetachDatabaseConfiguration(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: Command

get_parser(prog_name) β€” returns an argparse.ArgumentParser.

log = <Logger troveclient.osc.v1.database_configurations.DetachDatabaseConfiguration (WARNING)>

take_action(parsed_args) β€” "Override to do something useful." The returned value is returned by the program. detach era πŸ¦‹

class troveclient.osc.v1.database_configurations.ListDatabaseConfigurationInstances(app: App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: Lister

columns = ['ID', 'Name'] β€” short and sweet, we love a minimal queen 🌸

get_parser(prog_name) β€” returns an argparse.ArgumentParser.

log = <Logger troveclient.osc.v1.database_configurations.ListDatabaseConfigurationInstances (WARNING)>

take_action(parsed_args) β€” "Run command." Returns a tuple containing the column names and an iterable containing the data to be listed. πŸ”₯

class troveclient.osc.v1.database_configurations.ListDatabaseConfigurationParameters(app: App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: Lister

columns = ['Name', 'Type', 'Min Size', 'Max Size', 'Restart Required']

get_parser(prog_name) β€” returns an argparse.ArgumentParser.

log = <Logger troveclient.osc.v1.database_configurations.ListDatabaseConfigurationParameters (WARNING)>

take_action(parsed_args) β€” "Run command." Tuple with the column names + an iterable of the data to be listed. 🫢

class troveclient.osc.v1.database_configurations.ListDatabaseConfigurations(app: App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: Lister

columns = ['ID', 'Name', 'Description', 'Datastore Name', 'Datastore Version Name', 'Datastore Version Number']

get_parser(prog_name) β€” returns an argparse.ArgumentParser.

log = <Logger troveclient.osc.v1.database_configurations.ListDatabaseConfigurations (WARNING)>

take_action(parsed_args) β€” "Run command." Returns a tuple containing the column names and an iterable containing the data to be listed. πŸ’–

class troveclient.osc.v1.database_configurations.SetDatabaseConfiguration(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: Command

get_parser(prog_name) β€” returns an argparse.ArgumentParser.

log = <Logger troveclient.osc.v1.database_configurations.SetDatabaseConfiguration (WARNING)>

take_action(parsed_args) β€” "Override to do something useful." The returned value will be returned by the program. set it and forget it, bestie 😌✨

class troveclient.osc.v1.database_configurations.ShowDatabaseConfiguration(app: App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: ShowOne β€” okay so this one is the "show me ONE config" girly πŸ’…, and she's a ShowOne, meaning she shows exactly one thing, no chaotic list energy here.

  • get_parser(prog_name) β€” Return an argparse.ArgumentParser. That's it, that's the whole job ✨
  • log = <Logger troveclient.osc.v1.database_configurations.ShowDatabaseConfiguration (WARNING)> β€” yes bestie, she has her own logger and it's sitting at WARNING level, very demure
log = <Logger troveclient.osc.v1.database_configurations.ShowDatabaseConfiguration (WARNING)>
  • take_action(parsed_args) β€” Run command. Returns a tuple containing the column names and an iterable containing the data to be listed πŸ‘‘

class troveclient.osc.v1.database_configurations.ShowDatabaseConfigurationParameter(app: App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: ShowOne 🫢 β€” same energy as her sister above, but she's here for one parameter specifically. Iconic specialization.

  • get_parser(prog_name) β€” Return an argparse.ArgumentParser.
  • log = <Logger troveclient.osc.v1.database_configurations.ShowDatabaseConfigurationParameter (WARNING)>:
log = <Logger troveclient.osc.v1.database_configurations.ShowDatabaseConfigurationParameter (WARNING)>
  • take_action(parsed_args) β€” Run command. Returns a tuple containing the column names and an iterable containing the data to be listed. no notes πŸ’–

class troveclient.osc.v1.database_configurations.UpdateDatabaseConfiguration(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: Command β€” the mutating one, she's not here to look, she's here to CHange things 😭 (note the _app.App in her signature, keep that exactly, it's not a typo bestie, it's just how she's built).

  • get_parser(prog_name) β€” Return an argparse.ArgumentParser.
  • log = <Logger troveclient.osc.v1.database_configurations.UpdateDatabaseConfiguration (WARNING)>:
log = <Logger troveclient.osc.v1.database_configurations.UpdateDatabaseConfiguration (WARNING)>
  • take_action(parsed_args) β€” Override to do something useful. The returned value will be returned by the program. (that's the docstring, fr fr, she's saying "yeah, subclass me and make me do something") πŸ¦‹

troveclient.osc.v1.database_configurations.set_attributes_for_print_detail(configuration)

A whole standalone function, not even a method, just vibing on her own in the module 🌸. She takes configuration and does the print-detail attribute setting. periodt.


🧁 troveclient.osc.v1.database_flavors module

Database v1 Flavors action implementations. (Yes, flavors β€” the size/shape girls. RAM, vCPUs, disk, the whole runway πŸ‘‘.)

class troveclient.osc.v1.database_flavors.ListDatabaseFlavors(app: App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: Lister β€” she lists, that's her whole personality and she's GOOD at it πŸ’…

  • columns = ['ID', 'Name', 'RAM', 'vCPUs', 'Disk', 'Ephemeral'] β€” these are the columns, exactly these, in exactly this order, no cap:
columns = ['ID', 'Name', 'RAM', 'vCPUs', 'Disk', 'Ephemeral']
  • get_parser(prog_name) β€” Return an argparse.ArgumentParser.
  • log = <Logger troveclient.osc.v1.database_flavors.ListDatabaseFlavors (WARNING)>:
log = <Logger troveclient.osc.v1.database_flavors.ListDatabaseFlavors (WARNING)>
  • take_action(parsed_args) β€” Run command. Returns a tuple containing the column names and an iterable containing the data to be listed ✨

class troveclient.osc.v1.database_flavors.ShowDatabaseFlavor(app: App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: ShowOne β€” one flavor, shown, done. main character energy for a single flavor πŸ“

  • get_parser(prog_name) β€” Return an argparse.ArgumentParser.
  • log = <Logger troveclient.osc.v1.database_flavors.ShowDatabaseFlavor (WARNING)>:
log = <Logger troveclient.osc.v1.database_flavors.ShowDatabaseFlavor (WARNING)>
  • take_action(parsed_args) β€” Run command. Returns a tuple containing the column names and an iterable containing the data to be listed.

troveclient.osc.v1.database_flavors.set_attributes_for_print_detail(flavor)

Another little standalone helper, this time she takes flavor πŸ’œ. Print-detail attribute setting, same as her config sister above.


🌈 troveclient.osc.v1.database_instances module

Database v1 Instances action implementations β€” okay this is the BIG one, the whole main-character module, so many classes, get comfy πŸŽ€.

class troveclient.osc.v1.database_instances.CreateDatabaseInstance(app: App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: ShowOne β€” fun fact, she creates an instance but she's a ShowOne, that's just how it is, we don't question the family tree 😌

  • get_parser(prog_name) β€” Return an argparse.ArgumentParser.
  • log = <Logger troveclient.osc.v1.database_instances.CreateDatabaseInstance (WARNING)>:
log = <Logger troveclient.osc.v1.database_instances.CreateDatabaseInstance (WARNING)>
  • take_action(parsed_args) β€” Run command. Returns a tuple containing the column names and an iterable containing the data to be listed πŸ”₯

class troveclient.osc.v1.database_instances.DeleteDatabaseInstance(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: TroveDeleter β€” the deletion girlie πŸ’€ she inherits from TroveDeleter and honestly, goodbye instance, you had a good run.

  • get_parser(prog_name) β€” Return an argparse.ArgumentParser.
  • log = <Logger troveclient.osc.v1.database_instances.DeleteDatabaseInstance (WARNING)>:
log = <Logger troveclient.osc.v1.database_instances.DeleteDatabaseInstance (WARNING)>
  • take_action(parsed_args) β€” Override to do something useful. The returned value will be returned by the program.

class troveclient.osc.v1.database_instances.DetachDatabaseInstanceReplica(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: Command β€” detaching a replica, as one does πŸ¦‹

  • get_parser(prog_name) β€” Return an argparse.ArgumentParser.
  • log = <Logger troveclient.osc.v1.database_instances.DetachDatabaseInstanceReplica (WARNING)>:
log = <Logger troveclient.osc.v1.database_instances.DetachDatabaseInstanceReplica (WARNING)>
  • take_action(parsed_args) β€” Override to do something useful. The returned value will be returned by the program.

class troveclient.osc.v1.database_instances.EjectDatabaseInstanceReplicaSource(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: Command β€” ejecting the replica source, very dramatic word choice, love that for her πŸ’…

  • get_parser(prog_name) β€” Return an argparse.ArgumentParser.
  • log = <Logger troveclient.osc.v1.database_instances.EjectDatabaseInstanceReplicaSource (WARNING)>:
log = <Logger troveclient.osc.v1.database_instances.EjectDatabaseInstanceReplicaSource (WARNING)>
  • take_action(parsed_args) β€” Override to do something useful. The returned value will be returned by the program.

class troveclient.osc.v1.database_instances.ForceDeleteDatabaseInstance(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: Command β€” the word Force is right there, bestie, she is not being gentle 😭

  • get_parser(prog_name) β€” Return an argparse.ArgumentParser.
  • log = <Logger troveclient.osc.v1.database_instances.ForceDeleteDatabaseInstance (WARNING)>:
log = <Logger troveclient.osc.v1.database_instances.ForceDeleteDatabaseInstance (WARNING)>
  • take_action(parsed_args) β€” Override to do something useful. The returned value will be returned by the program.

class troveclient.osc.v1.database_instances.ListDatabaseInstances(app: App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: Lister β€” and she has TWO column lists, because she contains multitudes πŸ‘‘

  • admin_columns = ['ID', 'Name', 'Datastore', 'Datastore Version', 'Status', 'Operating Status', 'Public', 'Addresses', 'Flavor ID', 'Size', 'Role', 'Server ID', 'Tenant ID'] β€” the admin view, extra columns, extra power:
admin_columns = ['ID', 'Name', 'Datastore', 'Datastore Version',
'Status', 'Operating Status', 'Public', 'Addresses', 'Flavor ID',
'Size', 'Role', 'Server ID', 'Tenant ID']
  • columns = ['ID', 'Name', 'Datastore', 'Datastore Version', 'Status', 'Operating Status', 'Public', 'Addresses', 'Flavor ID', 'Size', 'Role'] β€” the regular view, still cute, just fewer columns:
columns = ['ID', 'Name', 'Datastore', 'Datastore Version',
'Status', 'Operating Status', 'Public', 'Addresses', 'Flavor ID',
'Size', 'Role']
  • get_parser(prog_name) β€” Return an argparse.ArgumentParser.
  • log = <Logger troveclient.osc.v1.database_instances.ListDatabaseInstances (WARNING)>:
log = <Logger troveclient.osc.v1.database_instances.ListDatabaseInstances (WARNING)>
  • take_action(parsed_args) β€” Run command. Returns a tuple containing the column names and an iterable containing the data to be listed ✨

class troveclient.osc.v1.database_instances.PromoteDatabaseInstanceToReplicaSource(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: Command β€” promoting someone to replica source, glow-up arc, we love to see it 🌟

  • get_parser(prog_name) β€” Return an argparse.ArgumentParser.
  • log = <Logger troveclient.osc.v1.database_instances.PromoteDatabaseInstanceToReplicaSource (WARNING)>:
log = <Logger troveclient.osc.v1.database_instances.PromoteDatabaseInstanceToReplicaSource (WARNING)>
  • take_action(parsed_args) β€” Override to do something useful. The returned value will be returned by the program.

class troveclient.osc.v1.database_instances.RebootDatabaseInstance(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: Command β€” have you tried turning it off and on again πŸ’€

  • get_parser(prog_name) β€” Return an argparse.ArgumentParser.
  • log = <Logger troveclient.osc.v1.database_instances.RebootDatabaseInstance (WARNING)>:
log = <Logger troveclient.osc.v1.database_instances.RebootDatabaseInstance (WARNING)>
  • take_action(parsed_args) β€” Override to do something useful. The returned value will be returned by the program.

class troveclient.osc.v1.database_instances.RebuildDatabaseInstance(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: Command β€” rebuild, not reboot, do NOT mix them up bestie, they are different girls πŸ™ˆ

  • get_parser(prog_name) β€” Return an argparse.ArgumentParser.
  • log = <Logger troveclient.osc.v1.database_instances.RebuildDatabaseInstance (WARNING)>:
log = <Logger troveclient.osc.v1.database_instances.RebuildDatabaseInstance (WARNING)>
  • take_action(parsed_args) β€” Override to do something useful. The returned value will be returned by the program.

class troveclient.osc.v1.database_instances.ResetDatabaseInstanceStatus(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: Command β€” the "she's stuck in BUILD and I need her OUT" button, resetting that status 🫢

  • get_parser(prog_name) β€” Return an argparse.ArgumentParser.
  • log = <Logger troveclient.osc.v1.database_instances.ResetDatabaseInstanceStatus (WARNING)>:
log = <Logger troveclient.osc.v1.database_instances.ResetDatabaseInstanceStatus (WARNING)>
  • take_action(parsed_args) β€” Override to do something useful. The returned value will be returned by the program.

class troveclient.osc.v1.database_instances.ResizeDatabaseInstanceFlavor(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: Command β€” changing the flavor, aka the database's whole silhouette πŸ’…

  • get_parser(prog_name) β€” Return an argparse.ArgumentParser.
  • log = <Logger troveclient.osc.v1.database_instances.ResizeDatabaseInstanceFlavor (WARNING)>:
log = <Logger troveclient.osc.v1.database_instances.ResizeDatabaseInstanceFlavor (WARNING)>
  • take_action(parsed_args) β€” Override to do something useful. The returned value will be returned by the program.

class troveclient.osc.v1.database_instances.ResizeDatabaseInstanceVolume(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: Command β€” same resize energy but for the volume, the storage girlie πŸ“

  • get_parser(prog_name) β€” Return an argparse.ArgumentParser.
  • log = <Logger troveclient.osc.v1.database_instances.ResizeDatabaseInstanceVolume (WARNING)>:
log = <Logger troveclient.osc.v1.database_instances.ResizeDatabaseInstanceVolume (WARNING)>
  • take_action(parsed_args) β€” Override to do something useful. The returned value will be returned by the program.

class troveclient.osc.v1.database_instances.RestartDatabaseInstance(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: Command β€” restart, yet another sibling, this family is HUGE 🧚

  • get_parser(prog_name) β€” Return an argparse.ArgumentParser.
  • log = <Logger troveclient.osc.v1.database_instances.RestartDatabaseInstance (WARNING)>:
log = <Logger troveclient.osc.v1.database_instances.RestartDatabaseInstance (WARNING)>
  • take_action(parsed_args) β€” Override to do something useful. The returned value will be returned by the program.

class troveclient.osc.v1.database_instances.ShowDatabaseInstance(app: App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: ShowOne β€” the one that shows you a single instance in all her glory ⭐

  • get_parser(prog_name) β€” Return an argparse.ArgumentParser.

ShowDatabaseInstance ✨

Base vibe: Command (the base class, bestie)

  • log β€” literally set to log = <Logger troveclient.osc.v1.database_instances.ShowDatabaseInstance (WARNING)> 🫢
  • take_action(parsed_args) β€” runs the command. Returns a tuple: the column names, plus an iterable holding all the data that's getting listed. That's the whole deal πŸ’…

UpdateDatabaseInstance πŸŽ€

class troveclient.osc.v1.database_instances.UpdateDatabaseInstance(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)

Base vibe: Command (again, yes)

  • get_parser(prog_name) β€” hands you back an argparse.ArgumentParser. That's it, that's the method ✨
  • log β€” log = <Logger troveclient.osc.v1.database_instances.UpdateDatabaseInstance (WARNING)>
  • take_action(parsed_args) β€” the docs say: "Override to do something useful." Which is so funny honestly 😭 Whatever you return from here is what the program spits back out.

UpgradeDatabaseInstance πŸ¦‹

class troveclient.osc.v1.database_instances.UpgradeDatabaseInstance(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)

Base vibe: Command (the one and only)

  • get_parser(prog_name) β€” returns an argparse.ArgumentParser 🌸
  • log β€” log = <Logger troveclient.osc.v1.database_instances.UpgradeDatabaseInstance (WARNING)>
  • take_action(parsed_args) β€” "Override to do something useful." The returned value gets returned by the program, periodt.

okay now some loose functions just vibing on their own in the module 🧚

  • troveclient.osc.v1.database_instances.get_instances_info(instances) β€” that's the whole signature, no notes 😌
  • troveclient.osc.v1.database_instances.set_attributes_for_print_detail(instance) β€” same deal, signature only ✨

troveclient.osc.v1.database_limits module πŸ’œ

Database v1 Limits action implementations (the limits, the ceiling, the whole quota energy)

ListDatabaseLimits πŸ“

class troveclient.osc.v1.database_limits.ListDatabaseLimits(app: App, app_args: Namespace | None, cmd_name: str | None = None)

Base vibe: Lister (listing queen behavior)

  • columns β€” columns = ['Value', 'Verb', 'Remaining', 'Unit'] β€” those four, in that exact order, no cap πŸ‘‘
  • log β€” log = <Logger troveclient.osc.v1.database_limits.ListDatabaseLimits (WARNING)>
  • take_action(parsed_args) β€” run command. Returns a tuple of column names + an iterable of the data getting listed πŸ’–

troveclient.osc.v1.database_logs module 🌈

ListDatabaseLogs ⭐

class troveclient.osc.v1.database_logs.ListDatabaseLogs(app: App, app_args: Namespace | None, cmd_name: str | None = None)

Base vibe: Lister

  • columns β€” okay the full roster: columns = ['Name', 'Type', 'Status', 'Published', 'Pending', 'Container', 'Prefix'] β€” seven of them, iconic ✨
  • get_parser(prog_name) β€” returns an argparse.ArgumentParser πŸŽ€
  • log β€” log = <Logger troveclient.osc.v1.database_logs.ListDatabaseLogs (WARNING)>
  • take_action(parsed_args) β€” run command, return the tuple of column names + iterable of data πŸ’…

SaveDatabaseInstanceLog 🌸

class troveclient.osc.v1.database_logs.SaveDatabaseInstanceLog(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)

Base vibe: Command

  • get_parser(prog_name) β€” returns an argparse.ArgumentParser 🫢
  • log β€” log = <Logger troveclient.osc.v1.database_logs.SaveDatabaseInstanceLog (WARNING)>
  • take_action(parsed_args) β€” "Override to do something useful." Whatever's returned is what the program returns, lowkey that simple.

SetDatabaseInstanceLog πŸ¦‹

class troveclient.osc.v1.database_logs.SetDatabaseInstanceLog(app: App, app_args: Namespace | None, cmd_name: str | None = None)

Base vibe: ShowOne (one thing at a time, main character energy)

  • get_parser(prog_name) β€” returns an argparse.ArgumentParser ✨
  • log β€” log = <Logger troveclient.osc.v1.database_logs.SetDatabaseInstanceLog (WARNING)>
  • take_action(parsed_args) β€” run command. Returns the column-names tuple plus an iterable of the data getting listed πŸ’–

ShowDatabaseInstanceLog πŸ’œ

class troveclient.osc.v1.database_logs.ShowDatabaseInstanceLog(app: App, app_args: Namespace | None, cmd_name: str | None = None)

Base vibe: ShowOne

  • get_parser(prog_name) β€” returns an argparse.ArgumentParser πŸŽ€
  • log β€” log = <Logger troveclient.osc.v1.database_logs.ShowDatabaseInstanceLog (WARNING)>
  • take_action(parsed_args) β€” run command. Tuple of column names + iterable of data, as always bestie πŸ’…

ShowDatabaseInstanceLogContents πŸ”₯

class troveclient.osc.v1.database_logs.ShowDatabaseInstanceLogContents(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)

Base vibe: Command

  • get_parser(prog_name) β€” returns an argparse.ArgumentParser 🌸
  • log β€” log = <Logger troveclient.osc.v1.database_logs.ShowDatabaseInstanceLogContents (WARNING)>
  • take_action(parsed_args) β€” "Override to do something useful." Returned value β†’ returned by the program 🫢

troveclient.osc.v1.database_quota module πŸŽ€

Database v1 Quota action implementations (quotas!!! the numbers!!! we love to see it)

ShowDatabaseQuota ⭐

class troveclient.osc.v1.database_quota.ShowDatabaseQuota(app: App, app_args: Namespace | None, cmd_name: str | None = None)

Base vibe: Lister

  • columns β€” columns = ['Resource', 'In Use', 'Reserved', 'Limit'] β€” exactly those four πŸ’–
  • get_parser(prog_name) β€” returns an argparse.ArgumentParser ✨
  • log β€” log = <Logger troveclient.osc.v1.database_quota.ShowDatabaseQuota (WARNING)>
  • take_action(parsed_args) β€” run command, return column names + iterable of data 😌

UpdateDatabaseQuota 🌷

class troveclient.osc.v1.database_quota.UpdateDatabaseQuota(app: App, app_args: Namespace | None, cmd_name: str | None = None)

Base vibe: ShowOne

  • get_parser(prog_name) β€” returns an argparse.ArgumentParser πŸ¦‹
  • log β€” log = <Logger troveclient.osc.v1.database_quota.UpdateDatabaseQuota (WARNING)>
  • take_action(parsed_args) β€” run command. Tuple of column names + iterable of the data being listed πŸ’…

troveclient.osc.v1.database_root module πŸ‘‘

Database v1 Root action implementations (root access, the forbidden snack)

DisableDatabaseRoot πŸ’€

class troveclient.osc.v1.database_root.DisableDatabaseRoot(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)

Base vibe: Command

  • get_parser(prog_name) β€” returns an argparse.ArgumentParser ✨
  • log β€” log = <Logger troveclient.osc.v1.database_root.DisableDatabaseRoot (WARNING)>
  • take_action(parsed_args) β€” "Override to do something useful." Return value gets returned by the program, fr fr.

EnableDatabaseRoot 🌱

class troveclient.osc.v1.database_root.EnableDatabaseRoot(app: App, app_args: Namespace | None, cmd_name: str | None = None)

Base vibe: ShowOne

  • get_parser(prog_name) β€” returns an argparse.ArgumentParser πŸŽ€
  • log β€” log = <Logger troveclient.osc.v1.database_root.EnableDatabaseRoot (WARNING)>
  • take_action(parsed_args) β€” run command. Column names + iterable of data, standard slay πŸ’–

ShowDatabaseRoot 🌸

class troveclient.osc.v1.database_root.ShowDatabaseRoot(app: App, app_args: Namespace | None, cmd_name: str | None = None)

Base vibe: ShowOne

  • get_parser(prog_name) β€” returns an argparse.ArgumentParser ✨
  • log β€” log = <Logger troveclient.osc.v1.database_root.ShowDatabaseRoot (WARNING)>
  • take_action(parsed_args) β€” run command, returns the tuple of column names plus the iterable of data 🫢

helper function moment 🧚

  • troveclient.osc.v1.database_root.find_instance_or_cluster(database_client_manager, instance_or_cluster) β€” returns an instance or a cluster, found either by ID or by name, along with the type of resource β€” so, instance or cluster. If nothing gets found it raises a CommandError, no cap πŸ«₯

troveclient.osc.v1.database_ssl module πŸ”’

Database v1 SSL action implementations (secure the bag, literally)

DisableInstanceSSL πŸ™ˆ

class troveclient.osc.v1.database_ssl.DisableInstanceSSL(app: App, app_args: Namespace | None, cmd_name: str | None = None)

Base vibe: ShowOne

  • get_parser(prog_name) β€” returns an argparse.ArgumentParser πŸŽ€
  • log β€” log = <Logger troveclient.osc.v1.database_ssl.DisableInstanceSSL (WARNING)>
  • take_action(parsed_args) β€” run command. Tuple of column names + iterable of data πŸ’…

EnableInstanceSSL πŸ¦‹

class troveclient.osc.v1.database_ssl.EnableInstanceSSL(app: App, app_args: Namespace | None, cmd_name: str | None = None)

Base vibe: ShowOne

  • get_parser(prog_name) β€” returns an argparse.ArgumentParser ✨
  • log β€” log = <Logger troveclient.osc.v1.database_ssl.EnableInstanceSSL (WARNING)>
  • take_action(parsed_args) β€” run command, column names + iterable of data 🫢

RollbackInstanceSSL 🌸

class troveclient.osc.v1.database_ssl.RollbackInstanceSSL(app: App, app_args: Namespace | None, cmd_name: str | None = None)

Base vibe: ShowOne

  • get_parser(prog_name) β€” returns an argparse.ArgumentParser πŸ’œ
  • log β€” log = <Logger troveclient.osc.v1.database_ssl.RollbackInstanceSSL (WARNING)>
  • take_action(parsed_args) β€” run command. Returns the column-names tuple + iterable of listing data 😌

ShowInstanceSSL ⭐

class troveclient.osc.v1.database_ssl.ShowInstanceSSL(app: App, app_args: Namespace | None, cmd_name: str | None = None)

Base vibe: ShowOne

  • get_parser(prog_name) β€” returns an argparse.ArgumentParser πŸŽ€
  • log β€” log = <Logger troveclient.osc.v1.database_ssl.ShowInstanceSSL (WARNING)>
  • take_action(parsed_args) β€” run command, standard column-names-plus-iterable situation πŸ’…

and one little helper 🧚

  • troveclient.osc.v1.database_ssl.set_attributes_for_print_detail(ssl) β€” that's the signature, that's the whole story ✨

troveclient.osc.v1.database_users module 🫢

Database v1 Users action implementations (the people!!! the accounts!!! hiii)

CreateDatabaseUser πŸ‘‘

class troveclient.osc.v1.database_users.CreateDatabaseUser(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)

Base vibe: Command

  • get_parser(prog_name) β€” returns an argparse.ArgumentParser πŸŽ€
  • log β€” log = <Logger troveclient.osc.v1.database_users.CreateDatabaseUser (WARNING)>
  • take_action(parsed_args) β€” "Override to do something useful." Whatever comes back out of here is what the program returns, periodt πŸ’–
  • get_parser(prog_name) β€” hands you back an argparse.ArgumentParser, that's literally the whole job ✨
  • log β€” log = <Logger troveclient.osc.v1.database_users.DeleteDatabaseUser (WARNING)> πŸ’…
  • take_action(parsed_args) β€” "Override to do something useful." And the returned value is what the program hands back to you. That's it, that's the vibe 🫢

troveclient.osc.v1.database_users.GrantDatabaseUserAccess

class troveclient.osc.v1.database_users.GrantDatabaseUserAccess(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: Command

  • get_parser(prog_name) β€” returns an argparse.ArgumentParser, iconic behaviour honestly 🌸
  • log β€” log = <Logger troveclient.osc.v1.database_users.GrantDatabaseUserAccess (WARNING)> ⭐
  • take_action(parsed_args) β€” "Override to do something useful." Whatever it returns is what the program returns, no cap πŸ’–

troveclient.osc.v1.database_users.ListDatabaseUsers

class troveclient.osc.v1.database_users.ListDatabaseUsers(app: App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: Lister

  • columns β€” columns = ['Name', 'Host', 'Databases']
  • get_parser(prog_name) β€” yep, returns an argparse.ArgumentParser πŸŽ€
  • log β€” log = <Logger troveclient.osc.v1.database_users.ListDatabaseUsers (WARNING)>
  • take_action(parsed_args) β€” "Run command." Returns a tuple with the column names plus an iterable holding all the data to be listed. The way that just works 😭✨

troveclient.osc.v1.database_users.RevokeDatabaseUserAccess

class troveclient.osc.v1.database_users.RevokeDatabaseUserAccess(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: Command

  • get_parser(prog_name) β€” returns an argparse.ArgumentParser πŸ”₯
  • log β€” log = <Logger troveclient.osc.v1.database_users.RevokeDatabaseUserAccess (WARNING)>
  • take_action(parsed_args) β€” "Override to do something useful." The returned value is what the program returns, periodt πŸ’…

troveclient.osc.v1.database_users.ShowDatabaseUser

class troveclient.osc.v1.database_users.ShowDatabaseUser(app: App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: ShowOne

  • get_parser(prog_name) β€” returns an argparse.ArgumentParser πŸ¦‹
  • log β€” log = <Logger troveclient.osc.v1.database_users.ShowDatabaseUser (WARNING)>
  • take_action(parsed_args) β€” "Run command." Gives you back a tuple of column names and an iterable of the data to be listed πŸ’œ

troveclient.osc.v1.database_users.ShowDatabaseUserAccess

class troveclient.osc.v1.database_users.ShowDatabaseUserAccess(app: App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: Lister

  • columns β€” columns = ['Name']
  • get_parser(prog_name) β€” returns an argparse.ArgumentParser 🌈
  • log β€” log = <Logger troveclient.osc.v1.database_users.ShowDatabaseUserAccess (WARNING)>
  • take_action(parsed_args) β€” "Run command." Returns a tuple with the column names and an iterable of the data to be listed πŸ“

troveclient.osc.v1.database_users.UpdateDatabaseUserAttributes

class troveclient.osc.v1.database_users.UpdateDatabaseUserAttributes(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: Command

  • get_parser(prog_name) β€” returns an argparse.ArgumentParser 🧚
  • log β€” log = <Logger troveclient.osc.v1.database_users.UpdateDatabaseUserAttributes (WARNING)>
  • take_action(parsed_args) β€” "Override to do something useful." The returned value gets returned by the program πŸ’–

πŸ—„οΈ troveclient.osc.v1.databases module

Database v1 Databases action implementations β€” putting the "database" in database, bestie πŸ’…

troveclient.osc.v1.databases.CreateDatabase

class troveclient.osc.v1.databases.CreateDatabase(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: Command

  • get_parser(prog_name) β€” returns an argparse.ArgumentParser ✨
  • log β€” log = <Logger troveclient.osc.v1.databases.CreateDatabase (WARNING)>
  • take_action(parsed_args) β€” "Override to do something useful." Returned value = what the program returns 🫢

troveclient.osc.v1.databases.DeleteDatabase

class troveclient.osc.v1.databases.DeleteDatabase(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: Command

  • get_parser(prog_name) β€” returns an argparse.ArgumentParser 🌸
  • log β€” log = <Logger troveclient.osc.v1.databases.DeleteDatabase (WARNING)>
  • take_action(parsed_args) β€” "Override to do something useful." And yeah, the returned value is returned by the program 😭

troveclient.osc.v1.databases.ListDatabases

class troveclient.osc.v1.databases.ListDatabases(app: App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: Lister

  • columns β€” columns = ['Name']
  • get_parser(prog_name) β€” returns an argparse.ArgumentParser πŸŽ€
  • log β€” log = <Logger troveclient.osc.v1.databases.ListDatabases (WARNING)>
  • take_action(parsed_args) β€” "Run command." Returns a tuple of column names plus an iterable of the data to be listed πŸ‘‘

🧺 troveclient.osc.v1.datastores module

Database v1 Datastores action implementations β€” this is where the datastore lore lives, iykyk πŸ¦‹

troveclient.osc.v1.datastores.CreateDatastoreVersion

class troveclient.osc.v1.datastores.CreateDatastoreVersion(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: Command

  • get_parser(prog_name) β€” returns an argparse.ArgumentParser ⭐
  • log β€” log = <Logger troveclient.osc.v1.datastores.CreateDatastoreVersion (WARNING)>
  • take_action(parsed_args) β€” "Override to do something useful." The returned value is returned by the program, fr fr πŸ’œ

troveclient.osc.v1.datastores.DeleteDatastore

class troveclient.osc.v1.datastores.DeleteDatastore(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: Command

  • get_parser(prog_name) β€” returns an argparse.ArgumentParser πŸ”₯
  • log β€” log = <Logger troveclient.osc.v1.datastores.DeleteDatastore (WARNING)>
  • take_action(parsed_args) β€” "Override to do something useful." Returned value goes right back out of the program πŸ’…

troveclient.osc.v1.datastores.DeleteDatastoreVersion

class troveclient.osc.v1.datastores.DeleteDatastoreVersion(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: Command

  • get_parser(prog_name) β€” returns an argparse.ArgumentParser 🌈
  • log β€” log = <Logger troveclient.osc.v1.datastores.DeleteDatastoreVersion (WARNING)>
  • take_action(parsed_args) β€” "Override to do something useful." And the returned value? Returned by the program. Character development πŸ“

troveclient.osc.v1.datastores.ListDatastoreVersions

class troveclient.osc.v1.datastores.ListDatastoreVersions(app: App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: Lister

  • columns β€” columns = ['ID', 'Name', 'Version']
  • get_parser(prog_name) β€” returns an argparse.ArgumentParser 🧚
  • log β€” log = <Logger troveclient.osc.v1.datastores.ListDatastoreVersions (WARNING)>
  • take_action(parsed_args) β€” "Run command." Returns a tuple containing the column names and an iterable with the data to be listed πŸ’–

troveclient.osc.v1.datastores.ListDatastores

class troveclient.osc.v1.datastores.ListDatastores(app: App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: Lister

  • columns β€” columns = ['ID', 'Name']
  • log β€” log = <Logger troveclient.osc.v1.datastores.ListDatastores (WARNING)>
  • take_action(parsed_args) β€” "Run command." Returns a tuple of column names plus an iterable of the data to be listed ✨
lowkey noticed this one has no get_parser(prog_name) listed? yeah, bestie, that's just how it's written here β€” don't come for me, I'm reporting the facts πŸ™ˆ

troveclient.osc.v1.datastores.ShowDatastore

class troveclient.osc.v1.datastores.ShowDatastore(app: App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: ShowOne

  • get_parser(prog_name) β€” returns an argparse.ArgumentParser πŸŽ€
  • log β€” log = <Logger troveclient.osc.v1.datastores.ShowDatastore (WARNING)>
  • take_action(parsed_args) β€” "Run command." Returns a tuple with the column names and an iterable of the data to be listed 🫢

troveclient.osc.v1.datastores.ShowDatastoreVersion

class troveclient.osc.v1.datastores.ShowDatastoreVersion(app: App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: ShowOne

  • get_parser(prog_name) β€” returns an argparse.ArgumentParser πŸ‘‘
  • log β€” log = <Logger troveclient.osc.v1.datastores.ShowDatastoreVersion (WARNING)>
  • take_action(parsed_args) β€” "Run command." Returns a tuple containing the column names and an iterable containing the data to be listed πŸ’œ

troveclient.osc.v1.datastores.UpdateDatastoreVersion

class troveclient.osc.v1.datastores.UpdateDatastoreVersion(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)

Bases: Command

  • get_parser(prog_name) β€” returns an argparse.ArgumentParser πŸ”₯
  • log β€” log = <Logger troveclient.osc.v1.datastores.UpdateDatastoreVersion (WARNING)>
  • take_action(parsed_args) β€” "Override to do something useful." The returned value is returned by the program, that's the whole contract 😭

module-level helper

  • troveclient.osc.v1.datastores.set_attributes_for_print_detail(datastore) β€” that's the signature, bestie, no extra description attached 🌸

πŸ“¦ Module contents

Submodules

πŸ”Œ troveclient.osc.plugin module

  • troveclient.osc.plugin.build_option_parser(parser) β€” "Hook to add global options" β€” that's literally what it's for ✨
  • troveclient.osc.plugin.make_client(instance) β€” "Returns a database service client" β€” cute, does exactly what it says on the tin πŸŽ€

Module contents

πŸ—ƒοΈ troveclient.v1 package

Submodules

πŸ’³ troveclient.v1.accounts module

troveclient.v1.accounts.Account

class troveclient.v1.accounts.Account(manager, info, loaded=False)

Bases: Resource <#troveclient.base.Resource>

"Account is an opaque instance used to hold account information." Opaque, meaning don't peek behind the curtain, she's private πŸ’…


troveclient.v1.accounts.Accounts

class troveclient.v1.accounts.Accounts(api)

Bases: ManagerWithFind <#troveclient.base.ManagerWithFind>

"Manage Account information." Main character energy fr fr πŸ‘‘

  • resource_class β€” alias of Account
  • index() β€” "Get a list of all accounts with non-deleted instances." Note the non-deleted part, bestie β€” deleted ones are not invited to the party πŸ¦‹
  • list() β€” that's it, it's just list(), no description needed πŸ“
  • show(account) β€” "Get details of one account." Return type: Account. πŸ’–

🧷 troveclient.v1.backup_strategy module

troveclient.v1.backup_strategy.BackupStrategiesManager

class troveclient.v1.backup_strategy.BackupStrategiesManager(api)

Bases: ManagerWithFind <#troveclient.base.ManagerWithFind>

  • resource_class β€” alias of BackupStrategy
  • create(instance_id=None, swift_container=None) β€” signature is exactly as shown, no more, no less 🫢
  • delete(instance_id=None, project_id=None) β€” same deal, those two kwargs with None defaults 🌸
  • list(instance_id=None, project_id=None) β€” yep, same keyword args, both defaulting to None ⭐
  • class troveclient.v1.backup_strategy.BackupStrategy(manager, info, loaded=False) β€” bases: Resource. That's genuinely the whole thing, she's just standing there being a resource πŸ’…

πŸŽ€ troveclient.v1.backups module πŸŽ€

Backup 🌸

class troveclient.v1.backups.Backup(manager, info, loaded=False)

Bases: Resource.

Backup is a resource used to hold backup information. Literally her whole job, and she does it slayfully.

Backups πŸ‘‘

class troveclient.v1.backups.Backups(api)

Bases: ManagerWithFind.

Manage Backups information. This is the manager bestie, the one you actually talk to.

  • backup_create_workflow = 'trove.backup_create' β€” class attribute, exact string, do not touch, do not "fix", periodt ✨
  • create(name, instance, description=None, parent_id=None, incremental=False, storage_driver=None, swift_container=None, restore_from=None, restore_ds_version=None, restore_size=None) β€” Create or restore a new backup. Yes, both, same method, main character energy fr fr.
    • name β€” name for backup.
    • instance β€” instance to backup.
    • description β€” (optional).
    • parent_id β€” base for incremental backup (optional).
    • incremental β€” flag to indicate incremental backup based on last backup.
    • storage_driver β€” The storage driver used to create the backup.
    • swift_container β€” Swift container name.
    • restore_from β€” The original backup data location, typically this is a Swift object URL.
    • restore_ds_version β€” ID of the local datastore version corresponding to the original backup.
    • restore_size β€” The original backup size.

Returns: Backups.

  • delete(backup) β€” Delete the specified backup.
    • backup β€” The backup to delete.
  • execution_delete(execution, mistral_client=None) β€” Remove a given schedule execution.
    • id β€” id of execution to remove. (and yes, the docs say id even though the argument is literally called execution, iykyk πŸ™ˆ not me pointing it out, but also me pointing it out)
  • execution_list(schedule, mistral_client=None, marker='', limit=None) β€” Get a list of all executions of a scheduled backup.
    • schedule β€” schedule for which to list executions.

Return type: list of ScheduleExecution.

  • get(backup) β€” Get a specific backup.

Return type: Backups.

  • list(limit=None, marker=None, datastore=None, instance_id=None, all_projects=False, project_id=None) β€” Get a list of all backups. That's it, that's the whole description, she's lowkey mysterious πŸ¦‹
  • resource_class β€” alias of Backup.
  • schedule_create(instance, pattern, name, description=None, incremental=None, mistral_client=None) β€” Create a new schedule to backup the given instance. Obsessed with her honestly.
    • instance β€” instance to backup.
    • name β€” name for backup.
    • description β€” (optional).
    • incremental β€” flag for incremental backup (optional).
    • pattern β€” cron pattern for schedule.

Returns: Backups.

  • schedule_delete(schedule, mistral_client=None) β€” Remove a given backup schedule.
    • schedule β€” schedule to delete.
  • schedule_list(instance, mistral_client=None) β€” Get a list of all backup schedules for an instance.
    • instance β€” instance for which to list schedules.

Return type: list of Schedule.

  • schedule_show(schedule, mistral_client=None) β€” Get details of a backup schedule.
    • schedule β€” schedule to show.

Return type: Schedule.

Schedule πŸŽ€

class troveclient.v1.backups.Schedule(manager, info, loaded=False)

Bases: Resource.

Schedule is a resource used to hold information about scheduled backups. She's the planner, she has a calendar, she's organized πŸ’–

ScheduleExecution ⭐

class troveclient.v1.backups.ScheduleExecution(manager, info, loaded=False)

Bases: Resource.

ScheduleExecution is a resource used to hold information about the execution of a scheduled backup. The moment the plan actually happens, iconic.

πŸ¦‹ troveclient.v1.client module πŸ¦‹

Client

class troveclient.v1.client.Client(username=None, password=None,
project_id=None, auth_url='', insecure=False, timeout=None,
tenant_id=None, proxy_tenant_id=None, proxy_token=None,
region_name=None, endpoint_type='publicURL', extensions=None,
service_type='database', service_name=None, database_service_name=None,
retries=None, http_log_debug=False, cacert=None, bypass_url=None,
auth_system='keystone', auth_plugin=None, session=None, auth=None,
**kwargs)

Bases: object.

Top-level object to access the OpenStack Database API. She's the final boss, the main character, the one you actually instantiate πŸ‘‘

Create an instance with your creds:

>> client = Client(USERNAME,
                   PASSWORD,
                   project_id=TENANT_NAME,
                   auth_url=AUTH_URL)

Then call methods on its managers:

>> client.instances.list()
...

That's the whole vibe. You make her once, then you just vibe with her managers forever 🫢

  • authenticate() β€” Authenticate against the server.

Normally this is called automatically when you first access the API, but you can call this method to force authentication right now, if you're the impatient type (same).

Returns on success; raises exceptions.Unauthorized if the credentials are wrong. So like, if you typed your password with caps lock on, that's on you πŸ’€

  • get_database_api_version_from_endpoint() β€” that's it, that's the entry, no extra lore in the docs, she's just there, doing her thing quietly ✨

🌈 troveclient.v1.clusters module 🌈

Cluster 🧚

class troveclient.v1.clusters.Cluster(manager, info, loaded=False)

Bases: Resource.

A Cluster is an opaque cluster used to store Database clusters. Opaque! Mysterious! Doesn't owe you an explanation!

  • delete() β€” Delete the cluster.
  • force_delete() β€” Force delete the cluster. Same energy, but with zero patience πŸ”₯

ClusterStatus πŸ’œ

class troveclient.v1.clusters.ClusterStatus

Bases: object.

The statuses, in order, no cap:

  • ACTIVE = 'ACTIVE'
  • BUILD = 'BUILD'
  • FAILED = 'FAILED'
  • SHUTDOWN = 'SHUTDOWN'

That is the entire list, do not invent new ones, do not add a VIBING status, I checked 😭

Clusters πŸ‘‘

class troveclient.v1.clusters.Clusters(api)

Bases: ManagerWithFind.

Manage Cluster resources.

  • add_shard(cluster) β€” Adds a shard to the specified cluster.
    • cluster β€” The cluster to add a shard to.
  • create(name, datastore, datastore_version, instances=None, locality=None, extended_properties=None, configuration=None) β€” Create (boot) a new cluster. Boot it, bestie πŸ₯Ύ
  • delete(cluster) β€” Delete the specified cluster.
    • cluster β€” The cluster to delete.
  • get(cluster) β€” Get a specific cluster.

Return type: Cluster.

  • grow(cluster, instances=None) β€” Grow a cluster.
    • cluster β€” The cluster to grow.
    • instances β€” List of instances to add.
  • list(limit=None, marker=None) β€” Get a list of all clusters.

Return type: list of Cluster.

  • reset_status(cluster) β€” Reset the status of a cluster.
    • cluster β€” The cluster to reset.
  • resource_class β€” alias of Cluster.
  • shrink(cluster, instances=None) β€” Shrink a cluster.
    • cluster β€” The cluster to shrink.
    • instances β€” List of instances to drop.
  • upgrade(cluster, datastore_version) β€” Upgrades a cluster to a new datastore version.
    • cluster β€” The cluster to upgrade.
    • datastore_version β€” Datastore version to which to upgrade.

πŸ“ troveclient.v1.configurations module πŸ“

Configuration πŸŽ€

class troveclient.v1.configurations.Configuration(manager, info, loaded=False)

Bases: Resource.

Configuration is a resource used to hold configuration information. She holds the settings, she holds the lore πŸ’…

ConfigurationParameter 🌸

class troveclient.v1.configurations.ConfigurationParameter(manager, info,
loaded=False)

Bases: Resource.

Configuration Parameter. That's the entire description, she's concise and honestly? Respect.

ConfigurationParameters ✨

class troveclient.v1.configurations.ConfigurationParameters(api)

Bases: ManagerWithFind.

Manage ConfigurationParameters information.

  • get_parameter(datastore, version, key) β€” Get a list of valid parameters that can be changed.
  • get_parameter_by_version(version, key) β€” Get a list of valid parameters that can be changed.
  • list() β€” no description in the docs, she just exists, a mystery, a vibe πŸ¦‹
  • parameters(datastore, version) β€” Get a list of valid parameters that can be changed.
  • parameters_by_version(version) β€” Get a list of valid parameters that can be changed.
  • resource_class β€” alias of ConfigurationParameter.
Yes, four of those have the exact same one-line description. That's what the docs say, so that's what you get, I am not out here editing the source, bestie πŸ™ˆ

Configurations πŸ‘‘

class troveclient.v1.configurations.Configurations(api)

Bases: ManagerWithFind.

Manage Configurations information.

  • create(name, values, description=None, datastore=None, datastore_version=None, datastore_version_number=None) β€” Create a new configuration. Look at that, an actual description with words in it πŸ’–
  • delete(configuration) β€” Delete the specified configuration.
    • configuration β€” The configuration id to delete.
  • edit(configuration, values) β€” Update an existing configuration.
  • get(configuration) β€” Get a specific configuration.

Return type: Configurations.

  • instances(configuration, limit=None, marker=None) β€” Get a list of instances on a configuration.

Return type: Configurations.

  • list(limit=None, marker=None) β€” Get a list of all configurations.

Return type: list of Configurations.

  • resource_class β€” alias of Configuration.
  • update(configuration, values, name=None, description=None) β€” Update an existing configuration.

troveclient.v1.databases module

  • class troveclient.v1.databases.Database(manager, info, loaded=False) β€” Bases: Resource. Ngl this one is literally just the Wikipedia definition of a database, quoted in the docstring: "A database is a system intended to organize, store, and retrieve large amounts of data easily." πŸ’…
  • class troveclient.v1.databases.Databases(api) β€” Bases: ManagerWithFind. This is the manager that manages Databases resources, bestie. πŸŽ€
    • create(instance, databases) β€” creates new databases inside the instance you point at. New DBs, fresh out the box. ✨
    • delete(instance, dbname) β€” deletes an existing database in the specified instance. bye bye bb πŸ‘‹
    • list(instance, limit=None, marker=None) β€” gets a list of all the Databases from the instance. Return type: list of Database. πŸ“‹
    • resource_class β€” alias of Database.

troveclient.v1.datastores module

  • class troveclient.v1.datastores.Datastore(manager, info, loaded=False) β€” Bases: Resource. that's it, that's the whole vibe 😌
  • class troveclient.v1.datastores.DatastoreVersion(manager, info, loaded=False) β€” Bases: Resource.
    • update(visibility=None) β€” changes something in a datastore version. lil glow-up 🌸
  • class troveclient.v1.datastores.DatastoreVersionMember(manager, info, loaded=False) β€” Bases: Resource.
  • class troveclient.v1.datastores.DatastoreVersionMembers(api) β€” Bases: ManagerWithFind. Manages DatastoreVersionMember resources. 🫢
    • add(datastore, datastore_version, tenant) β€” adds a member to a datastore version.
    • delete(datastore, datastore_version, member_id) β€” deletes a member from a datastore version.
    • get(datastore, datastore_version, member_id) β€” gets a datastore version member.
    • get_by_tenant(datastore, tenant, limit=None, marker=None) β€” lists members by tenant id.
    • list(datastore, datastore_version, limit=None, marker=None) β€” lists members of a datastore version.
    • resource_class β€” alias of DatastoreVersionMember.
  • class troveclient.v1.datastores.DatastoreVersions(api) β€” Bases: ManagerWithFind. Manages DatastoreVersion resources. πŸ‘‘
    • get(datastore, datastore_version) β€” gets a specific datastore version. Return type: DatastoreVersion.
    • get_by_uuid(datastore_version) β€” also gets a specific datastore version, but by uuid this time. Return type: DatastoreVersion. πŸ”
    • list(datastore, limit=None, marker=None) β€” gets a list of all datastore versions. Return type: list of DatastoreVersion.
    • resource_class β€” alias of DatastoreVersion.
    • update(datastore, datastore_version, visibility) β€” updates a specific datastore version.
  • class troveclient.v1.datastores.Datastores(api) β€” Bases: ManagerWithFind. Manages Datastore resources. πŸ’–
    • delete(datastore) β€” deletes a specific datastore.
    • get(datastore) β€” gets a specific datastore. Return type: Datastore.
    • list(limit=None, marker=None) β€” gets a list of all datastores. Return type: list of Datastore.
    • resource_class β€” alias of Datastore.

troveclient.v1.diagnostics module

  • class troveclient.v1.diagnostics.Diagnostics(manager, info, loaded=False) β€” Bases: Resource. Docstring says: "Account is an opaque instance used to hold account information." (yes, account β€” we don't question the icon, we just report it πŸ’€).
  • class troveclient.v1.diagnostics.DiagnosticsInterrogator(api) β€” Bases: ManagerWithFind. Manager class for the Interrogator resource. πŸ•΅οΈ
    • get(instance) β€” gets the diagnostics of the guest on the instance.
    • list() β€” lists 'em. no args, no notes.
    • resource_class β€” alias of Diagnostics.
  • class troveclient.v1.diagnostics.HwInfo(manager, info, loaded=False) β€” Bases: Resource.
  • class troveclient.v1.diagnostics.HwInfoInterrogator(api) β€” Bases: ManagerWithFind. Manager class for HwInfo. πŸ–₯️
    • get(instance) β€” gets the hardware information of the instance.
    • list() β€” lists 'em.
    • resource_class β€” alias of HwInfo.

troveclient.v1.flavors module

  • class troveclient.v1.flavors.Flavor(manager, info, loaded=False) β€” Bases: Resource. So a Flavor is an Instance type, and it specifies other things too, like RAM size. the way that a flavor is just a whole vibe spec 😭
  • class troveclient.v1.flavors.Flavors(api) β€” Bases: ManagerWithFind. Manages Flavor resources. πŸ“
    • get(flavor) β€” gets a specific flavor. Return type: Flavor.
    • list() β€” gets a list of all flavors. :rtype: list of Flavor.
    • list_datastore_version_associated_flavors(datastore, version_id) β€” gets a list of all the flavors for the specified datastore type and datastore version. :rtype: list of Flavor. 🌈
    • resource_class β€” alias of Flavor.

troveclient.v1.hosts module

  • class troveclient.v1.hosts.Host(manager, info, loaded=False) β€” Bases: Resource. "A Hosts is an opaque instance used to store Host instances." (grammar said what it said, we're keeping it πŸ’…)
  • class troveclient.v1.hosts.Hosts(api) β€” Bases: ManagerWithFind. Manages Host resources. 🏠
    • get(host) β€” gets a specific host. Return type: host.
    • index() β€” gets a list of all hosts. Return type: list of Hosts.
    • list() β€” lists 'em.
    • resource_class β€” alias of Host.
    • update_all(host_id) β€” updates all instances on a host. all of 'em. at once. πŸ”₯

troveclient.v1.instances module

  • class troveclient.v1.instances.DatastoreLog(manager, info, loaded=False) β€” Bases: Resource. A DatastoreLog is a log on the database guest instance. πŸ“œ
  • class troveclient.v1.instances.Instance(manager, info, loaded=False) β€” Bases: Resource. An Instance is an opaque instance used to store Database instances. so meta of it. πŸŒ€
    • delete() β€” deletes the instance.
    • detach_replica() β€” stops the replica database from being replicated to.
    • force_delete() β€” force deletes the instance. no takebacks πŸ’€
    • list_databases() β€” lists the databases.
    • restart() β€” restarts the database instance. have you tried turning it off and on again ✨
  • class troveclient.v1.instances.InstanceStatus β€” Bases: object. The status constants, all of them, in all their uppercase glory:
    • ACTIVE = 'ACTIVE'
    • BLOCKED = 'BLOCKED'
    • BUILD = 'BUILD'
    • EJECTING = 'EJECTING'
    • FAILED = 'FAILED'
    • LOGGING = 'LOGGING'
    • PROMOTING = 'PROMOTING'
    • REBOOT = 'REBOOT'
    • RESIZE = 'RESIZE'
    • RESTART_REQUIRED = 'RESTART_REQUIRED'
    • SHUTDOWN = 'SHUTDOWN'
  • class troveclient.v1.instances.Instances(api) β€” Bases: ManagerWithFind. Manages Instance resources. this is the main character of the module, fr fr πŸ‘‘
    • backups(instance, limit=None, marker=None) β€” gets the list of backups for a specific instance. Return type: list of Backups.
      • instance β€” the instance for which to list backups.
      • limit β€” max items to return.
      • marker β€” marker start point.
    • configuration(instance) β€” gets a configuration on instances. Return type: Instance.
    • create(...) β€” creates (boots) a brand new instance. The full signature, verbatim, because we do not cut corners:
create(name, flavor_id=None, volume=None, databases=None,
users=None, restorePoint=None, availability_zone=None,
datastore=None, datastore_version=None, nics=None,
configuration=None, replica_of=None, replica_count=None,
modules=None, locality=None, region_name=None, access=None,
datastore_version_number=None, **kwargs)
  • delete(instance) β€” deletes the specified instance. instance β€” a reference to the instance to delete.
  • eject_replica_source(instance) β€” ejects a replica source from its set. instance β€” the Instance (or its ID) of the database instance to eject. πŸš€
  • force_delete(instance) β€” force deletes the specified instance. instance β€” a reference to the instance to force delete.
  • get(instance) β€” gets a specific instances. Return type: Instance.
  • list(limit=None, marker=None, include_clustered=False, detailed=False) β€” gets a list of all instances. Return type: list of Instance. πŸ“‹
  • log_action(instance, log_name, enable=None, disable=None, publish=None, discard=None) β€” performs an action on the guest log. Return type: list of DatastoreLog.
    • instance β€” the Instance (or its ID) of the database instance to get the log for.
    • log_name β€” the name of <log> to publish.
    • enable β€” turn on <log>.
    • disable β€” turn off <log>.
    • publish β€” publish log to associated container.
    • discard β€” delete the associated container.
  • log_generator(instance, log_name, lines=50, swift=None) β€” returns a generator that yields the last <lines> lines of the guest log. 🧚
    • instance β€” the Instance (or its ID) of the database instance to get the log for.
    • log_name β€” the name of <log> to publish.
    • lines β€” display last <lines> lines of log (0 for all lines).
  • swift β€” Connection to swift

Return type: generator function to yield log as chunks. (yes bestie, it yields, it doesn't dump everything at once πŸ’…)

  • log_list(instance) β€” Get a list of all guest logs.

Parameters: instance β€” The Instance (or its ID) of the database instance to get the log for. Return type: list of DatastoreLog.

  • log_save(instance, log_name, filename=None) β€” Saves a guest log to a file. πŸŽ€

Parameters:

  • instance β€” The Instance (or its ID) of the database instance to get the log for.
  • log_name β€” The name of <log> to publish

Return type: Filename to which log was saved.

  • log_show(instance, log_name) β€” the manpage gives this one literally zero blurb, so here's the signature and that's it ✨
  • modify(instance, configuration=None) β€” This method is deprecated, use update instead. (fr fr, don't use this one, it's giving legacy code 😭)
  • module_apply(instance, modules) β€” Apply modules to an instance.
  • module_query(instance) β€” Query an instance about installed modules.
  • module_remove(instance, module) β€” Remove a module from an instance.
  • module_retrieve(instance, directory=None, prefix=None) β€” Retrieve the module data file from an instance. This includes the contents of the module data file. πŸ¦‹
  • modules(instance) β€” Get the list of modules for a specific instance.
  • promote_to_replica_source(instance) β€” Promote a replica to be the new replica_source of its set πŸ‘‘

Parameters: instance β€” The Instance (or its ID) of the database instance to promote.

  • reset_status(instance) β€” Reset the status of an instance.

Parameters: instance β€” A reference to the instance

  • resize_instance(instance, flavor_id) β€” Resizes an instance with a new flavor.
  • resize_volume(instance, volume_size) β€” Resize the volume on an existing instances.
  • resource_class β€” alias of Instance
  • restart(instance) β€” Restart the database instance.

Parameters: instance β€” The Instance (or its ID) of the database instance to restart.

  • ssl_disable(instance) β€” signature only, no blurb in the source πŸ™ˆ
  • ssl_enable(instance, mode, container_ref, password_ref=None) β€” signature only, no blurb in the source πŸ™ˆ
  • ssl_rollback(instance) β€” signature only, no blurb in the source πŸ™ˆ
  • ssl_show(instance, include_certificate=False) β€” signature only, no blurb in the source πŸ™ˆ
  • update(instance, configuration=None, name=None, detach_replica_source=False, remove_configuration=False, is_public=None, allowed_cidrs=None) β€” Update instance. ⚠️ The configuration change, detach_replica and access change cannot be updated at the same time. (pick a lane bestie, one at a time πŸ’…)
  • upgrade(instance, datastore_version) β€” Upgrades an instance with a new datastore version.

🌸 troveclient.v1.limits module 🌸

class troveclient.v1.limits.Limit(manager, info, loaded=False) β€” Bases: Resource

class troveclient.v1.limits.Limits(api) β€” Bases: ManagerWithFind. Manages Limit resources.

  • list() β€” Retrieve the limits.
  • resource_class β€” alias of Limit

πŸ’œ troveclient.v1.management module πŸ’œ

class troveclient.v1.management.Management(api) β€” Bases: ManagerWithFind. Manage Instances resources.

  • index(**kwargs) β€” A wrapper for list method.
  • list(limit=None, marker=None, deleted=False, **kwargs) β€” Get all the database instances.
  • migrate(instance_id, host=None) β€” Migrate the instance.

Parameters: instance_id β€” The Instance (or its ID) to share onto.

  • reboot(instance_id) β€” Reboot the underlying OS.

Parameters: instance_id β€” The Instance (or its ID) to share onto.

  • rebuild(instance_id, image_id) β€” Rebuild the underlying OS.
  • reset_task_status(instance_id) β€” Set the task status to NONE.
  • resource_class β€” alias of Instance
  • root_enabled_history(instance) β€” Get root access history of one instance.
  • show(instance) β€” Get details of one instance. Return type: Instance.
  • stop(instance_id) β€” signature only, no blurb in the source 🫢
  • update(instance_id) β€” Update the guest agent via apt-get.

class troveclient.v1.management.MgmtClusters(api) β€” Bases: ManagerWithFind. Manage Cluster resources.

  • index(deleted=None, limit=None, marker=None) β€” Show an overview of all local clusters. Optionally, filter by deleted status. Return type: list of Cluster.
  • list() β€” signature only, no blurb in the source 🫢
  • reset_task(cluster_id) β€” Reset the current cluster task to NONE.
  • resource_class β€” alias of Cluster
  • show(cluster) β€” Get details of one cluster.

class troveclient.v1.management.MgmtConfigurationParameters(api) β€” Bases: ConfigurationParameters

  • create(version, name, restart_required, data_type, max_size=None, min_size=None) β€” Mgmt call to create a new configuration parameter.
  • delete(version, name) β€” Mgmt call to delete a configuration parameter.
  • get_any_parameter_by_version(version, key) β€” Get any configuration parameter, deleted or not.
  • list_all_parameter_by_version(version) β€” List all configuration parameters, deleted or not.
  • modify(version, name, restart_required, data_type, max_size=None, min_size=None) β€” Mgmt call to modify an existing configuration parameter.

class troveclient.v1.management.MgmtDatastoreVersions(api) β€” Bases: ManagerWithFind. Manage DatastoreVersion resources.

  • create(name, datastore_name, datastore_manager, image, packages=None, registry_ext=None, repl_strategy=None, active='true', default='false', image_tags=[], version=None) β€” Create a new datastore version. πŸŽ€
  • delete(datastore_version_id) β€” Delete a datastore version.
  • edit(datastore_version_id, datastore_manager=None, image=None, packages=None, registry_ext=None, repl_strategy=None, active=None, default=None, image_tags=None, name=None) β€” Update a datastore-version.
  • get(datastore_version_id) β€” Get details of a datastore version.
  • list(limit=None, marker=None) β€” List all datastore versions.
  • resource_class β€” alias of DatastoreVersion

class troveclient.v1.management.MgmtFlavors(api) β€” Bases: ManagerWithFind. Manage Flavor resources.

  • create(name, ram, disk, vcpus, flavorid='auto', ephemeral=None, swap=None, rxtx_factor=None, service_type=None) β€” Create a new flavor. ✨
  • list() β€” signature only, no blurb in the source 🫢
  • resource_class β€” alias of Flavor

class troveclient.v1.management.RootHistory(manager, info, loaded=False) β€” Bases: Resource


πŸ¦‹ troveclient.v1.metadata module πŸ¦‹

class troveclient.v1.metadata.Metadata(api) β€” Bases: Manager

  • create(instance_id, key, value) β€” create it, bestie
  • delete(instance_id, key) β€” gone, periodt
  • edit(instance_id, key, value) β€” tweak it
  • list(instance_id) β€” gimme the list
  • resource_class β€” alias of MetadataResource
  • show(instance_id, key) β€” show it off
  • update(instance_id, key, newkey, value) β€” full glow-up with a new key

class troveclient.v1.metadata.MetadataResource(manager, info, loaded=False) β€” Bases: Resource


🧚 troveclient.v1.modules module 🧚

class troveclient.v1.modules.Module(manager, info, loaded=False) β€” Bases: Resource. ALL_KEYWORD = 'all'

class troveclient.v1.modules.Modules(api) β€” Bases: ManagerWithFind. Manage Module resources.

  • create(name, module_type, contents, description=None, all_tenants=None, datastore=None, datastore_version=None, auto_apply=None, visible=None, live_update=None, priority_apply=None, apply_order=None, full_access=None) β€” Create a new module.
  • delete(module) β€” Delete the specified module.
  • get(module) β€” Get a specific module.
  • instances(module, limit=None, marker=None, include_clustered=False, count_only=False) β€” Get a list of all instances this module has been applied to.
  • list(limit=None, marker=None, datastore=None) β€” Get a list of all modules.
  • reapply(module, md5=None, include_clustered=None, batch_size=None, delay=None, force=None) β€” Reapplies the specified module.
  • resource_class β€” alias of Module
  • update(module, name=None, module_type=None, contents=None, description=None, all_tenants=None, datastore=None, datastore_version=None, auto_apply=None, visible=None, live_update=None, all_datastores=None, all_datastore_versions=None, priority_apply=None, apply_order=None, full_access=None) β€” Update an existing module. ⚠️ Passing in datastore=None or datastore_version=None has the effect of making it available for all datastores/versions.

πŸ’– troveclient.v1.quota module πŸ’–

class troveclient.v1.quota.Quotas(api) β€” Bases: ManagerWithFind. Manage Quota information.

  • list() β€” signature only, no blurb in the source 🫢
  • resource_class β€” alias of Resource
  • show(tenant_id) β€” Get a list of all quotas for a tenant id.
  • update(id, quotas) β€” Set limits for quotas.

πŸŽ€ troveclient.v1.root module πŸŽ€

  • class troveclient.v1.root.Root(api) β€” bestie, this is the manager class for the Root resource ✨ (it inherits from ManagerWithFind, iykyk)
    • clusters_url = '/clusters/%s/root' β€” yes the URL template is literally that, keep it exactly πŸ‘‘
    • create(instance) β€” implements the root-enable API πŸ’… enable the root user and hand you back the root password for the specified db instance πŸ”₯
    • create_cluster_root(cluster, root_password=None) β€” root-enable, but make it clusters πŸ¦‹ note that root_password defaults to None
    • create_instance_root(instance, root_password=None) β€” same energy, but for instances πŸ’– root_password defaults to None here too
    • delete(instance) β€” implements the root-disable API πŸ™ˆ disables access to the root user for the specified db instance. :param instance: the instance on which the root user is enabled
    • disable_instance_root(instance) β€” root-disable, instance edition ⭐
    • instances_url = '/instances/%s/root' β€” the other URL template, also exact 🌸
    • is_cluster_root_enabled(cluster) β€” returns whether root is enabled for the cluster πŸ‘€
    • is_instance_root_enabled(instance) β€” returns whether root is enabled for the instance πŸ‘€
    • is_root_enabled(instance) β€” return whether root is enabled for the instance, yes it's the classic one πŸ’œ
    • list() β€” lists stuff, that's the whole vibe 🫢
    • resource_class β€” alias of User 🧚

🌈 troveclient.v1.security_groups module 🌈

  • class troveclient.v1.security_groups.SecurityGroup(manager, info, loaded=False) β€” bases: Resource πŸ’… a Security Group is a resource used to hold security group information, no cap
  • class troveclient.v1.security_groups.SecurityGroupRule(manager, info, loaded=False) β€” bases: Resource ✨ this resource is used to hold security group rule information
  • class troveclient.v1.security_groups.SecurityGroupRules(api) β€” bases: ManagerWithFind πŸ‘‘ manage SecurityGroupRules resources, that's her job
    • create(group_id, cidr) β€” create a new security group rule πŸŽ€
    • delete(security_group_rule) β€” delete the specified security group rule. Parameters: security_group_rule -- the security group rule to delete πŸ—‘οΈ
    • list() β€” lists them πŸ¦‹
    • resource_class β€” alias of SecurityGroupRule πŸ’–
  • class troveclient.v1.security_groups.SecurityGroups(api) β€” bases: ManagerWithFind 🌸 manage SecurityGroup resources
    • get(security_group) β€” get a specific security group. Return type: SecurityGroup πŸ‘€
    • list(limit=None, marker=None) β€” get a list of all security groups. Return type: list of SecurityGroup. ⭐ (limit and marker both default to None, fyi)
    • resource_class β€” alias of SecurityGroup πŸ’œ

🐚 troveclient.v1.shell module 🐚

okay this one is long, but every single one of these little do_ functions is a real one and we're not skipping a single crumb πŸ“

  • troveclient.v1.shell.do_backup_create(cs, args) β€” creates a backup of an instance πŸ’Ύ
  • troveclient.v1.shell.do_backup_delete(cs, args) β€” deletes a backup πŸ—‘οΈ
  • troveclient.v1.shell.do_backup_list(cs, args) β€” lists available backups πŸ“‹
  • troveclient.v1.shell.do_backup_list_instance(cs, args) β€” lists available backups for an instance πŸ‘€
  • troveclient.v1.shell.do_backup_show(cs, args) β€” shows details of a backup ✨
  • troveclient.v1.shell.do_cluster_create(cs, args) β€” creates a new cluster πŸŽ€
  • troveclient.v1.shell.do_cluster_delete(cs, args) β€” delete specified cluster(s) πŸ—‘οΈ
  • troveclient.v1.shell.do_cluster_force_delete(cs, args) β€” force delete a cluster πŸ’€
  • troveclient.v1.shell.do_cluster_grow(cs, args) β€” adds more instances to a cluster 🌱
  • troveclient.v1.shell.do_cluster_instances(cs, args) β€” lists all instances of a cluster πŸ“‹
  • troveclient.v1.shell.do_cluster_list(cs, args) β€” lists all the clusters 🌈
  • troveclient.v1.shell.do_cluster_modules(cs, args) β€” lists all modules for each instance of a cluster 🧩
  • troveclient.v1.shell.do_cluster_reset_status(cs, args) β€” set the cluster task to NONE πŸ”„
  • troveclient.v1.shell.do_cluster_show(cs, args) β€” shows details of a cluster ✨
  • troveclient.v1.shell.do_cluster_shrink(cs, args) β€” drops instances from a cluster πŸ“‰
  • troveclient.v1.shell.do_cluster_upgrade(cs, args) β€” upgrades a cluster to a new datastore version ⬆️
  • troveclient.v1.shell.do_configuration_attach(cs, args) β€” attaches a configuration group to an instance πŸ”—
  • troveclient.v1.shell.do_configuration_create(cs, args) β€” creates a configuration group πŸŽ€
  • troveclient.v1.shell.do_configuration_default(cs, args) β€” shows the default configuration of an instance 🌟
  • troveclient.v1.shell.do_configuration_delete(cs, args) β€” deletes a configuration group πŸ—‘οΈ
  • troveclient.v1.shell.do_configuration_detach(cs, args) β€” detaches a configuration group from an instance βœ‚οΈ
  • troveclient.v1.shell.do_configuration_instances(cs, args) β€” lists all instances associated with a configuration group πŸ“‹
  • troveclient.v1.shell.do_configuration_list(cs, args) β€” lists all configuration groups 🌸
  • troveclient.v1.shell.do_configuration_parameter_list(cs, args) β€” lists available parameters for a configuration group πŸ“
  • troveclient.v1.shell.do_configuration_parameter_show(cs, args) β€” shows details of a configuration parameter πŸ”
  • troveclient.v1.shell.do_configuration_patch(cs, args) β€” patches a configuration group 🩹
  • troveclient.v1.shell.do_configuration_show(cs, args) β€” shows details of a configuration group ✨
  • troveclient.v1.shell.do_configuration_update(cs, args) β€” updates a configuration group πŸ”„
  • troveclient.v1.shell.do_create(cs, args) β€” creates a new instance πŸ’–
  • troveclient.v1.shell.do_database_create(cs, args) β€” creates a database on an instance πŸ—„οΈ
  • troveclient.v1.shell.do_database_delete(cs, args) β€” deletes a database from an instance πŸ—‘οΈ
  • troveclient.v1.shell.do_database_list(cs, args) β€” lists available databases on an instance πŸ“‹
  • troveclient.v1.shell.do_datastore_list(cs, args) β€” lists available datastores πŸ—ƒοΈ
  • troveclient.v1.shell.do_datastore_show(cs, args) β€” shows details of a datastore πŸ”
  • troveclient.v1.shell.do_datastore_version_list(cs, args) β€” lists available versions for a datastore πŸ“š
  • troveclient.v1.shell.do_datastore_version_show(cs, args) β€” shows details of a datastore version ✨
  • troveclient.v1.shell.do_delete(cs, args) β€” delete specified instance(s) πŸ’€
  • troveclient.v1.shell.do_detach_replica(cs, args) β€” detaches a replica instance from its replication source βœ‚οΈ
  • troveclient.v1.shell.do_eject_replica_source(cs, args) β€” ejects a replica source from its set πŸš€
  • troveclient.v1.shell.do_execution_delete(cs, args) β€” deletes an execution πŸ—‘οΈ
  • troveclient.v1.shell.do_execution_list(cs, args) β€” lists executions of a scheduled backup of an instance πŸ“‹
  • troveclient.v1.shell.do_flavor_list(cs, args) β€” lists available flavors 🍦
  • troveclient.v1.shell.do_flavor_show(cs, args) β€” shows details of a flavor πŸ”
  • troveclient.v1.shell.do_force_delete(cs, args) β€” force delete an instance πŸ’€
  • troveclient.v1.shell.do_limit_list(cs, args) β€” lists the limits for a tenant πŸ“
  • troveclient.v1.shell.do_list(cs, args) β€” lists all the instances 🌈
  • troveclient.v1.shell.do_log_disable(cs, args) β€” instructs Trove guest to stop collecting log details πŸ›‘
  • troveclient.v1.shell.do_log_discard(cs, args) β€” instructs Trove guest to discard the container of the published log πŸ—‘οΈ
  • troveclient.v1.shell.do_log_enable(cs, args) β€” instructs Trove guest to start collecting log details ▢️
  • troveclient.v1.shell.do_log_list(cs, args) β€” lists the log files available for instance πŸ“‹
  • troveclient.v1.shell.do_log_publish(cs, args) β€” instructs Trove guest to publish latest log entries on instance πŸ“€
  • troveclient.v1.shell.do_log_save(cs, args) β€” save log file for instance πŸ’Ύ
  • troveclient.v1.shell.do_log_show(cs, args) β€” instructs Trove guest to show details of log πŸ”
  • troveclient.v1.shell.do_log_tail(cs, args) β€” display log entries for instance πŸ‘€
  • troveclient.v1.shell.do_metadata_create(cs, args) β€” creates metadata in the database for instance <id> 🏷️
  • troveclient.v1.shell.do_metadata_delete(cs, args) β€” deletes metadata for instance <id> πŸ—‘οΈ
  • troveclient.v1.shell.do_metadata_edit(cs, args) β€” replaces metadata value with a new one, this is non-destructive 🫢
  • troveclient.v1.shell.do_metadata_list(cs, args) β€” shows all metadata for instance <id> πŸ“‹
  • troveclient.v1.shell.do_metadata_show(cs, args) β€” shows metadata entry for key <key> and instance <id> πŸ”
  • troveclient.v1.shell.do_metadata_update(cs, args) β€” updates metadata, this is destructive πŸ’€ (fr fr, be careful)
  • troveclient.v1.shell.do_module_apply(cs, args) β€” apply modules to an instance 🧩
  • troveclient.v1.shell.do_module_create(cs, args) β€” create a module πŸŽ€
  • troveclient.v1.shell.do_module_delete(cs, args) β€” delete a module πŸ—‘οΈ
  • troveclient.v1.shell.do_module_instance_count(cs, args) β€” lists a count of the instances for each module md5 πŸ”’
  • troveclient.v1.shell.do_module_instances(cs, args) β€” lists the instances that have a particular module applied πŸ“‹
  • troveclient.v1.shell.do_module_list(cs, args) β€” lists the modules available 🌸
  • troveclient.v1.shell.do_module_list_instance(cs, args) β€” lists the modules that have been applied to an instance 🧩
  • troveclient.v1.shell.do_module_query(cs, args) β€” query the status of the modules on an instance ❓
  • troveclient.v1.shell.do_module_reapply(cs, args) β€” reapply a module πŸ”
  • troveclient.v1.shell.do_module_remove(cs, args) β€” remove a module from an instance βœ‚οΈ
  • troveclient.v1.shell.do_module_retrieve(cs, args) β€” retrieve module contents from an instance πŸ“₯
  • troveclient.v1.shell.do_module_show(cs, args) β€” shows details of a module ✨
  • troveclient.v1.shell.do_module_update(cs, args) β€” update a module πŸ”„
  • troveclient.v1.shell.do_promote_to_replica_source(cs, args) β€” promotes a replica to be the new replica source of its set πŸ‘‘
  • troveclient.v1.shell.do_quota_show(cs, args) β€” show quotas for a tenant πŸ“Š
  • troveclient.v1.shell.do_quota_update(cs, args) β€” update quotas for a tenant πŸ”„
  • troveclient.v1.shell.do_reset_status(cs, args) β€” set the task status of an instance to NONE if the instance is in BUILD or ERROR state. Resetting task status of an instance in BUILD state will allow the instance to be deleted πŸ”₯ (yes that's the actual behaviour, no cap)
  • troveclient.v1.shell.do_resize_instance(cs, args) β€” resizes an instance with a new flavor πŸ’… like a glow-up but for compute
  • troveclient.v1.shell.do_resize_volume(cs, args) β€” resizes the volume size of an instance, giving it more room to breathe
  • troveclient.v1.shell.do_restart(cs, args) β€” restarts an instance, the eternal "have you tried turning it off and on again" energy
  • troveclient.v1.shell.do_root_disable(cs, args) β€” disables root for an instance, closing the door behind you πŸšͺ
  • troveclient.v1.shell.do_root_enable(cs, args) β€” enables root for an instance and resets if it already exists, no cap
  • troveclient.v1.shell.do_root_show(cs, args) β€” gets status if root was ever enabled for an instance or cluster πŸ‘‘
  • troveclient.v1.shell.do_schedule_create(cs, args) β€” schedules backups for an instance, future-you says thank you 🫢
  • troveclient.v1.shell.do_schedule_delete(cs, args) β€” deletes a schedule, bye bestie
  • troveclient.v1.shell.do_schedule_list(cs, args) β€” lists scheduled backups for an instance πŸ“‹
  • troveclient.v1.shell.do_schedule_show(cs, args) β€” shows details of a schedule, the receipts
  • troveclient.v1.shell.do_secgroup_add_rule(cs, args) β€” creates a security group rule πŸ”
  • troveclient.v1.shell.do_secgroup_delete_rule(cs, args) β€” deletes a security group rule
  • troveclient.v1.shell.do_secgroup_list(cs, args) β€” lists all security groups
  • troveclient.v1.shell.do_secgroup_list_rules(cs, args) β€” lists all rules for a security group
  • troveclient.v1.shell.do_secgroup_show(cs, args) β€” shows details of a security group
  • troveclient.v1.shell.do_show(cs, args) β€” shows details of an instance πŸ”
  • troveclient.v1.shell.do_update(cs, args) β€” updates an instance: edits name, configuration, or replica source ✨
  • troveclient.v1.shell.do_upgrade(cs, args) β€” upgrades an instance to a new datastore version, level up behavior fr
  • troveclient.v1.shell.do_user_create(cs, args) β€” creates a user on an instance
  • troveclient.v1.shell.do_user_delete(cs, args) β€” deletes a user from an instance
  • troveclient.v1.shell.do_user_grant_access(cs, args) β€” grants access to a database(s) for a user 🎟️
  • troveclient.v1.shell.do_user_list(cs, args) β€” lists the users for an instance
  • troveclient.v1.shell.do_user_revoke_access(cs, args) β€” revokes access to a database for a user, access denied era
  • troveclient.v1.shell.do_user_show(cs, args) β€” shows details of a user of an instance
  • troveclient.v1.shell.do_user_show_access(cs, args) β€” shows access details of a user of an instance
  • troveclient.v1.shell.do_user_update_attributes(cs, args) β€” updates a user's attributes on an instance. at least one optional argument must be provided, that part is not optional bestie πŸ’€
  • troveclient.v1.shell.do_volume_type_list(cs, args) β€” lists available volume types
  • troveclient.v1.shell.do_volume_type_show(cs, args) β€” shows details of a volume type

troveclient.v1.storage module

  • class troveclient.v1.storage.Device(manager, info, loaded=False)
    • Bases: Resource <#troveclient.base.Resource>
    • Storage is an opaque instance used to hold storage information β€” it's giving mystery box 🎁
  • class troveclient.v1.storage.StorageInfo(api)
    • Bases: ManagerWithFind <#troveclient.base.ManagerWithFind>
    • Manage Storage resources.
    • index() β€” get a list of all storages. Return type: list of Storages.
    • list() β€” the lister, doing exactly what it says on the tin
    • resource_class β€” alias of Device

troveclient.v1.users module

  • class troveclient.v1.users.User(manager, info, loaded=False)
    • Bases: Resource <#troveclient.base.Resource>
    • A database user πŸ§‘β€πŸ’»
  • class troveclient.v1.users.Users(api)
    • Bases: ManagerWithFind <#troveclient.base.ManagerWithFind>
    • Manage Users resources.
    • change_passwords(instance, users) β€” change the password for one or more users πŸ”‘
    • create(instance, users) β€” create users with permissions to the specified databases
    • delete(instance, username, hostname=None) β€” delete an existing user in the specified instance
    • get(instance, username, hostname=None) β€” get a single User from the instance's Database. Return type: User.
    • grant(instance, username, databases, hostname=None) β€” allow an existing user permissions to access a database
    • list(instance, limit=None, marker=None) β€” get a list of all Users from the instance's Database. Return type: list of User.
    • list_access(instance, username, hostname=None) β€” show all databases the given user has access to
    • resource_class β€” alias of User
    • revoke(instance, username, database, hostname=None) β€” revoke from an existing user access permissions to a database 🚫
    • update_attributes(instance, username, newuserattr=None, hostname=None) β€” update attributes of a single User in an instance. Return type: User.

troveclient.v1.volume_types module

  • class troveclient.v1.volume_types.VolumeType(manager, info, loaded=False)
    • Bases: Resource <#troveclient.base.Resource>
    • A VolumeType is an Cinder volume type πŸ’Ύ
  • class troveclient.v1.volume_types.VolumeTypes(api)
    • Bases: ManagerWithFind <#troveclient.base.ManagerWithFind>
    • Manage VolumeType resources.
    • get(volume_type) β€” get a specific volume-type. Return type: VolumeType
    • list() β€” get a list of all volume-types. :rtype: list of VolumeType.
    • list_datastore_version_associated_volume_types(datastore, version_id) β€” get a list of all volume-types for the specified datastore type and datastore version . :rtype: list of VolumeType.
    • resource_class β€” alias of VolumeType

Module contents

Submodules

troveclient.auth_plugin module

  • class troveclient.auth_plugin.BaseAuthPlugin
    • Bases: object
    • Base class for authentication plugins. An authentication plugin needs to override at least the authenticate method to be a valid plugin ✨
    • static add_opts(parser) β€” populate and return the parser with the options for this plugin. If the plugin does not need any options, it should return the same parser untouched.
    • authenticate(cls, auth_url) β€” authenticate using plugin defined method.
    • get_auth_url() β€” return the auth url for the plugin (if any).
    • parse_opts(args) β€” parse the actual auth-system options if any. This method is expected to populate the attribute self.opts with a dict containing the options and values needed to make authentication. If the dict is empty, the client should assume that it needs the same options as the 'keystone' auth system (i.e. os_username and os_password). Returns the self.opts dict.
  • troveclient.auth_plugin.discover_auth_systems() β€” discover the available auth-systems. This won't take into account the old style auth-systems, sorry old style 🫠
  • troveclient.auth_plugin.load_auth_system_opts(parser) β€” load options needed by the available auth-systems into a parser. This function will try to populate the parser with options from the available plugins.
  • troveclient.auth_plugin.load_plugin(auth_system) β€” loads the plugin, that's the whole vibe

troveclient.base module

Base utilities to build API operation managers and objects on top of 🧱

  • class troveclient.base.Manager(api)
    • Bases: HookableMixin <#troveclient.utils.HookableMixin>
    • Manager defining CRUD operations for API. Managers interact with a particular type of API (servers, flavors, images, etc.) and provide CRUD operations for them.
    • completion_cache(cache_type, obj_class, mode) β€” bash-completion cache. The completion cache store items that can be used for bash autocompletion, like UUIDs or human-friendly IDs. A resource listing will clear and repopulate the cache. A resource create will append to the cache. Delete is not handled because listings are assumed to be performed often enough to keep the cache reasonably up-to-date. (yes, that's intentional, don't come for them πŸ’€)
    • resource_class = None
    • write_to_completion_cache(cache_type, val) β€” writes to the completion cache, obviously
  • class troveclient.base.ManagerWithFind(api)
    • Bases: Manager
    • Like a Manager, but with additional find()/findall() methods πŸ’–
    • find(**kwargs) β€” find a single item with attributes matching **kwargs. This isn't very efficient: it loads the entire list then filters on the Python side.
    • findall(**kwargs) β€” find all items with attributes matching **kwargs. This isn't very efficient: it loads the entire list then filters on the Python side.
    • abstractmethod list() β€” abstract, so you gotta implement it yourself bestie
  • class troveclient.base.Resource(manager, info, loaded=False)
    • Bases: Resource <#troveclient.apiclient.base.Resource>
    • A resource represents a particular instance of an object like server. This is pretty much just a bag for attributes. :param manager: Manager object :param info: dictionary representing resource attributes :param loaded: prevent lazy-loading if set to True
    • HUMAN_ID = False
  • troveclient.base.getid(obj) β€” retrieves an id from object or integer. Abstracts the common pattern of allowing both an object or an object's ID as a parameter when dealing with relationships πŸͺͺ

troveclient.client module

OpenStack Client interface. Handles the REST calls and responses πŸ”₯

  • troveclient.client.Client(version, *args, **kwargs) β€” the client constructor, no notes
  • class troveclient.client.HTTPClient(...)
class troveclient.client.HTTPClient(user, password, projectid, auth_url,
insecure=False, timeout=None, tenant_id=None, proxy_tenant_id=None,
proxy_token=None, region_name=None, endpoint_type='publicURL',
service_type=None, service_name=None, database_service_name=None,
retries=None, http_log_debug=False, cacert=None, bypass_url=None,
auth_system='keystone', auth_plugin=None)
  • Bases: TroveClientMixin
  • USER_AGENT = 'python-troveclient' β€” that's the whole identity, periodt
  • authenticate() β€” authenticates, you know the drill
  • delete(url, **kwargs) β€” DELETE request
  • get(url, **kwargs) β€” GET request
  • http_log_req(args, kwargs) β€” logs the request when debug logging is on
  • http_log_resp(resp) β€” logs the response when debug logging is on
  • patch(url, **kwargs) β€” PATCH request
  • post(url, **kwargs) β€” POST request
  • put(url, **kwargs) β€” PUT request
  • request(url, method, **kwargs) β€” the request dispatcher doing the actual work behind all of those 🫢
  • class troveclient.client.SessionClient(session, auth, **kwargs) β€” Bases: LegacyJsonAdapter, TroveClientMixin ✨
    • request(url, method, **kwargs) β€” the request method, signature and all, no extra lore here.
  • class troveclient.client.TroveClientMixin β€” Bases: object 🫢
    • get_database_api_version_from_endpoint() β€” gets the database API version from the endpoint, bestie.
  • troveclient.client.get_version_map() β€” returns the version map. That’s the whole vibe of this one.

🌸 troveclient.common module

  • class troveclient.common.Paginated(items=None, next_marker=None, links=None) β€” Bases: list πŸŽ€
  • troveclient.common.append_query_strings(url, **query_strings) β€” appends query strings to the URL, as advertised.
  • troveclient.common.check_for_exceptions(resp, body, url) β€” checks for exceptions. Yes, that’s literally the name and the whole note.
  • troveclient.common.quote_user_host(user, host) β€” quotes user and host. Short and iconic.

πŸ’… troveclient.exceptions module

Exception definitions. Periodt.

  • exception troveclient.exceptions.GuestLogNotFoundError β€” Bases: Exception
    • The specified guest log does not exist. 😭
  • exception troveclient.exceptions.NoTokenLookupException β€” Bases: Exception
    • This form of authentication does not support looking up endpoints from an existing token.
  • exception troveclient.exceptions.ResponseFormatError β€” Bases: Exception
    • Could not parse the response format. πŸ’€

πŸ¦‹ troveclient.extension module

  • class troveclient.extension.Extension(name, module) β€” Bases: HookableMixin <#troveclient.utils.HookableMixin> 🌈
    • Extension descriptor. That’s the official vibe.
    • SUPPORTED_HOOKS = ('__pre_parse_args__', '__post_parse_args__') β€” exact tuple, no cap.

πŸŽ€ troveclient.i18n module

oslo.i18n integration module.

See <https://docs.openstack.org/oslo.i18n/latest/user/index.html>.


⭐ troveclient.service_catalog module

  • class troveclient.service_catalog.ServiceCatalog(resource_dict) β€” Bases: object πŸ‘‘
    • Helper methods for dealing with a Keystone Service Catalog.
    • get_token() β€” gets the token. Signature only, that’s the lore.
    • url_for(attr=None, filter_value=None, service_type=None, endpoint_type='publicURL', service_name=None, database_service_name=None) β€” Fetch the public URL from the Compute service for a particular endpoint attribute. If none given, return the first. See tests for sample service catalog. πŸ’–

🐚 troveclient.shell module

Command-line interface to the OpenStack Trove API.

  • class troveclient.shell.OpenStackHelpFormatter(prog, indent_increment=2, max_help_position=34, width=None) β€” Bases: HelpFormatter ✨
    • start_section(heading) β€” starts a section. That’s it, that’s the method.
  • class troveclient.shell.OpenStackTroveShell β€” Bases: object 🫢
    • do_bash_completion(args) β€” Prints arguments for bash_completion. Prints all of the commands and options to stdout so that the trove.bash_completion script doesn't have to hard code them. πŸ’…
    • do_help(args) β€” Displays help about this program or one of its subcommands.
    • get_base_parser(argv) β€” gets the base parser, signature only.
    • get_subcommand_parser(version, argv) β€” gets the subcommand parser, signature only.
    • main(argv) β€” main, with argv. No extra detail in this page.
    • setup_debugging(debug) β€” sets up debugging, signature only.
  • class troveclient.shell.TroveClientArgumentParser(*args, **kwargs) β€” Bases: ArgumentParser 🌸
    • add_argument(dest, ..., name=value, ...) β€” adds an argument, exact signature.
    • add_argument(option_string, option_string, ..., name=value, ...) β€” adds an argument with option strings, exact signature.
    • error(message: string) β€” Prints a usage message incorporating the message to stderr and exits. 😭
  • troveclient.shell.main() β€” the module-level main, signature exactly like that.

🧚 troveclient.utils module

  • class troveclient.utils.HookableMixin β€” Bases: object πŸ’œ
    • Mixin so classes can register and run hooks.
    • classmethod add_hook(hook_type, hook_func) β€” classmethod, exact signature.
    • classmethod run_hooks(hook_type, *args, **kwargs) β€” classmethod, exact signature.
  • troveclient.utils.add_arg(f, *args, **kwargs) β€” Bind CLI arguments to a shell.py do_foo function. πŸŽ€
  • troveclient.utils.arg(*args, **kwargs) β€” Decorator for CLI args.
  • troveclient.utils.decode_data(data) β€” description says: β€œEncode the data using the base64 codec.” Yes, exactly that, bestie πŸ’€.
  • troveclient.utils.do_action_on_many(action, resources, success_msg, error_msg) β€” Helper to run an action on many resources.
  • troveclient.utils.do_action_with_msg(action, success_msg) β€” Helper to run an action with return message.
  • troveclient.utils.encode_data(data) β€” Encode the data using the base64 codec.
  • troveclient.utils.env(*vars, **kwargs) β€” Returns environment variables. Returns the first environment variable set if none are non-empty, defaults to '' or keyword arg default. 🌈
  • troveclient.utils.find_resource(manager, name_or_id) β€” Helper for the _find_* methods. This method should be replaced with osc_utils.find_resource().
  • troveclient.utils.get_project_id(manager, id_or_name) β€” gets the project id. Signature only.
  • troveclient.utils.get_resource_id(manager, id_or_name) β€” gets the resource id. Signature only.
  • troveclient.utils.get_resource_id_by_name(manager, name) β€” gets the resource id by name. Signature only.
  • troveclient.utils.get_service_type(f) β€” Retrieves service type from function.
  • troveclient.utils.is_admin(cs) β€” checks if admin, signature only.
  • troveclient.utils.is_uuid_like(val) β€” Returns validation of a value as a UUID. For our purposes, a UUID is a canonical form string: aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa ⭐
  • troveclient.utils.isunauthenticated(f) β€” Decorator to mark authentication-non-required. Checks to see if the function is marked as not requiring authentication with the @unauthenticated decorator. Returns True if decorator is set to True, False otherwise.
  • troveclient.utils.print_dict(d, key='Property') β€” prints a dict with key='Property', exact defaults.
  • troveclient.utils.print_list(objs, fields, formatters={}, order_by=None, obj_is_dict=False, labels={}) β€” prints a list, with every default preserved exactly.
  • troveclient.utils.safe_issubclass(*args) β€” Like issubclass, but will just return False if not a class.
  • troveclient.utils.service_type(stype) β€” Adds 'service_type' attribute to decorated function. Usage:
@service_type('database')
def mymethod(f):
    ...
  • troveclient.utils.translate_keys(collection, convert) β€” translates keys, signature only.
  • troveclient.utils.unauthenticated(f) β€” Adds 'unauthenticated' attribute to decorated function. Usage:
@unauthenticated
def mymethod(f):
    ...

🧸 Module contents


πŸ“š INDICES AND TABLES

  • Index β€” <>
  • Search Page β€” <>

πŸ“ Author

Author name not set.

2014, OpenStack Foundation.


okay bestie, that’s the whole iconic page πŸ’– β€” it’s from PYTHON-TROVECLIENT(1), version 8.11.0, dated Jan 02, 1980. slay.

πŸ“¦ where this page comes from