# openstackclient.compute.v2 package

## Submodules

## openstackclient.compute.v2.agent module

Agent action implementations

class openstackclient.compute.v2.agent.CreateAgent(app: App, app_args: Namespace | None, cmd_name: str | None = None)

  Bases: `ShowOne`

  Create compute agent.

  The compute agent functionality is hypervisor specific and is only supported by the XenAPI hypervisor driver. It was removed from nova in the 23.0.0 (Wallaby) release.

  get_parser(prog_name)

    Return an `argparse.ArgumentParser`.

  log: logging.Logger = <Logger openstackclient.compute.v2.agent.CreateAgent (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.compute.v2.agent.DeleteAgent(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)

  Bases: `Command`

  Delete compute agent(s).

  The compute agent functionality is hypervisor specific and is only supported by the XenAPI hypervisor driver. It was removed from nova in the 23.0.0 (Wallaby) release.

  get_parser(prog_name)

    Return an `argparse.ArgumentParser`.

  log: logging.Logger = <Logger openstackclient.compute.v2.agent.DeleteAgent (WARNING)>
  take_action(parsed_args)

    Override to do something useful.

    The returned value will be returned by the program.

class openstackclient.compute.v2.agent.ListAgent(app: App, app_args: Namespace | None, cmd_name: str | None = None)

  Bases: `Lister`

  List compute agents.

  The compute agent functionality is hypervisor specific and is only supported by the XenAPI hypervisor driver. It was removed from nova in the 23.0.0 (Wallaby) release.

  get_parser(prog_name)

    Return an `argparse.ArgumentParser`.

  log: logging.Logger = <Logger openstackclient.compute.v2.agent.ListAgent (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.compute.v2.agent.SetAgent(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)

  Bases: `Command`

  Set compute agent properties.

  The compute agent functionality is hypervisor-specific and is only supported by the XenAPI hypervisor driver. It was removed from nova in the 23.0.0 (Wallaby) release.

  get_parser(prog_name)

    Return an `argparse.ArgumentParser`.

  log: logging.Logger = <Logger openstackclient.compute.v2.agent.SetAgent (WARNING)>
  take_action(parsed_args)

    Override to do something useful.

    The returned value will be returned by the program.

## openstackclient.compute.v2.aggregate module

Compute v2 Aggregate action implementations

class openstackclient.compute.v2.aggregate.AddAggregateHost(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.compute.v2.aggregate.AddAggregateHost (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.compute.v2.aggregate.CacheImageForAggregate(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.compute.v2.aggregate.CacheImageForAggregate (WARNING)>
  take_action(parsed_args)

    Override to do something useful.

    The returned value will be returned by the program.

class openstackclient.compute.v2.aggregate.CreateAggregate(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.compute.v2.aggregate.CreateAggregate (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.compute.v2.aggregate.DeleteAggregate(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.compute.v2.aggregate.DeleteAggregate (WARNING)>
  take_action(parsed_args)

    Override to do something useful.

    The returned value will be returned by the program.

class openstackclient.compute.v2.aggregate.ListAggregate(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.compute.v2.aggregate.ListAggregate (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.compute.v2.aggregate.RemoveAggregateHost(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.compute.v2.aggregate.RemoveAggregateHost (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.compute.v2.aggregate.SetAggregate(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.compute.v2.aggregate.SetAggregate (WARNING)>
  take_action(parsed_args)

    Override to do something useful.

    The returned value will be returned by the program.

class openstackclient.compute.v2.aggregate.ShowAggregate(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.compute.v2.aggregate.ShowAggregate (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.compute.v2.aggregate.UnsetAggregate(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.compute.v2.aggregate.UnsetAggregate (WARNING)>
  take_action(parsed_args)

    Override to do something useful.

    The returned value will be returned by the program.

## openstackclient.compute.v2.console module

Compute v2 Console action implementations

class openstackclient.compute.v2.console.ShowConsoleLog(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.compute.v2.console.ShowConsoleLog (WARNING)>
  take_action(parsed_args)

    Override to do something useful.

    The returned value will be returned by the program.

class openstackclient.compute.v2.console.ShowConsoleURL(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.compute.v2.console.ShowConsoleURL (WARNING)>
  take_action(parsed_args)

    Run command.

    Return a tuple containing the column names and an iterable containing the data to be listed.

## openstackclient.compute.v2.console_connection module

Compute v2 Console auth token implementations.

class openstackclient.compute.v2.console_connection.ShowConsoleConnectionInformation(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.compute.v2.console_connection.ShowConsoleConnectionInformation (WARNING)>
  take_action(parsed_args)

    Run command.

    Return a tuple containing the column names and an iterable containing the data to be listed.

## openstackclient.compute.v2.flavor module

Flavor action implementations

class openstackclient.compute.v2.flavor.CreateFlavor(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.compute.v2.flavor.CreateFlavor (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.compute.v2.flavor.DeleteFlavor(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.compute.v2.flavor.DeleteFlavor (WARNING)>
  take_action(parsed_args)

    Override to do something useful.

    The returned value will be returned by the program.

class openstackclient.compute.v2.flavor.ListFlavor(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.compute.v2.flavor.ListFlavor (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.compute.v2.flavor.SetFlavor(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.compute.v2.flavor.SetFlavor (WARNING)>
  take_action(parsed_args)

    Override to do something useful.

    The returned value will be returned by the program.

class openstackclient.compute.v2.flavor.ShowFlavor(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.compute.v2.flavor.ShowFlavor (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.compute.v2.flavor.UnsetFlavor(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.compute.v2.flavor.UnsetFlavor (WARNING)>
  take_action(parsed_args)

    Override to do something useful.

    The returned value will be returned by the program.

## openstackclient.compute.v2.host module

Host action implementations

class openstackclient.compute.v2.host.ListHost(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.compute.v2.host.ListHost (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.compute.v2.host.SetHost(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.compute.v2.host.SetHost (WARNING)>
  take_action(parsed_args)

    Override to do something useful.

    The returned value will be returned by the program.

class openstackclient.compute.v2.host.ShowHost(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.compute.v2.host.ShowHost (WARNING)>
  take_action(parsed_args)

    Run command.

    Return a tuple containing the column names and an iterable containing the data to be listed.

## openstackclient.compute.v2.hypervisor module

Hypervisor action implementations

class openstackclient.compute.v2.hypervisor.ListHypervisor(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.compute.v2.hypervisor.ListHypervisor (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.compute.v2.hypervisor.ShowHypervisor(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.compute.v2.hypervisor.ShowHypervisor (WARNING)>
  take_action(parsed_args)

    Run command.

    Return a tuple containing the column names and an iterable containing the data to be listed.

## openstackclient.compute.v2.hypervisor_stats module

Hypervisor Stats action implementations

class openstackclient.compute.v2.hypervisor_stats.ShowHypervisorStats(app: App, app_args: Namespace | None, cmd_name: str | None = None)

  Bases: `ShowOne`

  log: logging.Logger = <Logger openstackclient.compute.v2.hypervisor_stats.ShowHypervisorStats (WARNING)>
  take_action(parsed_args)

    Run command.

    Return a tuple containing the column names and an iterable containing the data to be listed.

## openstackclient.compute.v2.keypair module

Keypair action implementations

class openstackclient.compute.v2.keypair.CreateKeypair(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.compute.v2.keypair.CreateKeypair (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.compute.v2.keypair.DeleteKeypair(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.compute.v2.keypair.DeleteKeypair (WARNING)>
  take_action(parsed_args)

    Override to do something useful.

    The returned value will be returned by the program.

class openstackclient.compute.v2.keypair.Keypair(private_key, public_key)

  Bases: `tuple`

  private_key

    Alias for field number 0

  public_key

    Alias for field number 1

class openstackclient.compute.v2.keypair.ListKeypair(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.compute.v2.keypair.ListKeypair (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.compute.v2.keypair.ShowKeypair(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.compute.v2.keypair.ShowKeypair (WARNING)>
  take_action(parsed_args)

    Run command.

    Return a tuple containing the column names and an iterable containing the data to be listed.

## openstackclient.compute.v2.server module

Compute v2 Server action implementations

class openstackclient.compute.v2.server.AddFixedIP(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.compute.v2.server.AddFixedIP (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.compute.v2.server.AddFloatingIP(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)

  Bases: `NetworkAndComputeCommand`

  log: logging.Logger = <Logger openstackclient.compute.v2.server.AddFloatingIP (WARNING)>
  take_action_compute(client, parsed_args)

    Override to do something useful.

  take_action_network(client, parsed_args)

    Override to do something useful.

  update_parser_common(parser)

    Default is no updates to parser.

class openstackclient.compute.v2.server.AddNetwork(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.compute.v2.server.AddNetwork (WARNING)>
  take_action(parsed_args)

    Override to do something useful.

    The returned value will be returned by the program.

class openstackclient.compute.v2.server.AddPort(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.compute.v2.server.AddPort (WARNING)>
  take_action(parsed_args)

    Override to do something useful.

    The returned value will be returned by the program.

class openstackclient.compute.v2.server.AddServerSecurityGroup(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.compute.v2.server.AddServerSecurityGroup (WARNING)>
  take_action(parsed_args)

    Override to do something useful.

    The returned value will be returned by the program.

class openstackclient.compute.v2.server.AddServerVolume(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.compute.v2.server.AddServerVolume (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.compute.v2.server.AddressesColumn(value: _T)

  Bases: `FormattableColumn`[`Any`]

  Generate a formatted string of a server’s addresses.

  human_readable()

    Return a basic human readable version of the data.

  machine_readable()

    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.

class openstackclient.compute.v2.server.AutoNICAction(option_strings, dest, help=None)

  Bases: `Action`

class openstackclient.compute.v2.server.BDMAction(option_strings, dest, **kwargs)

  Bases: `MultiKeyValueAction`

  validate_keys(keys)

    Validate the provided keys.

    Parameters:

      keys – A list of keys to validate.

class openstackclient.compute.v2.server.BDMLegacyAction(option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None, deprecated=False)

  Bases: `Action`

class openstackclient.compute.v2.server.ConfirmMigration(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)

  Bases: `ResizeConfirm`

  log: logging.Logger = <Logger openstackclient.compute.v2.server.ConfirmMigration (WARNING)>

class openstackclient.compute.v2.server.CreateServer(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.compute.v2.server.CreateServer (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.compute.v2.server.CreateServerDump(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)

  Bases: `Command`

  Create a dump file in server(s)

  Trigger crash dump in server(s) with features like kdump in Linux. It will create a dump file in the server(s) dumping the server(s)’ memory, and also crash the server(s). This is contingent on guest operating system support, and the location of the dump file inside the guest will depend on the exact guest operating system.

  This command requires `--os-compute-api-version` 2.17 or greater.

  get_parser(prog_name)

    Return an `argparse.ArgumentParser`.

  log: logging.Logger = <Logger openstackclient.compute.v2.server.CreateServerDump (WARNING)>
  take_action(parsed_args)

    Override to do something useful.

    The returned value will be returned by the program.

class openstackclient.compute.v2.server.DeleteServer(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.compute.v2.server.DeleteServer (WARNING)>
  take_action(parsed_args)

    Override to do something useful.

    The returned value will be returned by the program.

class openstackclient.compute.v2.server.EvacuateServer(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.compute.v2.server.EvacuateServer (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.compute.v2.server.HostColumn(value: _T)

  Bases: `FormattableColumn`[`str` | `None`]

  Generate a formatted string of a hostname.

  human_readable()

    Return a basic human readable version of the data.

class openstackclient.compute.v2.server.ListServer(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.compute.v2.server.ListServer (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.compute.v2.server.LockServer(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.compute.v2.server.LockServer (WARNING)>
  take_action(parsed_args)

    Override to do something useful.

    The returned value will be returned by the program.

class openstackclient.compute.v2.server.MigrateConfirm(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)

  Bases: `ResizeConfirm`

  log: logging.Logger = <Logger openstackclient.compute.v2.server.MigrateConfirm (WARNING)>
  take_action(parsed_args)

    Override to do something useful.

    The returned value will be returned by the program.

class openstackclient.compute.v2.server.MigrateRevert(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)

  Bases: `ResizeRevert`

  log: logging.Logger = <Logger openstackclient.compute.v2.server.MigrateRevert (WARNING)>
  take_action(parsed_args)

    Override to do something useful.

    The returned value will be returned by the program.

class openstackclient.compute.v2.server.MigrateServer(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.compute.v2.server.MigrateServer (WARNING)>
  take_action(parsed_args)

    Override to do something useful.

    The returned value will be returned by the program.

class openstackclient.compute.v2.server.NICAction(option_strings, dest, help=None, metavar=None, key=None)

  Bases: `Action`

class openstackclient.compute.v2.server.NoneNICAction(option_strings, dest, help=None)

  Bases: `Action`

class openstackclient.compute.v2.server.PauseServer(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.compute.v2.server.PauseServer (WARNING)>
  take_action(parsed_args)

    Override to do something useful.

    The returned value will be returned by the program.

class openstackclient.compute.v2.server.PercentAction(option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None)

  Bases: `Action`

class openstackclient.compute.v2.server.PowerStateColumn(value: _T)

  Bases: `FormattableColumn`[`int`]

  Generate a formatted string of a server’s power state.

  human_readable()

    Return a basic human readable version of the data.

  power_states = ['NOSTATE', 'Running', '', 'Paused', 'Shutdown', '', 'Crashed', 'Suspended']

class openstackclient.compute.v2.server.RebootServer(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.compute.v2.server.RebootServer (WARNING)>
  take_action(parsed_args)

    Override to do something useful.

    The returned value will be returned by the program.

class openstackclient.compute.v2.server.RebuildServer(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.compute.v2.server.RebuildServer (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.compute.v2.server.RemoveFixedIP(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.compute.v2.server.RemoveFixedIP (WARNING)>
  take_action(parsed_args)

    Override to do something useful.

    The returned value will be returned by the program.

class openstackclient.compute.v2.server.RemoveFloatingIP(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)

  Bases: `NetworkAndComputeCommand`

  log: logging.Logger = <Logger openstackclient.compute.v2.server.RemoveFloatingIP (WARNING)>
  take_action_compute(client, parsed_args)

    Override to do something useful.

  take_action_network(client, parsed_args)

    Override to do something useful.

  update_parser_common(parser)

    Default is no updates to parser.

class openstackclient.compute.v2.server.RemoveNetwork(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.compute.v2.server.RemoveNetwork (WARNING)>
  take_action(parsed_args)

    Override to do something useful.

    The returned value will be returned by the program.

class openstackclient.compute.v2.server.RemovePort(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.compute.v2.server.RemovePort (WARNING)>
  take_action(parsed_args)

    Override to do something useful.

    The returned value will be returned by the program.

class openstackclient.compute.v2.server.RemoveServerSecurityGroup(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.compute.v2.server.RemoveServerSecurityGroup (WARNING)>
  take_action(parsed_args)

    Override to do something useful.

    The returned value will be returned by the program.

class openstackclient.compute.v2.server.RemoveServerVolume(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.compute.v2.server.RemoveServerVolume (WARNING)>
  take_action(parsed_args)

    Override to do something useful.

    The returned value will be returned by the program.

class openstackclient.compute.v2.server.RescueServer(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.compute.v2.server.RescueServer (WARNING)>
  take_action(parsed_args)

    Override to do something useful.

    The returned value will be returned by the program.

class openstackclient.compute.v2.server.ResizeConfirm(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.compute.v2.server.ResizeConfirm (WARNING)>
  take_action(parsed_args)

    Override to do something useful.

    The returned value will be returned by the program.

class openstackclient.compute.v2.server.ResizeRevert(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.compute.v2.server.ResizeRevert (WARNING)>
  take_action(parsed_args)

    Override to do something useful.

    The returned value will be returned by the program.

class openstackclient.compute.v2.server.ResizeServer(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.compute.v2.server.ResizeServer (WARNING)>
  take_action(parsed_args)

    Override to do something useful.

    The returned value will be returned by the program.

class openstackclient.compute.v2.server.RestoreServer(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.compute.v2.server.RestoreServer (WARNING)>
  take_action(parsed_args)

    Override to do something useful.

    The returned value will be returned by the program.

class openstackclient.compute.v2.server.ResumeServer(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.compute.v2.server.ResumeServer (WARNING)>
  take_action(parsed_args)

    Override to do something useful.

    The returned value will be returned by the program.

class openstackclient.compute.v2.server.RevertMigration(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)

  Bases: `ResizeRevert`

  log: logging.Logger = <Logger openstackclient.compute.v2.server.RevertMigration (WARNING)>

class openstackclient.compute.v2.server.SetServer(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)

  Bases: `Command`

  static ask_user_yesno(msg)

    Ask user Y/N question

    Parameters:

      msg (str) – question text

    Return bool:

      User choice

  get_parser(prog_name)

    Return an `argparse.ArgumentParser`.

  log: logging.Logger = <Logger openstackclient.compute.v2.server.SetServer (WARNING)>
  take_action(parsed_args)

    Override to do something useful.

    The returned value will be returned by the program.

class openstackclient.compute.v2.server.ShelveServer(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)

  Bases: `Command`

  Shelve and optionally offload server(s).

  Shelving a server creates a snapshot of the server and stores this snapshot before shutting down the server. This shelved server can then be offloaded or deleted from the host, freeing up remaining resources on the host, such as network interfaces. Shelved servers can be unshelved, restoring the server from the snapshot. Shelving is therefore useful where users wish to retain the UUID and IP of a server, without utilizing other resources or disks.

  Most clouds are configured to automatically offload shelved servers immediately or after a small delay. For clouds where this is not configured, or where the delay is larger, offloading can be manually specified. This is an admin-only operation by default.

  get_parser(prog_name)

    Return an `argparse.ArgumentParser`.

  log: logging.Logger = <Logger openstackclient.compute.v2.server.ShelveServer (WARNING)>
  take_action(parsed_args)

    Override to do something useful.

    The returned value will be returned by the program.

class openstackclient.compute.v2.server.ShowServer(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.compute.v2.server.ShowServer (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.compute.v2.server.SshServer(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.compute.v2.server.SshServer (WARNING)>
  take_action(parsed_args)

    Override to do something useful.

    The returned value will be returned by the program.

class openstackclient.compute.v2.server.StartServer(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.compute.v2.server.StartServer (WARNING)>
  take_action(parsed_args)

    Override to do something useful.

    The returned value will be returned by the program.

class openstackclient.compute.v2.server.StopServer(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.compute.v2.server.StopServer (WARNING)>
  take_action(parsed_args)

    Override to do something useful.

    The returned value will be returned by the program.

class openstackclient.compute.v2.server.SuspendServer(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.compute.v2.server.SuspendServer (WARNING)>
  take_action(parsed_args)

    Override to do something useful.

    The returned value will be returned by the program.

class openstackclient.compute.v2.server.UnlockServer(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.compute.v2.server.UnlockServer (WARNING)>
  take_action(parsed_args)

    Override to do something useful.

    The returned value will be returned by the program.

class openstackclient.compute.v2.server.UnpauseServer(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.compute.v2.server.UnpauseServer (WARNING)>
  take_action(parsed_args)

    Override to do something useful.

    The returned value will be returned by the program.

class openstackclient.compute.v2.server.UnrescueServer(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.compute.v2.server.UnrescueServer (WARNING)>
  take_action(parsed_args)

    Override to do something useful.

    The returned value will be returned by the program.

class openstackclient.compute.v2.server.UnsetServer(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.compute.v2.server.UnsetServer (WARNING)>
  take_action(parsed_args)

    Override to do something useful.

    The returned value will be returned by the program.

class openstackclient.compute.v2.server.UnshelveServer(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.compute.v2.server.UnshelveServer (WARNING)>
  take_action(parsed_args)

    Override to do something useful.

    The returned value will be returned by the program.

## openstackclient.compute.v2.server_backup module

Compute v2 Server action implementations

class openstackclient.compute.v2.server_backup.CreateServerBackup(app: App, app_args: Namespace | None, cmd_name: str | None = None)

  Bases: `ShowOne`

  IMAGE_API_VERSIONS = {'1': 'openstackclient.image.v1.image', '2': 'openstackclient.image.v2.image'}
  get_parser(prog_name)

    Return an `argparse.ArgumentParser`.

  log: logging.Logger = <Logger openstackclient.compute.v2.server_backup.CreateServerBackup (WARNING)>
  take_action(parsed_args)

    Run command.

    Return a tuple containing the column names and an iterable containing the data to be listed.

## openstackclient.compute.v2.server_event module

Compute v2 Server operation event implementations

class openstackclient.compute.v2.server_event.ListServerEvent(app: App, app_args: Namespace | None, cmd_name: str | None = None)

  Bases: `Lister`

  List recent events of a server.

  Specify `--os-compute-api-version 2.21` or higher to show events for a deleted server, specified by ID only.

  get_parser(prog_name)

    Return an `argparse.ArgumentParser`.

  log: logging.Logger = <Logger openstackclient.compute.v2.server_event.ListServerEvent (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.compute.v2.server_event.ServerActionEventColumn(value: _T)

  Bases: `FormattableColumn`

  Custom formatter for server action events.

  Format the `ServerActionEvent` objects as we’d like.

  human_readable()

    Return a basic human readable version of the data.

  machine_readable()

    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.

class openstackclient.compute.v2.server_event.ShowServerEvent(app: App, app_args: Namespace | None, cmd_name: str | None = None)

  Bases: `ShowOne`

  Show server event details.

  Specify `--os-compute-api-version 2.21` or higher to show event details for a deleted server, specified by ID only. Specify `--os-compute-api-version 2.51` or higher to show event details for non-admin users.

  get_parser(prog_name)

    Return an `argparse.ArgumentParser`.

  log: logging.Logger = <Logger openstackclient.compute.v2.server_event.ShowServerEvent (WARNING)>
  take_action(parsed_args)

    Run command.

    Return a tuple containing the column names and an iterable containing the data to be listed.

openstackclient.compute.v2.server_event.is_uuid_like(value) → bool

  Returns validation of a value as a UUID.

  Parameters:

    val (string) – Value to verify

  Returns:

    bool

  Changed in version 1.1.1: Support non-lowercase UUIDs.

## openstackclient.compute.v2.server_group module

Compute v2 Server Group action implementations

class openstackclient.compute.v2.server_group.CreateServerGroup(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.compute.v2.server_group.CreateServerGroup (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.compute.v2.server_group.DeleteServerGroup(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.compute.v2.server_group.DeleteServerGroup (WARNING)>
  take_action(parsed_args)

    Override to do something useful.

    The returned value will be returned by the program.

class openstackclient.compute.v2.server_group.ListServerGroup(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.compute.v2.server_group.ListServerGroup (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.compute.v2.server_group.ShowServerGroup(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.compute.v2.server_group.ShowServerGroup (WARNING)>
  take_action(parsed_args)

    Run command.

    Return a tuple containing the column names and an iterable containing the data to be listed.

## openstackclient.compute.v2.server_image module

Compute v2 Server action implementations

class openstackclient.compute.v2.server_image.CreateServerImage(app: App, app_args: Namespace | None, cmd_name: str | None = None)

  Bases: `ShowOne`

  IMAGE_API_VERSIONS = {'1': 'openstackclient.image.v1.image', '2': 'openstackclient.image.v2.image'}
  get_parser(prog_name)

    Return an `argparse.ArgumentParser`.

  log: logging.Logger = <Logger openstackclient.compute.v2.server_image.CreateServerImage (WARNING)>
  take_action(parsed_args)

    Run command.

    Return a tuple containing the column names and an iterable containing the data to be listed.

## openstackclient.compute.v2.server_migration module

Compute v2 Server Migration action implementations

class openstackclient.compute.v2.server_migration.AbortMigration(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)

  Bases: `Command`

  Cancel an ongoing live migration.

  This command requires `--os-compute-api-version` 2.24 or greater.

  get_parser(prog_name)

    Return an `argparse.ArgumentParser`.

  log: logging.Logger = <Logger openstackclient.compute.v2.server_migration.AbortMigration (WARNING)>
  take_action(parsed_args)

    Override to do something useful.

    The returned value will be returned by the program.

class openstackclient.compute.v2.server_migration.ForceCompleteMigration(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)

  Bases: `Command`

  Force an ongoing live migration to complete.

  This command requires `--os-compute-api-version` 2.22 or greater.

  get_parser(prog_name)

    Return an `argparse.ArgumentParser`.

  log: logging.Logger = <Logger openstackclient.compute.v2.server_migration.ForceCompleteMigration (WARNING)>
  take_action(parsed_args)

    Override to do something useful.

    The returned value will be returned by the program.

class openstackclient.compute.v2.server_migration.ListMigration(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.compute.v2.server_migration.ListMigration (WARNING)>
  print_migrations(parsed_args, compute_client, migrations)
  take_action(parsed_args)

    Run command.

    Return a tuple containing the column names and an iterable containing the data to be listed.

class openstackclient.compute.v2.server_migration.ShowMigration(app: App, app_args: Namespace | None, cmd_name: str | None = None)

  Bases: `ShowOne`

  Show an in-progress live migration for a given server.

  Note that it is not possible to show cold migrations or completed live-migrations. Use ‘openstack server migration list’ to get details for these.

  get_parser(prog_name)

    Return an `argparse.ArgumentParser`.

  log: logging.Logger = <Logger openstackclient.compute.v2.server_migration.ShowMigration (WARNING)>
  take_action(parsed_args)

    Run command.

    Return a tuple containing the column names and an iterable containing the data to be listed.

## openstackclient.compute.v2.server_volume module

Compute v2 Server action implementations

class openstackclient.compute.v2.server_volume.ListServerVolume(app: App, app_args: Namespace | None, cmd_name: str | None = None)

  Bases: `Lister`

  List all the volumes attached to a server.

  get_parser(prog_name)

    Return an `argparse.ArgumentParser`.

  log: logging.Logger = <Logger openstackclient.compute.v2.server_volume.ListServerVolume (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.compute.v2.server_volume.SetServerVolume(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)

  Bases: `Command`

  Update a volume attachment on the server.

  get_parser(prog_name)

    Return an `argparse.ArgumentParser`.

  log: logging.Logger = <Logger openstackclient.compute.v2.server_volume.SetServerVolume (WARNING)>
  take_action(parsed_args)

    Override to do something useful.

    The returned value will be returned by the program.

class openstackclient.compute.v2.server_volume.UpdateServerVolume(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)

  Bases: `SetServerVolume`

  DEPRECATED: Use ‘server volume set’ instead.

  log: logging.Logger = <Logger openstackclient.compute.v2.server_volume.UpdateServerVolume (WARNING)>

## openstackclient.compute.v2.service module

Service action implementations

class openstackclient.compute.v2.service.DeleteService(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.compute.v2.service.DeleteService (WARNING)>
  take_action(parsed_args)

    Override to do something useful.

    The returned value will be returned by the program.

class openstackclient.compute.v2.service.ListService(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.compute.v2.service.ListService (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.compute.v2.service.SetService(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.compute.v2.service.SetService (WARNING)>
  take_action(parsed_args)

    Override to do something useful.

    The returned value will be returned by the program.

## openstackclient.compute.v2.usage module

Usage action implementations

class openstackclient.compute.v2.usage.CountColumn(value: _T)

  Bases: `FormattableColumn`[`Collection`[`Any`]]

  human_readable()

    Return a basic human readable version of the data.

class openstackclient.compute.v2.usage.FloatColumn(value: _T)

  Bases: `FormattableColumn`[`float`]

  human_readable()

    Return a basic human readable version of the data.

class openstackclient.compute.v2.usage.ListUsage(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.compute.v2.usage.ListUsage (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.compute.v2.usage.ProjectColumn(value, project_cache=None)

  Bases: `FormattableColumn`[`str`]

  Formattable column for project column.

  Unlike the parent FormattableColumn class, the initializer of the class takes project_cache as the second argument. `osc_lib.utils.get_item_properties` instantiates `FormattableColumn` objects with a single parameter, the column value, so you need to pass a partially initialized class like `functools.partial(ProjectColumn, project_cache)` to use this.

  human_readable()

    Return a basic human readable version of the data.

class openstackclient.compute.v2.usage.ShowUsage(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.compute.v2.usage.ShowUsage (WARNING)>
  take_action(parsed_args)

    Run command.

    Return a tuple containing the column names and an iterable containing the data to be listed.

## Module contents

this page last updated: 2026-04-01 09:44:20

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.