diff options
| author | Stephen Finucane <sfinucan@redhat.com> | 2017-05-30 10:32:19 +0100 |
|---|---|---|
| committer | Steve Martinelli <s.martinelli@gmail.com> | 2017-07-21 14:48:44 +0000 |
| commit | 9cfa12df2adf9265acb82f9c5aa5f3a26dc56bb1 (patch) | |
| tree | 5b1da7e5744c07f77ddac84a9a1d8b64fc961c49 /openstackclient/compute/v2 | |
| parent | 39673217dc88d8e7200ac090ad3d60e5b6703fdd (diff) | |
| download | python-openstackclient-9cfa12df2adf9265acb82f9c5aa5f3a26dc56bb1.tar.gz | |
Start using 'cliff.sphinxext'
'cliff', the command line library used by 'osc_lib' (and, thus,
'python-openstackclient') recently gained a Sphinx extension to
automatically document cliff commands. This allows us to use the
documentation we already have in code instead of duplicating it in the
documentation.
Introduce the use of this, starting with the 'server' commands. This
requires extending the descriptions for two commands to ensure no
information is lost.
Change-Id: If701af8d5a3f78f4b173ceb476dd0c163be4b6ca
Diffstat (limited to 'openstackclient/compute/v2')
| -rw-r--r-- | openstackclient/compute/v2/server.py | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/openstackclient/compute/v2/server.py b/openstackclient/compute/v2/server.py index a991ed45..d4d8c923 100644 --- a/openstackclient/compute/v2/server.py +++ b/openstackclient/compute/v2/server.py @@ -394,10 +394,13 @@ class CreateServer(command.ShowOne): disk_group.add_argument( '--volume', metavar='<volume>', - help=_( - 'Create server using this volume as the boot disk ' - '(name or ID)' - ), + help=_('Create server using this volume as the boot disk (name ' + 'or ID).\n' + 'This option automatically creates a block device mapping ' + 'with a boot index of 0. On many hypervisors (libvirt/kvm ' + 'for example) this will be device vda. Do not create a ' + 'duplicate mapping using --block-device-mapping for this ' + 'volume.'), ) parser.add_argument( '--flavor', @@ -489,8 +492,11 @@ class CreateServer(command.ShowOne): type=_prefix_checked_value('net-id='), help=_("Create a NIC on the server and connect it to network. " "Specify option multiple times to create multiple NICs. " - "For more options on NICs see --nic parameter. " - "network: attach NIC to this network "), + "This is a wrapper for the '--nic net-id=<network>' " + "parameter that provides simple syntax for the standard " + "use case of connecting a new server to a given network. " + "For more advanced use cases, refer to the '--nic' " + "parameter."), ) parser.add_argument( '--port', @@ -500,8 +506,10 @@ class CreateServer(command.ShowOne): type=_prefix_checked_value('port-id='), help=_("Create a NIC on the server and connect it to port. " "Specify option multiple times to create multiple NICs. " - "For more options on NICs see --nic parameter. " - "port: attach NIC this port "), + "This is a wrapper for the '--nic port-id=<pord>' " + "parameter that provides simple syntax for the standard " + "use case of connecting a new server to a given port. For " + "more advanced use cases, refer to the '--nic' parameter."), ) parser.add_argument( '--hint', @@ -1587,7 +1595,13 @@ class RescueServer(command.ShowOne): class ResizeServer(command.Command): - _description = _("Scale server to a new flavor") + _description = _("""Scale server to a new flavor. + +A resize operation is implemented by creating a new server and copying the +contents of the original disk into a new one. It is also a two-step process for +the user: the first is to perform the resize, the second is to either confirm +(verify) success and release the old server, or to declare a revert to release +the new server and restart the old one.""") def get_parser(self, prog_name): parser = super(ResizeServer, self).get_parser(prog_name) |
