OPENSTACK(1)
π openstack π
openstack β OpenStack Command Line Client
OpenStack Command Line
β¨ NAME β¨
okay so bestie, this whole page is about openstack, the OpenStack Command Line Client β aka the OpenStack Command Line. that's it. that's the name. slay.
π SYNOPSIS π
here's how you actually call it, no cap:
openstack [<global-options>] <command> [<command-arguments>]
openstack help <command>
openstack --help
π¦ DESCRIPTION π¦
so openstack gives you one common command-line interface to all the OpenStack APIs. it's generally equivalent to the CLIs that come out of the OpenStack project client libraries, BUT β and this is the glow-up β it's got a distinct and consistent command structure. literally the whole point. consistency. we love her for it.
π AUTHENTICATION METHODS π
openstack uses a scheme that's similar to the OpenStack project CLIs: you feed it your credential info either as environment variables or as options on the command line. the big primary difference? it uses project in the name of the options β OS_PROJECT_NAME/OS_PROJECT_ID β instead of the old tenant-based names. periodt, tenant is over.
export OS_AUTH_URL=<url-to-openstack-identity>
export OS_PROJECT_NAME=<project-name>
export OS_USERNAME=<user-name>
export OS_PASSWORD=<password> # (optional)
openstack can use different types of authentication plugins provided by the keystoneclient library. these are the default plugins on the menu:
token: Authentication with a tokenpassword: Authentication with a username and a passwordopenid: Authentication using the protocol OpenID Connect
go check the keystoneclient library documentation for all the deets on these plugins and their options, plus the complete list of available plugins. and keep in mind bestie β π some plugins might not support all of the functionalities of openstack. like for example the v3unscopedsaml plugin can deliver only unscoped tokens, so some commands might just not be available through this authentication method. it's giving limited.
also!! you can authenticate with Keystone's service token by setting the options --os-token and --os-endpoint (or the environment variables OS_TOKEN and OS_ENDPOINT, respectively). this method takes precedence over authentication plugins. it's the main character.
Note: π«Ά To use thev3unscopedsamlmethod, thelxmlpackage will need to be installed.
π§ AUTHENTICATION USING FEDERATION π§
want federated authentication? your configuration file needs the following and there is no skipping any of it:
export OS_PROJECT_NAME=<project-name>
export OS_PROJECT_DOMAIN_NAME=<project-domain-name>
export OS_AUTH_URL=<url-to-openstack-identity>
export OS_IDENTITY_API_VERSION=3
export OS_AUTH_PLUGIN=openid
export OS_AUTH_TYPE=v3oidcpassword
export OS_USERNAME=<username-in-idp>
export OS_PASSWORD=<password-in-idp>
export OS_IDENTITY_PROVIDER=<the-desired-idp>
export OS_CLIENT_ID=<the-client-id-configured-in-the-idp>
export OS_CLIENT_SECRET=<the-client-secred-configured-in-the-idp>
export OS_OPENID_SCOPE=<the-scopes-of-desired-attributes-to-claim-from-idp>
export OS_PROTOCOL=<the-protocol-used-in-the-apache2-oidc-proxy>
export OS_ACCESS_TOKEN_TYPE=<the-access-token-type-used-by-your-idp>
export OS_DISCOVERY_ENDPOINT=<the-well-known-endpoint-of-the-idp>
export OS_ACCESS_TOKEN_ENDPOINT=<the-idp-access-token-url>
π OPTIONS π
openstack takes global options that control overall behaviour, and command-specific options that control the command operation. most global options have a corresponding environment variable that can also set the value. if both are present, the command-line option takes priority. iconic behaviour.
the environment variable names are derived from the option name by:
- dropping the leading dashes (
--) - converting each embedded dash (
-) to an underscore (_) - and converting to upper case
openstack recognizes the following global options, and yes bestie we are going through all of them:
--os-cloud <cloud-name>βopenstackwill look for aclouds.yamlfile that contains a cloud configuration to use for authentication. See CLOUD CONFIGURATION below for more information. πΈ--os-auth-type <auth-type>β The authentication plugin type to use when connecting to the Identity service. if this option is not set,openstackwill attempt to guess the authentication method to use based on the other options. if this option is set, its version must match--os-identity-api-version.--os-auth-url <auth-url>β Authentication URL--os-endpoint <service-url>β Service ENDPOINT, when using a service token for authentication--os-domain-name <auth-domain-name>β Domain-level authorization scope (by name)--os-domain-id <auth-domain-id>β Domain-level authorization scope (by ID)--os-project-name <auth-project-name>β Project-level authentication scope (by name)--os-project-id <auth-project-id>β Project-level authentication scope (by ID)--os-project-domain-name <auth-project-domain-name>β Domain name containing project--os-project-domain-id <auth-project-domain-id>β Domain ID containing project--os-username <auth-username>β Authentication username--os-password <auth-password>β Authentication password--os-token <token>β Authenticated token or service token--os-user-domain-name <auth-user-domain-name>β Domain name containing user--os-user-domain-id <auth-user-domain-id>β Domain ID containing user--os-trust-id <trust-id>β ID of the trust to use as a trustee user--os-default-domain <auth-domain>β Default domain ID (Default:'default')--os-region-name <auth-region-name>β Authentication region name--os-cacert <ca-bundle-file>β CA certificate bundle file--verify|--insecureβ Verify or ignore server certificate (default: verify)--os-cert <certificate-file>β Client certificate bundle file--os-key <key-file>β Client certificate key file--os-identity-api-version <identity-api-version>β Identity API version (Default: 2.0)--os-XXXX-api-version <XXXX-api-version>β Additional API version options will be available depending on the installed API libraries.--os-interface <interface>β Interface type. Valid options arepublic,adminandinternal.
Note: π«Ά If you switch toopenstackclientfrom project specified clients, like:novaclient,neutronclientand so on, please use--os-interfaceinstead of--os-endpoint-type.
--os-profile <hmac-key>β Performance profiling HMAC key for encrypting context data. This key should be the value of one of the HMAC keys defined in the configuration files of OpenStack services to be traced.--os-beta-commandβ Enable beta commands which are subject to change--log-file <LOGFILE>β Specify a file to log output. Disabled by default.-v,--verboseβ Increase verbosity of output. Can be repeated.-q,--quietβ Suppress output except warnings and errors--debugβ Show tracebacks on errors and set verbosity to debug--helpβ Show help message and exit--timingβ Print API call timing information
π COMMANDS π
want the list of the available commands? say less:
openstack --help
want a description of one specific command?
openstack help <command>
heads up though β the set of commands shown will vary depending on the API versions that are in effect at that time. for example, to force the display of the Identity v3 commands:
openstack --os-identity-api-version 3 --help
completeβ Print the bash completion functions for the current command set. πhelp <command>β Print help for an individual command
additional info on the OpenStackClient command structure and arguments lives in the OpenStackClient Commands wiki page at https://wiki.openstack.org/wiki/OpenStackClient/Commands.
β Command Objects β
the list of command objects is growing longer with the addition of OpenStack project support β it's giving expansion era. πΈ the object names may consist of multiple words to compose a unique name. and occasionally, when multiple APIs have a common name with common overlapping purposes, there will be options to select which object to use, or the API resources will be merged β as in the quota object that has options referring to both Compute and Block Storage quotas. merged. iconic.
π Command Actions π
the actions used by OpenStackClient are defined with specific meaning to provide a consistent behavior for each object. some actions have logical opposite actions, and those pairs will always match for any object that uses them. balance. harmony. we stan a consistent pairing. π«Ά
π CLOUD CONFIGURATION π
okay so bestie, if you're juggling like multiple clouds (iconic, love that for you), you can just keep all their config info in one lil local file instead of retyping flags forever. openstack supports a clouds.yaml config file. no cap. β¨
π Config Files π
openstack goes looking for a file called clouds.yaml in these spots, in this order:
- Current Directory
~/.config/openstack/etc/openstack
The first file found wins. full stop, no takebacks. π
The keys match the openstack global options but without the --os- prefix:
clouds:
devstack:
auth:
auth_url: http://192.168.122.10:5000/
project_name: demo
username: demo
password: 0penstack
region_name: RegionOne
ds-admin:
auth:
auth_url: http://192.168.122.10:5000/
project_name: admin
username: admin
password: 0penstack
region_name: RegionOne
infra:
cloud: rackspace
auth:
project_id: 275610
username: openstack
password: xyzpdq!lazydog
region_name: DFW,ORD,IAD
so in that lil example up there, the auth_url for the rackspace cloud gets pulled from clouds-public.yaml:
public-clouds:
rackspace:
auth:
auth_url: 'https://identity.api.rackspacecloud.com/v2.0/'
π Authentication Settings π
OpenStackClient uses the Keystone authentication plugins, which means the required auth settings aren't always knowable until you've actually picked your auth type. π openstack will try to sniff out a couple of common auth types from the arguments you passed in or from the config file, but if those are incomplete it might genuinely be impossible to tell which auth type you meant. the fix? just use --os-auth-type to force a specific type. always works, never lies. π«Ά
When --os-token and --os-endpoint are both present, the token_endpoint auth type gets selected automatically. And if --os-auth-url and --os-username are present, the password auth type gets selected. it's giving autopilot, and honestly? obsessed. β¨
π Logging Settings π
openstack can record its operation history by logging settings in a configuration file. Recording the user operation means you can identify the change of the resource, and it becomes useful information for troubleshooting. π
See Configuration <#configuration> about Logging Settings for more details.
π NOTES π
The command list displayed in help output reflects the API versions selected. For example, to see Identity v3 commands OS_IDENTITY_API_VERSION must be set to 3. (iykyk β no version, no commands, that's just how it is.) π
π₯ EXAMPLES π₯
Show the detailed information for server appweb01:
openstack \
--os-project-name ExampleCo \
--os-username demo --os-password secret \
--os-auth-url http://localhost:5000:/v2.0 \
server show appweb01
The same but using openid to authenticate in keystone:
openstack \
--os-project-name ExampleCo \
--os-auth-url http://localhost:5000:/v2.0 \
--os-auth-plugin openid \
--os-auth-type v3oidcpassword \
--os-username demo-idp \
--os-password secret-idp \
--os-identity-provider google \
--os-client-id the-id-assigned-to-keystone-in-google \
--os-client-secret 3315162f-2b28-4809-9369-cb54730ac837 \
--os-openid-scope 'openid email profile'\
--os-protocol openid \
--os-access-token-type access_token \
--os-discovery-endpoint https://accounts.google.com/.well-known/openid-configuration \
server show appweb01
The same command if the auth environment variables (OS_AUTH_URL, OS_PROJECT_NAME, OS_USERNAME, OS_PASSWORD) are set:
openstack server show appweb01
Create a new image:
openstack image create \
--disk-format=qcow2 \
--container-format=bare \
--public \
--copy-from http://somewhere.net/foo.img \
foo
π¦ FILES π¦
~/.config/openstack/clouds.yamlβ Configuration file used by the--os-cloudglobal option.~/.config/openstack/clouds-public.yamlβ Configuration file containing public cloud provider information such as authentication URLs and service definitions. The contents of this file should be public and sharable (yes bestie, actually sharable, don't put your secrets in there π).clouds.yamlmay contain references to clouds defined here as shortcuts.~/.openstackβ Placeholder for future local state directory. This directory is intended to be shared among multiple OpenStack-related applications; contents are namespaced with an identifier for the app that owns it. Shared contents (such as~/.openstack/cache) have no prefix and the contents must be portable.
πΈ ENVIRONMENT VARIABLES πΈ
The following environment variables can be set to alter the behaviour of openstack. Most of them have corresponding command-line options that take precedence if set. (flags > env vars, the hierarchy is real π)
OS_CLOUDβ The name of a cloud configuration inclouds.yaml.OS_AUTH_PLUGINβ The authentication plugin to use when connecting to the Identity service, its version must match the Identity API version.OS_AUTH_URLβ Authentication URL.OS_AUTH_TYPEβ Define the authentication plugin that will be used to handle the authentication process. One of the following:v2passwordv2tokenv3passwordv3tokenv3oidcclientcredentialsv3oidcpasswordv3oidcauthorizationcodev3oidcaccesstokenv3totpv3tokenlessauthv3applicationcredentialv3multifactor
OS_ENDPOINTβ Service ENDPOINT (when using the service token).OS_DOMAIN_NAMEβ Domain-level authorization scope (name or ID).OS_PROJECT_NAMEβ Project-level authentication scope (name or ID).OS_PROJECT_DOMAIN_NAMEβ Domain name or ID containing project.OS_USERNAMEβ Authentication username.OS_TOKENβ Authenticated or service token.OS_PASSWORDβ Authentication password.OS_USER_DOMAIN_NAMEβ Domain name or ID containing user.OS_TRUST_IDβ ID of the trust to use as a trustee user.OS_DEFAULT_DOMAINβ Default domain ID (Default:'default').OS_REGION_NAMEβ Authentication region name.OS_CACERTβ CA certificate bundle file.OS_CERTβ Client certificate bundle file.OS_KEYβ Client certificate key file.OS_IDENTITY_API_VERSIONβ Identity API version (Default:2.0).OS_XXXX_API_VERSIONβ Additional API version options will be available depending on the installed API libraries.OS_INTERFACEβ Interface type. Valid options arepublic,adminandinternal.OS_PROTOCOLβ Define the protocol that is used to execute the federated authentication process. It is used in the Keystone authentication URL generation process.OS_IDENTITY_PROVIDERβ Define the identity provider of your federation that will be used. It is used by the Keystone authentication URL generation process. The available Identity Providers can be listed using theopenstack identity provider listcommand.OS_CLIENT_IDβ Configure the CLIENT_ID that the CLI will use to authenticate the application (OpenStack) in the Identity Provider. This value is defined on the identity provider side. Do not confuse with the user ID. πOS_CLIENT_SECRETβ Configure theOS_CLIENT_SECRETthat the CLI will use to authenticate the CLI (OpenStack secret in the identity provider).OS_OPENID_SCOPEβ Configure the attribute scopes that will be claimed by the Service Provider (SP), in this case OpenStack, from the identity provider. These scopes and which attributes each scope contains are defined in the identity provider side. This parameter can receive multiple values separated by space.OS_ACCESS_TOKEN_TYPEβ Define the type of access token that is used in the token introspection process. This variable can assume only one of the states ("access_token"or"id_token").OS_DISCOVERY_ENDPOINTβ Configure the identity provider's discovery URL. This URL will provide a discover document that contains metadata describing the identity provider endpoints. This variable is optional if the variableOS_ACCESS_TOKEN_ENDPOINTis defined.OS_ACCESS_TOKEN_ENDPOINTβ Overrides the value presented in the discovery document retrieved fromOS_DISCOVERY_ENDPOINTURL request. This variable is optional if theOS_DISCOVERY_ENDPOINTis configured.
Note: If you switch to openstackclient from project specified clients, like: novaclient, neutronclient and so on, please useOS_INTERFACEinstead ofOS_ENDPOINT_TYPE. (this one trips EVERYONE up, pls remember it π₯Ί)
π BUGS π
Bug reports are accepted at the python-openstackclient Launchpad project "<https://bugs.launchpad.net/python-openstackclient>". found something cursed? tell the grown-ups. they wanna know. π«Ά
π AUTHORS π
Please refer to the AUTHORS file distributed with OpenStackClient.
β COPYRIGHT β
Copyright 2011-2014 OpenStack Foundation and the authors listed in the AUTHORS file.
π LICENSE π
<http://www.apache.org/licenses/LICENSE-2.0>
π SEE ALSO π
The OpenStackClient page <https://docs.openstack.org/python-openstackclient/latest/> in the OpenStack Docs <https://docs.openstack.org/> contains further documentation. π
The individual OpenStack project CLIs, the OpenStack API references.
Author β OpenStack contributors
Copyright β 2012-2013 OpenStack Foundation
and that's the whole page, bestie!! π this was version 10.3.0, dated Sep 10, 2026, and yeah it's OPENSTACK(1) β go forth and slay your clouds. periodt. π
β¨
π¦ where this page comes from
- ubuntu stonking: python-openstackclient-doc 10.3.0-0ubuntu1 Β· Apache-2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms