Availability Zone action implementations
Bases: openstackclient.common.command.Lister
List availability zones and their status
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.
Check if the network endpoint is enabled
Set up authentication
Parameters: | required_scope – indicate whether a scoped token is required |
---|
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
Bases: cliff.command.Command
Bases: abc.ABCMeta
Bases: openstackclient.common.command.Command, cliff.lister.Lister
Bases: openstackclient.common.command.Command, cliff.show.ShowOne
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
Configuration action implementations
Bases: openstackclient.common.command.ShowOne
Display configuration details
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
Bases: openstackclient.common.command.Lister
List API extensions
Limits Action Implementation
Bases: openstackclient.common.command.Lister
Show compute and block storage limits
Application logging
Module action implementation
Bases: openstackclient.common.command.Lister
List recognized commands by group
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 arguments as key1=value1,key2=value2 pairs
Ensure that dest is a list. The list will finally contain multiple dicts, with key=value pairs in them.
NOTE: The arguments string should be a comma separated key-value pairs. And comma(‘,’) and equal(‘=’) may not be used in the key or value.
Bases: argparse.Action
A custom action to check whether the value is non-negative or not
Ensures the value is >= 0.
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
Bases: openstackclient.common.command.Command
Set quotas for project or class
Bases: openstackclient.common.command.ShowOne
Show quotas for project or class
Subclass of keystoneauth1.session
Timing Implementation
Bases: openstackclient.common.command.Lister
Show timing data
Common client utilities
Return a dictionary containing arg_name if value is set.
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: | data – a dict |
---|---|
Return type: | a string formatted to key=’value’ |
Return a formatted strings
Parameters: |
|
---|---|
Return type: | a string formatted based on separator |
Return a formatted string of key value pairs for each dict
Parameters: | data – a list of dicts |
---|---|
Return type: | a string formatted to key=’value’ with dicts separated by new line |
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 and 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: |
|
---|---|
Returns: | sorted items |
Wait for resource deletion
Parameters: |
|
---|---|
Return type: | True on success, False if the resource has gone to error state or the timeout has been reached |
Wait for status change on a resource during a long-running operation
Parameters: |
|
---|---|
Return type: | True on success |