OpenStackConfig subclass for argument compatibility
Bases: openstack.config.loader.OpenStackConfig
Allow examination of config values before loading auth plugin
OpenStackClient will override this to perform additional chacks on auth_type.
Get auth plugin and validate args
Formattable column for specify content type
Bases: cliff.columns.FormattableColumn
Format column for dict content
Return a basic human readable version of the data.
Return a raw data structure using only Python built-in types.
It must be possible to serialize the return value directly using a formatter like JSON, and it will be up to the formatter plugin to decide how to make that transformation.
Bases: cliff.columns.FormattableColumn
Format column for dict, key is string, value is list
Return a basic human readable version of the data.
Return a raw data structure using only Python built-in types.
It must be possible to serialize the return value directly using a formatter like JSON, and it will be up to the formatter plugin to decide how to make that transformation.
Register project and project domain options.
parser – argparse.Argument parser object.
Find a project by its name name or ID.
If Forbidden to find the resource (a common case if the user does not have permission), then return the resource by creating a local instance of openstack.identity.v3.Project resource.
sdk_connection (openstack.connection.Connection) – Connection object of OpenStack SDK.
name_or_id (string) – Name or ID of the project
domain_name_or_id – Domain name or ID of the project. This can be used when there are multiple projects with a same name.
the project object found
openstack.identity.v3.project.Project
argparse Custom Actions
Bases: argparse.Action
A custom action to parse arguments as key=value pairs
Ensures that dest
is a dict and values are strings.
Bases: argparse.Action
A custom action to parse arguments as key=value pairs
Ensures that dest
is a dict and values are lists of strings.
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.
Validate the provided keys.
keys – A list of keys to validate.
Bases: osc_lib.cli.parseractions.MultiKeyValueAction
Custom action to parse arguments from a set of key=value pair
Ensures that dest
is a dict.
Parses dict by separating comma separated string into individual values
Ex. key1=val1,val2,key2=val3 => {“key1”: “val1,val2”, “key2”: “val3”}
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)
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.