View all files | ||||
OpenStackClient (OSC) is a command-line client for OpenStack that brings the command set for Compute, Identity, Image, Network, Object Store and Block Storage APIs together in a single shell with a uniform command structure. Support for additional service APIs is provided via plugins.
The primary goal is to provide a unified shell command structure and a common language to describe operations in OpenStack.
OpenStack Client can be installed from PyPI using pip:
You can use --help or the help command to get a list of global options and supported commands:
You can also get help for a specific command:
You can add support for additional services by installing their clients. For example, to add support for the DNS service (designate):
A Dockerfile is provided for your convenience in the repository. You can use this to build your own container images:
For more information the available options and commands, refer to the Users Guide.
OpenStack Client must be configured with authentication information in order to communicate with a given OpenStack cloud. This configuration can be achieved via a clouds.yaml file, a set of environment variables (often shared via an openrc file), a set of command-line options, or a combination of all three. Your cloud provider or deployment tooling will typically provide either a clouds.yaml file or openrc file for you. If using a clouds.yaml file, OpenStack Client expects to find it in one of the following locations:
The options you should set will depend on the configuration of your cloud and the authentication mechanism(s) supported. For example, consider a cloud that supports username/password authentication. Configuration for this cloud using a clouds.yaml file would look like so:
The corresponding environment variables would look very similar:
Likewise, the corresponding command-line options would look very similar:
openstack --os-auth-url <url-to-openstack-identity> --os-region <region> --os-project-name <project-name> --os-project-domain-name <project-domain-name> --os-username <username> --os-user-domain-name <user-domain-name> [--os-password <password>]Note
If a password is not provided above (in plaintext), you will be interactively prompted to provide one securely.
Some clouds use federated authentication. If this is the case, your configuration will be slightly more involved. For example, to configure username/password authentication for a federated user using a clouds.yaml file:
The corresponding environment variables would look very similar:
Likewise, the corresponding command-line options would look very similar:
For more information on configuring authentication, including an overview of the many authentication mechanisms supported, refer to the Authentication guide. For more information on configuration in general, refer to the Configuration guide.
You can clone the repository from opendev.org:
git clone https://opendev.org/openstack/python-openstackclient cd python-openstackclientOpenStack Client uses the same contributor process as other OpenStack projects. For information on this process, including help on setting up you Gerrit account and an overview of the CI process, refer to the OpenStack Contributors Guide.
For more information on contributing to OpenStack Client itself, including guidance on how to design new commands and how to report bugs, refer to the Contributors Guide.