Skip to content

Commit f7357b7

Browse files
author
Dean Troyer
committed
Update docs and release notes for 0.4.1 release
Closes-Bug: 1365505 Change-Id: I027d263ba9980715454b034a37733c5ff23fd169
1 parent b7816f3 commit f7357b7

5 files changed

Lines changed: 193 additions & 30 deletions

File tree

doc/source/commands.rst

Lines changed: 50 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,54 @@ They follow the same style as the global options and always appear between
6262
the command and any positional arguments the command requires.
6363

6464

65+
Objects
66+
-------
67+
68+
The objects consist of one or more words to compose a unique name.
69+
Occasionally when multiple APIs have a common name with common
70+
overlapping purposes there will be options to select which object to use, or
71+
the API resources will be merged, as in the ``quota`` object that has options
72+
referring to both Compute and Volume quotas.
73+
74+
* ``access token``: Identity - long-lived OAuth-based token
75+
* ``aggregate``: Compute - a grouping of servers
76+
* ``backup``: Volume - a volume copy
77+
* ``console log``: Compute - a text dump of a server's console
78+
* ``console url``: Compute - a URL to a server's remote console
79+
* ``consumer``: Identity - OAuth-based delegatee
80+
* ``container``: Object Store - a grouping of objects
81+
* ``credential``: Identity - specific to identity providers
82+
* ``domain``: Identity - a grouping of projects
83+
* ``endpoint``: Identity - the base URL used to contact a specific service
84+
* ``extension``: Compute, Identity, Volume - additional APIs available
85+
* ``flavor``: Compute - pre-defined configurations of servers: ram, root disk, etc
86+
* ``group``: Identity - a grouping of users
87+
* ``host``: Compute - the physical computer running a hypervisor
88+
* ``hypervisor``: Compute - the virtual machine manager
89+
* ``identity provider``: Identity - a source of users and authentication
90+
* ``image``: Image - a disk image
91+
* ``ip fixed``: Compute, Network - an internal IP address assigned to a server
92+
* ``ip floating``: Compute, Network - a public IP address that can be mapped to a server
93+
* ``keypair``: Compute - an SSH public key
94+
* ``limits``: Compute, Volume - resource usage limits
95+
* ``module``: internal - installed Python modules in the OSC process
96+
* ``network``: Network - a virtual network for connecting servers and other resources
97+
* ``object``: Object Store - a single file in the Object Store
98+
* ``policy``: Identity - determines authorization
99+
* ``project``: Identity - the owner of a group of resources
100+
* ``quota``: Compute, Volume - limit on resource usage
101+
* ``request token``: Identity - temporary OAuth-based token
102+
* ``role``: Identity - a policy object used to determine authorization
103+
* ``security group``: Compute, Network - groups of network access rules
104+
* ``security group rule``: Compute, Network - the individual rules that define protocol/IP/port access
105+
* ``server``: Compute - a virtual machine instance
106+
* ``service``: Identity - a cloud service
107+
* ``snapshot``: Volume - a point-in-time copy of a volume
108+
* ``token``: Identity - the magic text used to determine access
109+
* ``user``: Identity - individuals using cloud resources
110+
* ``volume``: Volume - block volumes
111+
* ``volume type``: Volume - deployment-specific types of volumes available
112+
65113
Actions
66114
-------
67115

@@ -103,7 +151,7 @@ Implementation
103151

104152
The command structure is designed to support seamless addition of plugin
105153
command modules via ``setuptools`` entry points. The plugin commands must
106-
be subclasses of Cliff's command.Command object. See :doc:`plugins` for
154+
be subclasses of Cliff's ``command.Command`` object. See :doc:`plugins` for
107155
more information.
108156

109157

@@ -117,7 +165,7 @@ supported. For example, to support Identity API v3 there is a group called
117165
``openstack.identity.v3`` that contains the individual commands. The command
118166
entry points have the form::
119167

120-
verb_object = fully.qualified.module.vXX.object:VerbObject
168+
action_object = fully.qualified.module.vXX.object:ActionObject
121169

122170
For example, the ``list user`` command for the Identity API is identified in
123171
``setup.cfg`` with::

doc/source/index.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ OpenStackClient
33
===============
44

55
OpenStackClient (aka OSC) is a command-line client for OpenStack that
6-
unifies the operation
7-
of python-keystoneclient, python-novaclient, python-glanceclient and
8-
python-cinderclient in a single shell with a uniform command structure.
6+
brings the command set for Compute, Identity, Image, Object Store and Volume
7+
APIs together in a single shell with a uniform command structure.
98

109
Contents:
1110

doc/source/man/openstack.rst

Lines changed: 42 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -56,18 +56,24 @@ OPTIONS
5656
:option:`--os-username` <auth-username>
5757
Authentication username
5858

59+
:option:`--os-password` <auth-password>
60+
Authentication password
61+
5962
:option:`--os-user-domain-name` <auth-user-domain-name> | :option:`--os-user-domain-id` <auth-user-domain-id>
6063
Domain name or id containing user
6164

62-
:option:`--os-password` <auth-password>
63-
Authentication password
65+
:option:`--os-user-domain-name` <auth-user-domain-name> | :option:`--os-user-domain-id` <auth-user-domain-id>
66+
Domain name or ID containing user
6467

65-
:option:`--os-region-name` <auth-region-name>
66-
Authentication region name
68+
:option:`--os-trust-id` <trust-id>
69+
id of the trust to use as a trustee user
6770

6871
:option:`--os-default-domain` <auth-domain>
6972
Default domain ID (Default: 'default')
7073

74+
:option:`--os-region-name` <auth-region-name>
75+
Authentication region name
76+
7177
:option:`--os-cacert` <ca-bundle-file>
7278
CA certificate bundle file
7379

@@ -80,9 +86,6 @@ OPTIONS
8086
:option:`--os-XXXX-api-version` <XXXX-api-version>
8187
Additional API version options will be available depending on the installed API libraries.
8288

83-
:option:`--os-trust-id` <trust-id>
84-
id of the trust to use as a trustee user
85-
8689
COMMANDS
8790
========
8891

@@ -94,13 +97,37 @@ To get a description of a specific command::
9497

9598
openstack help <command>
9699

100+
Note that the set of commands shown will vary depending on the API versions
101+
that are in effect at that time. For example, to force the display of the
102+
Identity v3 commands:
103+
104+
openstack --os-identity-api-version 3 --help
97105

98106
:option:`complete`
99107
Print the bash completion functions for the current command set.
100108

101109
:option:`help <command>`
102110
Print help for an individual command
103111

112+
Additional information on the OpenStackClient command structure and arguments
113+
is available in the `OpenStackClient Commands`_ wiki page.
114+
115+
.. _`OpenStackClient Commands`: https://wiki.openstack.org/wiki/OpenStackClient/Commands
116+
117+
Command Objects
118+
---------------
119+
120+
The list of command objects is growing longer with the addition of OpenStack
121+
project support. The object names may consist of multiple words to compose a
122+
unique name. Occasionally when multiple APIs have a common name with common
123+
overlapping purposes there will be options to select which object to use, or
124+
the API resources will be merged, as in the ``quota`` object that has options
125+
referring to both Compute and Volume quotas.
126+
127+
Command Actions
128+
---------------
129+
130+
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.
104131

105132
NOTES
106133
=====
@@ -162,39 +189,30 @@ The following environment variables can be set to alter the behaviour of :progra
162189
:envvar:`OS_USERNAME`
163190
Authentication username
164191

165-
:envvar:`OS_USER_DOMAIN_NAME`
166-
Domain name or id containing user
167-
168192
:envvar:`OS_PASSWORD`
169193
Authentication password
170194

171-
:envvar:`OS_REGION_NAME`
172-
Authentication region name
195+
:envvar:`OS_USER_DOMAIN_NAME`
196+
Domain name or id containing user
197+
198+
:envvar:`OS_TRUST_ID`
199+
id of the trust to use as a trustee user
173200

174201
:envvar:`OS_DEFAULT_DOMAIN`
175202
Default domain ID (Default: 'default')
176203

204+
:envvar:`OS_REGION_NAME`
205+
Authentication region name
206+
177207
:envvar:`OS_CACERT`
178208
CA certificate bundle file
179209

180-
:envvar:`OS_COMPUTE_API_VERSION`
181-
Compute API version (Default: 2)
182-
183210
:envvar:`OS_IDENTITY_API_VERSION`
184211
Identity API version (Default: 2.0)
185212

186-
:envvar:`OS_IMAGE_API_VERSION`
187-
Image API version (Default: 1)
188-
189-
:envvar:`OS_VOLUME_API_VERSION`
190-
Volume API version (Default: 1)
191-
192213
:envvar:`OS_XXXX_API_VERSION`
193214
Additional API version options will be available depending on the installed API libraries.
194215

195-
:envvar:`OS_TRUST_ID`
196-
id of the trust to use as a trustee user
197-
198216
BUGS
199217
====
200218

doc/source/plugins.rst

Lines changed: 54 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ client module.
2020
openstack.cli.extension =
2121
oscplugin = oscplugin.client
2222

23-
The client module must implement the following interface functions:
23+
The client module must define the following top-level variables:
2424

2525
* ``API_NAME`` - A string containing the plugin API name; this is
2626
the name of the entry point declaring the plugin client module
@@ -30,6 +30,9 @@ The client module must implement the following interface functions:
3030
version attribute; this must be a valid Python identifier and
3131
match the destination set in ``build_option_parser()``.
3232
* ``API_VERSIONS`` - A dict mapping a version string to the client class
33+
34+
The client module must implement the following interface functions:
35+
3336
* ``build_option_parser(parser)`` - Hook to add global options to the parser
3437
* ``make_client(instance)`` - Hook to create the client object
3538

@@ -44,3 +47,53 @@ defined for the API version:
4447

4548
Note that OSC defines the group name as :py:mod:`openstack.<api-name>.v<version>`
4649
so the version should not contain the leading 'v' character.
50+
51+
::
52+
53+
DEFAULT_OSCPLUGIN_API_VERSION = '1'
54+
55+
# Required by the OSC plugin interface
56+
API_NAME = 'oscplugin'
57+
API_VERSION_OPTION = 'os_oscplugin_api_version'
58+
API_VERSIONS = {
59+
'1': 'oscplugin.v1.client.Client',
60+
}
61+
62+
# Required by the OSC plugin interface
63+
def make_client(instance):
64+
"""Returns a client to the ClientManager
65+
66+
Called to instantiate the requested client version. instance has
67+
any available auth info that may be required to prepare the client.
68+
69+
:param ClientManager instance: The ClientManager that owns the new client
70+
"""
71+
plugin_client = utils.get_client_class(
72+
API_NAME,
73+
instance._api_version[API_NAME],
74+
API_VERSIONS)
75+
76+
client = plugin_client()
77+
return client
78+
79+
# Required by the OSC plugin interface
80+
def build_option_parser(parser):
81+
"""Hook to add global options
82+
83+
Called from openstackclient.shell.OpenStackShell.__init__()
84+
after the builtin parser has been initialized. This is
85+
where a plugin can add global options such as an API version setting.
86+
87+
:param argparse.ArgumentParser parser: The parser object that has been
88+
initialized by OpenStackShell.
89+
"""
90+
parser.add_argument(
91+
'--os-oscplugin-api-version',
92+
metavar='<oscplugin-api-version>',
93+
default=utils.env(
94+
'OS_OSCPLUGIN_API_VERSION',
95+
default=DEFAULT_OSCPLUGIN_API_VERSION),
96+
help='OSC Plugin API version, default=' +
97+
DEFAULT_OSCPLUGIN_API_VERSION +
98+
' (Env: OS_OSCPLUGIN_API_VERSION)')
99+
return parser

doc/source/releases.rst

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,51 @@
22
Release Notes
33
=============
44

5+
0.4.1 (08 Sep 2014)
6+
===================
7+
8+
* Bug 1319381_: remove insecure keyring support
9+
* Bug 1317478_: fix ``project create`` for domain admin
10+
* Bug 1317485_: fix ``project list`` for domain admins
11+
* Bug 1281888_: add region filter to ``endpoint list`` command
12+
* Bug 1337245_: add ``user password set`` command
13+
* Bug 1337684_: add ``extension list --compute``
14+
* Bug 1337687_: add ``extension list --volume``
15+
* Bug 1343658_: fix ``container list`` command
16+
* Bug 1343659_: add network command help text
17+
* Bug 1348475_: add fields to ``image list`` output
18+
* Bug 1351121_: v3 ``endpoint set`` should not require service option
19+
* Bug 1352119_: v2 ``user create`` response error
20+
* Bug 1353788_: test_file_resource() failure
21+
* Bug 1364540_: load_keyring() exception fixed in bug 1319381_
22+
* Bug 1365505_: domain information not in help output
23+
* fix ``security group list`` for non-admin
24+
* fix ``server add security group``
25+
* add ``container create`` and ``container delete`` commands
26+
* add ``object create`` and ``object delete`` commands
27+
* add initial support for global ``--timing`` options (similar to nova CLI)
28+
* complete Python 3 compatibility
29+
* fix ``server resize` command
30+
* add authentication via ``--os-trust-id`` for Identity v3
31+
* Add initial support for Network API, ``network create|delete|list|show``
32+
33+
.. _1319381: https://bugs.launchpad.net/bugs/1319381
34+
.. _1317478: https://bugs.launchpad.net/bugs/1317478
35+
.. _1317485: https://bugs.launchpad.net/bugs/1317485
36+
.. _1281888: https://bugs.launchpad.net/bugs/1281888
37+
.. _1337245: https://bugs.launchpad.net/bugs/1337245
38+
.. _1337684: https://bugs.launchpad.net/bugs/1337684
39+
.. _1337687: https://bugs.launchpad.net/bugs/1337687
40+
.. _1343658: https://bugs.launchpad.net/bugs/1343658
41+
.. _1343659: https://bugs.launchpad.net/bugs/1343659
42+
.. _1348475: https://bugs.launchpad.net/bugs/1348475
43+
.. _1351121: https://bugs.launchpad.net/bugs/1351121
44+
.. _1352119: https://bugs.launchpad.net/bugs/1352119
45+
.. _1353788: https://bugs.launchpad.net/bugs/1353788
46+
.. _1364540: https://bugs.launchpad.net/bugs/1364540
47+
.. _1365505: https://bugs.launchpad.net/bugs/1365505
48+
49+
550
0.4.0 (20 Jun 2014)
651
===================
752

0 commit comments

Comments
 (0)