openstackclient.common package¶
Submodules¶
openstackclient.common.availability_zone module¶
Availability Zone action implementations
- class openstackclient.common.availability_zone.ListAvailabilityZone(app: App, app_args: Namespace | None, cmd_name: str | None = None)¶
- Bases: - Lister- get_parser(prog_name)¶
- Return an - argparse.ArgumentParser.
 - log: logging.Logger = <Logger openstackclient.common.availability_zone.ListAvailabilityZone (WARNING)>¶
 - take_action(parsed_args)¶
- Run command. - Return a tuple containing the column names and an iterable containing the data to be listed. 
 
openstackclient.common.clientmanager module¶
Manage access to the clients, including authenticating when needed.
- class openstackclient.common.clientmanager.ClientManager(cli_options=None, api_version=None, pw_func=None)¶
- Bases: - ClientManager- Manages access to API clients, including authentication - Wrap osc_lib’s ClientManager to maintain compatibility for the existing plugin V2 interface. Some currently private attributes become public in osc-lib so we need to maintain a transition period. - PLUGIN_INTERFACE_VERSION = '2'¶
 - is_compute_endpoint_enabled()¶
- Check if Compute endpoint is enabled 
 - is_network_endpoint_enabled()¶
- Check if the network endpoint is enabled 
 - is_volume_endpoint_enabled(volume_client=None)¶
- Check if volume endpoint is enabled 
 - setup_auth()¶
- Set up authentication 
 
- openstackclient.common.clientmanager.build_plugin_option_parser(parser)¶
- Add plugin options to the parser 
- openstackclient.common.clientmanager.get_plugin_modules(group)¶
- Find plugin entry points 
openstackclient.common.configuration module¶
Configuration action implementations
- class openstackclient.common.configuration.ShowConfiguration(app: App, app_args: Namespace | None, cmd_name: str | None = None)¶
- Bases: - ShowOne- auth_required = False¶
 - get_parser(prog_name)¶
- Return an - argparse.ArgumentParser.
 - log: logging.Logger = <Logger openstackclient.common.configuration.ShowConfiguration (WARNING)>¶
 - take_action(parsed_args)¶
- Return a two-part tuple with a tuple of column names and a tuple of values. 
 
openstackclient.common.envvars module¶
- openstackclient.common.envvars.bool_from_str(value, strict=False)¶
- openstackclient.common.envvars.boolenv(*vars, default=False)¶
- Search for the first defined of possibly many bool-like env vars. - Returns the first environment variable defined in vars, or returns the default. - Parameters:
- vars – Arbitrary strings to search for. Case sensitive. 
- default – The default to return if no value found. 
 
- Returns:
- A boolean corresponding to the value found, else the default if no value found. 
 
openstackclient.common.extension module¶
Extension action implementations
- class openstackclient.common.extension.ListExtension(app: App, app_args: Namespace | None, cmd_name: str | None = None)¶
- Bases: - Lister- get_parser(prog_name)¶
- Return an - argparse.ArgumentParser.
 - log: logging.Logger = <Logger openstackclient.common.extension.ListExtension (WARNING)>¶
 - take_action(parsed_args)¶
- Run command. - Return a tuple containing the column names and an iterable containing the data to be listed. 
 
- class openstackclient.common.extension.ShowExtension(app: App, app_args: Namespace | None, cmd_name: str | None = None)¶
- Bases: - ShowOne- get_parser(prog_name)¶
- Return an - argparse.ArgumentParser.
 - log: logging.Logger = <Logger openstackclient.common.extension.ShowExtension (WARNING)>¶
 - take_action(parsed_args)¶
- Return a two-part tuple with a tuple of column names and a tuple of values. 
 
openstackclient.common.limits module¶
Limits Action Implementation
- class openstackclient.common.limits.ShowLimits(app: App, app_args: Namespace | None, cmd_name: str | None = None)¶
- Bases: - Lister- get_parser(prog_name)¶
- Return an - argparse.ArgumentParser.
 - log: logging.Logger = <Logger openstackclient.common.limits.ShowLimits (WARNING)>¶
 - take_action(parsed_args)¶
- Run command. - Return a tuple containing the column names and an iterable containing the data to be listed. 
 
openstackclient.common.module module¶
Module action implementation
- class openstackclient.common.module.ListCommand(app: App, app_args: Namespace | None, cmd_name: str | None = None)¶
- Bases: - Lister- auth_required = False¶
 - get_parser(prog_name)¶
- Return an - argparse.ArgumentParser.
 - log: logging.Logger = <Logger openstackclient.common.module.ListCommand (WARNING)>¶
 - take_action(parsed_args)¶
- Run command. - Return a tuple containing the column names and an iterable containing the data to be listed. 
 
- class openstackclient.common.module.ListModule(app: App, app_args: Namespace | None, cmd_name: str | None = None)¶
- Bases: - ShowOne- auth_required = False¶
 - get_parser(prog_name)¶
- Return an - argparse.ArgumentParser.
 - log: logging.Logger = <Logger openstackclient.common.module.ListModule (WARNING)>¶
 - take_action(parsed_args)¶
- Return a two-part tuple with a tuple of column names and a tuple of values. 
 
openstackclient.common.pagination module¶
- openstackclient.common.pagination.add_marker_pagination_option_to_parser(parser)¶
- Add marker-based pagination options to the parser. - APIs that use marker-based paging use the marker and limit query parameters to paginate through items in a collection. - Marker-based pagination is often used in cases where the length of the total set of items is either changing frequently, or where the total length might not be known upfront. 
- openstackclient.common.pagination.add_offset_pagination_option_to_parser(parser)¶
- Add offset-based pagination options to the parser. - APIs that use offset-based paging use the offset and limit query parameters to paginate through items in a collection. - Offset-based pagination is often used where the list of items is of a fixed and predetermined length. 
openstackclient.common.progressbar module¶
openstackclient.common.project_cleanup module¶
- class openstackclient.common.project_cleanup.ProjectCleanup(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)¶
- Bases: - Command- get_parser(prog_name)¶
- Return an - argparse.ArgumentParser.
 - log: logging.Logger = <Logger openstackclient.common.project_cleanup.ProjectCleanup (WARNING)>¶
 - take_action(parsed_args)¶
- Override to do something useful. - The returned value will be returned by the program. 
 
- openstackclient.common.project_cleanup.ask_user_yesno(msg)¶
- Ask user Y/N question - Parameters:
- msg (str) – question text 
- Return bool:
- User choice 
 
openstackclient.common.quota module¶
Quota action implementations
- class openstackclient.common.quota.DeleteQuota(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)¶
- Bases: - Command- get_parser(prog_name)¶
- Return an - argparse.ArgumentParser.
 - log: logging.Logger = <Logger openstackclient.common.quota.DeleteQuota (WARNING)>¶
 - take_action(parsed_args)¶
- Override to do something useful. - The returned value will be returned by the program. 
 
- class openstackclient.common.quota.ListQuota(app: App, app_args: Namespace | None, cmd_name: str | None = None)¶
- Bases: - Lister- List quotas for all projects with non-default quota values. - Empty output means all projects are using default quotas, which can be inspected with ‘openstack quota show –default’. - get_parser(prog_name)¶
- Return an - argparse.ArgumentParser.
 - log: logging.Logger = <Logger openstackclient.common.quota.ListQuota (WARNING)>¶
 - take_action(parsed_args)¶
- Run command. - Return a tuple containing the column names and an iterable containing the data to be listed. 
 
- class openstackclient.common.quota.SetQuota(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)¶
- Bases: - NetDetectionMixin,- Command- get_parser(prog_name)¶
- Return an - argparse.ArgumentParser.
 - log: logging.Logger = <Logger openstackclient.common.quota.SetQuota (WARNING)>¶
 - take_action(parsed_args)¶
- Override to do something useful. - The returned value will be returned by the program. 
 
- class openstackclient.common.quota.ShowQuota(app: App, app_args: Namespace | None, cmd_name: str | None = None)¶
- Bases: - Lister- get_parser(prog_name)¶
- Return an - argparse.ArgumentParser.
 - log: logging.Logger = <Logger openstackclient.common.quota.ShowQuota (WARNING)>¶
 - take_action(parsed_args)¶
- Run command. - Return a tuple containing the column names and an iterable containing the data to be listed. 
 
- openstackclient.common.quota.get_compute_quotas(app, project_id, *, detail=False, default=False)¶
- openstackclient.common.quota.get_network_quotas(app, project_id, *, detail=False, default=False)¶
- openstackclient.common.quota.get_project(app, project)¶
- openstackclient.common.quota.get_volume_quotas(app, project_id, *, detail=False, default=False)¶
openstackclient.common.versions module¶
Versions Action Implementation
- class openstackclient.common.versions.ShowVersions(app: App, app_args: Namespace | None, cmd_name: str | None = None)¶
- Bases: - Lister- get_parser(prog_name)¶
- Return an - argparse.ArgumentParser.
 - log: logging.Logger = <Logger openstackclient.common.versions.ShowVersions (WARNING)>¶
 - take_action(parsed_args)¶
- Run command. - Return a tuple containing the column names and an iterable containing the data to be listed. 
 
