summaryrefslogtreecommitdiff
path: root/doc/source/commands.rst
diff options
context:
space:
mode:
authorDean Troyer <dtroyer@gmail.com>2013-12-05 13:23:44 -0600
committerDean Troyer <dtroyer@gmail.com>2013-12-05 17:29:35 -0600
commit4f1ebe8069a9b8e78f05eb4b3a0ccb7069b7c1f3 (patch)
tree4254767d5014b678e0ec5570a8ca19bf2bd726b4 /doc/source/commands.rst
parente06e1a2cce0dbe9f7fd7e64467af73e7456a2aa5 (diff)
downloadpython-openstackclient-4f1ebe8069a9b8e78f05eb4b3a0ccb7069b7c1f3.tar.gz
Update docs for plugins and release notes
* Fill out the existing command and man page * Add a plugins page. * Begin the release notes for 0.3.0 Change-Id: I4527fed28a10a9d79fc8f6c1d925a4bf0d0a7a36
Diffstat (limited to 'doc/source/commands.rst')
-rw-r--r--doc/source/commands.rst37
1 files changed, 25 insertions, 12 deletions
diff --git a/doc/source/commands.rst b/doc/source/commands.rst
index 7cd05951..0b93c64d 100644
--- a/doc/source/commands.rst
+++ b/doc/source/commands.rst
@@ -10,15 +10,24 @@ OpenStackClient has a consistent and predictable format for all of its commands.
Commands take the form::
- openstack [<global-options>] <object> <action> [<second-object>] [<command-arguments>]
+ openstack [<global-options>] <object-1> <action> [<object-2>] [<command-arguments>]
-* All long options names begin with two dashes ('--') and use a single dash ('-') internally between words (--like-this)
+* All long options names begin with two dashes ('--') and use a single dash
+ ('-') internally between words (--like-this). Underscores ('_') are not used
+ in option names.
Global Options
--------------
-Global options are global in the sense that the apply to every command invocation regardless of action to be performed. This includes authentication credentials and API version selection. Most global options have a corresponding environment variable that may also be used to set the value. If both are present, the command-line option takes priority. 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.
+Global options are global in the sense that they apply to every command
+invocation regardless of action to be performed. They include authentication
+credentials and API version selection. Most global options have a corresponding
+environment variable that may also be used to set the value. If both are
+present, the command-line option takes priority. 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.
For example, ``--os-username`` can be set from the environment via ``OS_USERNAME``.
@@ -26,9 +35,12 @@ For example, ``--os-username`` can be set from the environment via ``OS_USERNAME
Command Object(s) and Action
----------------------------
-Commands consist of an object described by one or more words followed by an action.
-In commands requiring two objects be acted upon, the primary object appears ahead of the action and the secondary object appears after the action.
-If both objects have cooresponding positional arguments the arguments appear in the same order as the objects. In badly formed English it is expressed as "(Take) object1 (and perform) action (using) object2 (to it)."
+Commands consist of an object described by one or more words followed by
+an action. Commands that require two objects have the primary object ahead
+of the action and the secondary object after the action. Any positional
+arguments identifying the objects shall appear in the same order as the
+objects. In badly formed English it is expressed as "(Take) object1
+(and perform) action (using) object2 (to it)."
::
@@ -44,22 +56,23 @@ Examples::
Command Arguments and Options
-----------------------------
-Commands have their own set of options distinct from the global options. They follow the
-same style as the global options and always appear between the command and any positional arguemnts the command may require.
+Each command may have its own set of options distinct from the global options.
+They follow the same style as the global options and always appear between
+the command and any positional arguments the command requires.
Implementation
==============
-The command structure is designed to support seamless addition of extension
-command modules via entry points. The extensions are assumed to be subclasses
-of Cliff's command.Command object.
+The command structure is designed to support seamless addition of plugin
+command modules via ``setuptools`` entry points. The plugin commands must
+be subclasses of Cliff's command.Command object.
Command Entry Points
--------------------
-Commands are added to the client using setuptools's entry points in ``setup.cfg``.
+Commands are added to the client using ``setuptools`` entry points in ``setup.cfg``.
There is a single common group ``openstack.cli`` for commands that are not versioned,
and a group for each combination of OpenStack API and version that is
supported. For example, to support Identity API v3 there is a group called