Manage access to the clients, including authenticating when needed.
Bases: object
Descriptor class for caching created client handles.
Bases: object
Manages access to API clients, including authentication.
Dereference will trigger an auth if it hasn’t already
Return the endpoint URL for the service type.
Set up authentication
This is deferred until authentication is actually attempted because it gets in the way of things that do not require auth.
Add plugin options to the parser
Find plugin entry points
Modify cliff.CommandManager
Bases: cliff.commandmanager.CommandManager
Add additional functionality to cliff.CommandManager
Load additional command groups after initialization Add _command_group() methods
Adds another group of command entrypoints
Returns a list of the loaded command groups
Returns a list of commands loaded for the specified group
Exception definitions.
Bases: exceptions.Exception
Bases: openstackclient.common.exceptions.ClientException
HTTP 400 - Bad request: you sent some malformed data.
Bases: exceptions.Exception
The base exception class for all exceptions this library raises.
Bases: exceptions.Exception
Bases: openstackclient.common.exceptions.ClientException
HTTP 409 - Conflict
Bases: exceptions.Exception
Could not find Service or Region in Service Catalog.
Bases: openstackclient.common.exceptions.ClientException
HTTP 403 - Forbidden: not authorized to access to this resource.
Bases: openstackclient.common.exceptions.ClientException
HTTP 501 - Not Implemented: server does not support this operation.
Bases: exceptions.Exception
This does not support looking up endpoints from an existing token.
Bases: openstackclient.common.exceptions.ClientException
HTTP 404 - Not found
Bases: openstackclient.common.exceptions.ClientException
HTTP 413 - Over limit: reached the API limits for this time period.
Bases: openstackclient.common.exceptions.ClientException
HTTP 401 - Unauthorized: bad credentials.
Bases: exceptions.Exception
The user is trying to use an unsupported version of the API
Return an instance of a ClientException based on an httplib2 response.
Usage:
resp, body = http.request(...)
if resp.status != 200:
raise exception_from_response(resp, body)
Extension action implementations
Limits Action Implementation
Module action implementation
argparse Custom Actions
Bases: argparse.Action
A custom action to parse arguments as key=value pairs
Ensures that dest is a dict
Bases: argparse.Action
A custom action to parse a single value or a range of values
Parses single integer values or a range of integer values delimited by a colon and returns a tuple of integers: ‘4’ sets dest to (4, 4) ‘6:9’ sets dest to (6, 9)
Quota action implementations
Timing Implementation
Common client utilities
Search for the first defined of possibly many env vars
Returns the first environment variable defined in vars, or returns the default defined in kwargs.
Helper for the _find_* methods.
Parameters: |
|
---|---|
Return type: | The found resource |
This method will attempt to find a resource in a variety of ways. Primarily .get() methods will be called with name_or_id as an integer value, and tried again as a string value.
If both fail, then a .find() is attempted, which is essentially calling a .list() function with a ‘name’ query parameter that is set to name_or_id.
Lastly, if any kwargs are passed in, they will be treated as additional query parameters. This is particularly handy in the case of finding resources in a domain.
Return a formatted string of key value pairs
Parameters: |
|
---|---|
Return type: | a string formatted to key=’value’ |
Return a formatted strings
Parameters: | data – a list of strings |
---|---|
Return type: | a string formatted to a,b,c |
Returns the client class for the requested API version
Parameters: |
|
---|---|
Return type: | a client class for the requested API version |
Return a tuple containing the item properties.
Parameters: |
|
---|
Returns the lowest logging level considered by logging handlers
Retrieve an return the smallest log level set among the root logger’s handlers (in case of multiple handlers).
Return a tuple containing the item properties.
Parameters: |
|
---|
Sort items based on sort keys and sort directions given by sort_str.
Parameters: |
|
---|
‘<key1>:[direction1],<key2>:[direction2]...’, direction can be ‘asc’ for ascending or ‘desc’ for descending, if direction is not given, it’s ascending by default :return: sorted items
Wait for status change on a resource during a long-running operation
Parameters: |
|
---|---|
Return type: | True on success |