Common Commands

availability zone

An availability zone is a logical partition of cloud block storage, compute and network services.

availability zone list

List availability zones and their status

openstack availability zone list
    [--sort-column SORT_COLUMN]
    [--sort-ascending | --sort-descending]
    [--compute]
    [--network]
    [--volume]
    [--long]
--sort-column SORT_COLUMN

specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated

--sort-ascending

sort the column(s) in ascending order

--sort-descending

sort the column(s) in descending order

--compute

List compute availability zones

--network

List network availability zones

--volume

List volume availability zones

--long

List additional fields in output

command

Installed commands in the OSC process.

command list

List recognized commands by group

openstack command list
    [--sort-column SORT_COLUMN]
    [--sort-ascending | --sort-descending]
    [--group <group-keyword>]
--sort-column SORT_COLUMN

specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated

--sort-ascending

sort the column(s) in ascending order

--sort-descending

sort the column(s) in descending order

--group <group-keyword>

Show commands filtered by a command group, for example: identity, volume, compute, image, network and other keywords

complete

The complete command is inherited from the python-cliff library, it can be used to generate a bash-completion script. Currently, the command will generate a script for bash versions 3 or 4. The bash-completion script is printed directly to standard out.

Typical usage for this command is:

openstack complete | sudo tee /etc/bash_completion.d/osc.bash_completion > /dev/null

It is highly recommended to install python-openstackclient from a package (apt-get or yum). In some distributions the package bash-completion is shipped as dependency, and the openstack complete command will be run as a post-install action, however not every distribution include this dependency and you might need to install bash-completion package to enable autocomplete feature.

complete

print bash completion command

openstack complete

configuration

configuration show

Display configuration details

openstack configuration show [--mask | --unmask]
--mask

Attempt to mask passwords (default)

--unmask

Show password in clear text

extension

Many OpenStack server APIs include API extensions that enable additional functionality.

extension list

List API extensions

openstack extension list
    [--sort-column SORT_COLUMN]
    [--sort-ascending | --sort-descending]
    [--compute]
    [--identity]
    [--network]
    [--volume]
    [--long]
--sort-column SORT_COLUMN

specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated

--sort-ascending

sort the column(s) in ascending order

--sort-descending

sort the column(s) in descending order

--compute

List extensions for the Compute API

--identity

List extensions for the Identity API (only supported by v2)

--network

List extensions for the Network API

--volume

List extensions for the Block Storage API

--long

List additional fields in output

extension show

Show API extension

openstack extension show <extension>
extension

Extension to display. Currently, only network extensions are supported. (Name or Alias)

limits

The Compute and Block Storage APIs have resource usage limits.

limits show

Show compute and block storage limits

openstack limits show
    [--sort-column SORT_COLUMN]
    [--sort-ascending | --sort-descending]
    (--absolute | --rate)
    [--reserved]
    [--project <project>]
    [--project-domain <project-domain>]
--sort-column SORT_COLUMN

specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated

--sort-ascending

sort the column(s) in ascending order

--sort-descending

sort the column(s) in descending order

--absolute

Show absolute limits

--rate

Show rate limits. This is not supported by the compute service since the 12.0.0 (Liberty) release and is only supported by the block storage service when the rate-limiting middleware is enabled. It is therefore a no-op in most deployments.

--reserved

Include reservations count (only valid with –absolute)

--project <project>

Show limits for a specific project (name or ID) (only valid with –absolute)

--project-domain <project-domain>

Domain the project belongs to (name or ID). This can be used in case collisions between project names exist.

module

Installed Python modules in the OSC process.

module list

List module versions

openstack module list [--all]
--all

Show all modules that have version information

project cleanup

Clean resources associated with a specific project based on OpenStackSDK implementation

project cleanup

Clean resources associated with a project

openstack project cleanup
    [--dry-run | --auto-approve]
    (--auth-project | --project <project>)
    [--created-before <YYYY-MM-DDTHH24:MI:SS>]
    [--updated-before <YYYY-MM-DDTHH24:MI:SS>]
    [--skip-resource <resource>]
    [--project-domain <project-domain>]
--dry-run

List a project’s resources but do not delete them

--auto-approve

Delete resources without asking for confirmation

--auth-project

Delete resources of the project used to authenticate

--project <project>

Project to clean (name or ID)

--created-before <YYYY-MM-DDTHH24:MI:SS>

Only delete resources created before the given time

--updated-before <YYYY-MM-DDTHH24:MI:SS>

Only delete resources updated before the given time

--skip-resource <resource>

Skip cleanup of specific resource (repeat if necessary)

--project-domain <project-domain>

Domain the project belongs to (name or ID). This can be used in case collisions between project names exist.

quota

Resource quotas appear in multiple APIs, OpenStackClient presents them as a single object with multiple properties.

quota delete

Delete configured quota for a project and revert to defaults.

openstack quota delete
    [--all | --compute | --volume | --network]
    <project>
--all

Delete project quotas for all services (default)

--compute

Delete compute quotas for the project (including network quotas when using nova-network)

--volume

Delete volume quotas for the project

--network

Delete network quotas for the project

project

Delete quotas for this project (name or ID)

quota list

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’.

openstack quota list
    [--sort-column SORT_COLUMN]
    [--sort-ascending | --sort-descending]
    (--compute | --volume | --network)
--sort-column SORT_COLUMN

specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated

--sort-ascending

sort the column(s) in ascending order

--sort-descending

sort the column(s) in descending order

--compute

List compute quota

--volume

List volume quota

--network

List network quota

quota set

Set quotas for project or class

openstack quota set
    [--class | --default]
    [--cores <cores>]
    [--injected-file-size <injected-file-size>]
    [--injected-path-size <injected-path-size>]
    [--injected-files <injected-files>]
    [--instances <instances>]
    [--key-pairs <key-pairs>]
    [--properties <properties>]
    [--ram <ram>]
    [--server-group-members <server-group-members>]
    [--server-groups <server-groups>]
    [--backups <backups>]
    [--backup-gigabytes <backup-gigabytes>]
    [--gigabytes <gigabytes>]
    [--groups <groups>]
    [--per-volume-gigabytes <per-volume-gigabytes>]
    [--snapshots <snapshots>]
    [--volumes <volumes>]
    [--floating-ips <floating-ips>]
    [--secgroup-rules <secgroup-rules>]
    [--secgroups <secgroups>]
    [--networks <networks>]
    [--subnets <subnets>]
    [--ports <ports>]
    [--routers <routers>]
    [--router-routes <router-routes>]
    [--rbac-policies <rbac-policies>]
    [--subnetpools <subnetpools>]
    [--volume-type <volume-type>]
    [--force | --no-force]
    [<project/class>]
--class

Deprecated Set quotas for <class>. Deprecated as quota classes were never fully implemented and only the default class is supported. (compute and volume only)

--default

Set default quotas for <project>

--cores <cores>

New value for the cores quota

--injected-file-size <injected-file-size>

New value for the injected-file-size quota

--injected-path-size <injected-path-size>

New value for the injected-path-size quota

--injected-files <injected-files>

New value for the injected-files quota

--instances <instances>

New value for the instances quota

--key-pairs <key-pairs>

New value for the key-pairs quota

--properties <properties>

New value for the properties quota

--ram <ram>

New value for the ram quota

--server-group-members <server-group-members>

New value for the server-group-members quota

--server-groups <server-groups>

New value for the server-groups quota

--backups <backups>

New value for the backups quota

--backup-gigabytes <backup-gigabytes>

New value for the backup-gigabytes quota

--gigabytes <gigabytes>

New value for the gigabytes quota

--groups <groups>

New value for the groups quota

--per-volume-gigabytes <per-volume-gigabytes>

New value for the per-volume-gigabytes quota

--snapshots <snapshots>

New value for the snapshots quota

--volumes <volumes>

New value for the volumes quota

--floating-ips <floating-ips>

New value for the floating-ips quota

--secgroup-rules <secgroup-rules>

New value for the secgroup-rules quota

--secgroups <secgroups>

New value for the secgroups quota

--networks <networks>

New value for the networks quota

--subnets <subnets>

New value for the subnets quota

--ports <ports>

New value for the ports quota

--routers <routers>

New value for the routers quota

--router-routes <router-routes>

New value for the router-routes quota

--rbac-policies <rbac-policies>

New value for the rbac-policies quota

--subnetpools <subnetpools>

New value for the subnetpools quota

--volume-type <volume-type>

Set quotas for a specific <volume-type>

--force

Force quota update (only supported by compute and network)

--no-force

Do not force quota update (only supported by compute and network) (default)

project/class

Set quotas for this project or class (name or ID) (defaults to current project)

quota show

Show quotas for project or class.

Specify --os-compute-api-version 2.50 or higher to see server-groups and server-group-members output for a given quota class.

openstack quota show
    [--sort-column SORT_COLUMN]
    [--sort-ascending | --sort-descending]
    [--default | --usage]
    [--all | --compute | --volume | --network]
    [<project>]
--sort-column SORT_COLUMN

specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated

--sort-ascending

sort the column(s) in ascending order

--sort-descending

sort the column(s) in descending order

--default

Show default quotas for <project>

--usage

Show details about quotas usage

--all

Show quotas for all services

--compute

Show compute quota

--volume

Show volume quota

--network

Show network quota

project

Show quotas for this project (name or ID) (defaults to current project)

versions

Get a list of every version of every service in a given cloud.

versions show

Show available versions of services

openstack versions show
    [--sort-column SORT_COLUMN]
    [--sort-ascending | --sort-descending]
    [--all-interfaces | --interface <interface>]
    [--region-name <region_name>]
    [--service <service>]
    [--status <status>]
--sort-column SORT_COLUMN

specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated

--sort-ascending

sort the column(s) in ascending order

--sort-descending

sort the column(s) in descending order

--all-interfaces

Show values for all interfaces

--interface <interface>

Show versions for a specific interface.

--region-name <region_name>

Show versions for a specific region.

--service <service>

Show versions for a specific service. The argument should be either an exact match to what is in the catalog or a known official value or alias from service-types-authority (https://service-types.openstack.org/)

--status <status>

Show versions for a specific status. Valid values are:

  • SUPPORTED

  • CURRENT

  • DEPRECATED

  • EXPERIMENTAL