2016-11-25 10:55:35 +01:00
|
|
|
========================
|
|
|
|
Team and repository tags
|
|
|
|
========================
|
|
|
|
|
2018-03-02 18:12:17 +08:00
|
|
|
.. image:: https://governance.openstack.org/tc/badges/python-openstackclient.svg
|
|
|
|
:target: https://governance.openstack.org/tc/reference/tags/index.html
|
2016-11-25 10:55:35 +01:00
|
|
|
|
|
|
|
.. Change things from this point on
|
|
|
|
|
2015-03-09 11:48:11 -05:00
|
|
|
===============
|
|
|
|
OpenStackClient
|
|
|
|
===============
|
|
|
|
|
2015-09-25 00:01:49 -04:00
|
|
|
.. image:: https://img.shields.io/pypi/v/python-openstackclient.svg
|
2018-04-20 17:23:30 +07:00
|
|
|
:target: https://pypi.org/project/python-openstackclient/
|
2015-09-25 00:01:49 -04:00
|
|
|
:alt: Latest Version
|
|
|
|
|
2015-03-09 11:48:11 -05:00
|
|
|
OpenStackClient (aka OSC) is a command-line client for OpenStack that brings
|
2019-09-09 11:48:28 -05:00
|
|
|
the command set for Compute, Identity, Image, Network, Object Store and Block
|
|
|
|
Storage APIs together in a single shell with a uniform command structure.
|
2015-03-09 11:48:11 -05:00
|
|
|
|
|
|
|
The primary goal is to provide a unified shell command structure and a common
|
|
|
|
language to describe operations in OpenStack.
|
2012-05-14 17:01:46 -07:00
|
|
|
|
2015-03-09 11:48:11 -05:00
|
|
|
* `PyPi`_ - package installation
|
|
|
|
* `Online Documentation`_
|
2019-10-22 07:35:37 -05:00
|
|
|
* `Storyboard project`_ - bugs and feature requests
|
|
|
|
* `Blueprints`_ - feature specifications (historical only)
|
2015-03-09 11:48:11 -05:00
|
|
|
* `Source`_
|
2018-06-07 17:03:32 +08:00
|
|
|
* `Developer`_ - getting started as a developer
|
|
|
|
* `Contributing`_ - contributing code
|
|
|
|
* `Testing`_ - testing code
|
2015-06-08 11:39:42 -04:00
|
|
|
* IRC: #openstack-sdks on Freenode (irc.freenode.net)
|
2015-03-09 11:48:11 -05:00
|
|
|
* License: Apache 2.0
|
2013-07-29 17:05:02 -05:00
|
|
|
|
2018-04-20 17:23:30 +07:00
|
|
|
.. _PyPi: https://pypi.org/project/python-openstackclient
|
2017-07-24 11:32:22 +08:00
|
|
|
.. _Online Documentation: https://docs.openstack.org/python-openstackclient/latest/
|
2015-03-09 11:48:11 -05:00
|
|
|
.. _Blueprints: https://blueprints.launchpad.net/python-openstackclient
|
2019-10-22 07:35:37 -05:00
|
|
|
.. _`Storyboard project`: https://storyboard.openstack.org/#!/project/openstack/python-openstackclient
|
2019-04-19 23:01:53 -05:00
|
|
|
.. _Source: https://opendev.org/openstack/python-openstackclient
|
2017-07-24 11:32:22 +08:00
|
|
|
.. _Developer: https://docs.openstack.org/project-team-guide/project-setup/python.html
|
|
|
|
.. _Contributing: https://docs.openstack.org/infra/manual/developers.html
|
|
|
|
.. _Testing: https://docs.openstack.org/python-openstackclient/latest/contributor/developing.html#testing
|
2018-06-28 13:27:25 +08:00
|
|
|
.. _Release Notes: https://docs.openstack.org/releasenotes/python-openstackclient
|
2013-07-29 17:05:02 -05:00
|
|
|
|
2012-05-14 17:01:46 -07:00
|
|
|
Getting Started
|
|
|
|
===============
|
|
|
|
|
2014-07-31 00:53:36 -04:00
|
|
|
OpenStack Client can be installed from PyPI using pip::
|
2014-02-21 12:46:07 -06:00
|
|
|
|
|
|
|
pip install python-openstackclient
|
|
|
|
|
|
|
|
There are a few variants on getting help. A list of global options and supported
|
|
|
|
commands is shown with ``--help``::
|
2012-05-14 17:01:46 -07:00
|
|
|
|
2013-01-29 15:12:39 -06:00
|
|
|
openstack --help
|
2012-04-27 11:49:01 -05:00
|
|
|
|
2014-02-21 12:46:07 -06:00
|
|
|
There is also a ``help`` command that can be used to get help text for a specific
|
|
|
|
command::
|
|
|
|
|
|
|
|
openstack help
|
|
|
|
openstack help server create
|
|
|
|
|
2016-07-06 20:27:31 +00:00
|
|
|
If you want to make changes to the OpenStackClient for testing and contribution,
|
|
|
|
make any changes and then run::
|
|
|
|
|
|
|
|
python setup.py develop
|
|
|
|
|
|
|
|
or::
|
|
|
|
|
|
|
|
pip install -e .
|
|
|
|
|
2012-04-18 13:16:39 -05:00
|
|
|
Configuration
|
|
|
|
=============
|
|
|
|
|
2013-01-29 15:12:39 -06:00
|
|
|
The CLI is configured via environment variables and command-line
|
2017-07-24 11:32:22 +08:00
|
|
|
options as listed in https://docs.openstack.org/python-openstackclient/latest/cli/authentication.html.
|
2012-04-18 13:16:39 -05:00
|
|
|
|
2015-03-09 11:48:11 -05:00
|
|
|
Authentication using username/password is most commonly used::
|
2012-04-18 13:16:39 -05:00
|
|
|
|
2012-04-27 11:49:01 -05:00
|
|
|
export OS_AUTH_URL=<url-to-openstack-identity>
|
2017-06-21 16:09:35 -04:00
|
|
|
export OS_IDENTITY_API_VERSION=3
|
2013-07-29 11:11:11 -05:00
|
|
|
export OS_PROJECT_NAME=<project-name>
|
2017-06-21 16:09:35 -04:00
|
|
|
export OS_PROJECT_DOMAIN_NAME=<project-domain-name>
|
2015-03-09 11:48:11 -05:00
|
|
|
export OS_USERNAME=<username>
|
2017-06-21 16:09:35 -04:00
|
|
|
export OS_USER_DOMAIN_NAME=<user-domain-name>
|
2013-01-29 15:12:39 -06:00
|
|
|
export OS_PASSWORD=<password> # (optional)
|
2012-04-18 13:16:39 -05:00
|
|
|
|
|
|
|
The corresponding command-line options look very similar::
|
|
|
|
|
|
|
|
--os-auth-url <url>
|
2017-06-21 16:09:35 -04:00
|
|
|
--os-identity-api-version 3
|
2013-07-29 11:11:11 -05:00
|
|
|
--os-project-name <project-name>
|
2017-06-21 16:09:35 -04:00
|
|
|
--os-project-domain-name <project-domain-name>
|
2015-03-09 11:48:11 -05:00
|
|
|
--os-username <username>
|
2017-06-21 16:09:35 -04:00
|
|
|
--os-user-domain-name <user-domain-name>
|
2012-07-13 14:54:24 -05:00
|
|
|
[--os-password <password>]
|
|
|
|
|
|
|
|
If a password is not provided above (in plaintext), you will be interactively
|
2014-07-02 14:12:44 -07:00
|
|
|
prompted to provide one securely.
|