Browse Source

Adding the doc of message in CLI

The doc of message is missing in zaqarclient.
So this patch will add it and also remove the unused docs for
other resources.

Change-Id: I55c745a81226487292220edfb629ca4f7dfd95d7
Closes-Bug: #1893145
Signed-off-by: wanghao <sxmatch1986@gmail.com>
tags/2.0.1^0
wanghao 1 month ago
parent
commit
8f0b9f5b07
6 changed files with 73 additions and 572 deletions
  1. +3
    -1
      doc/source/command-line.rst
  2. +2
    -111
      doc/source/command/claim.rst
  3. +62
    -0
      doc/source/command/message.rst
  4. +2
    -140
      doc/source/command/pool.rst
  5. +2
    -189
      doc/source/command/queue.rst
  6. +2
    -131
      doc/source/command/subscription.rst

+ 3
- 1
doc/source/command-line.rst View File

@@ -5,7 +5,8 @@ Command-line
This chapter documents the usage of Zaqar Client Command Line with API v2.0.

Zaqar client now support some kinds of resources or actions: ``queue``,
``claim``, ``subscription``, ``pool``, ``flavor``, ``ping``, ``health``.
``message``, ``claim``, ``subscription``, ``pool``, ``flavor``, ``ping``,
``health``.

Click the Link below for the details.

@@ -13,6 +14,7 @@ Click the Link below for the details.
:maxdepth: 1

command/queue
command/message
command/claim
command/pool
command/flavor


+ 2
- 111
doc/source/command/claim.rst View File

@@ -1,57 +1,21 @@
Claim
=====

For help on a specific :command:`openstack claim` command, enter:
For help on a specific :command:`openstack messaging claim` command, enter:

.. code-block:: console

$ openstack claim COMMAND -h/--help
$ openstack messaging claim COMMAND -h/--help

The eight commands:

.. code-block:: console

claim create
messaging claim create
claim query
messaging claim query
claim release
messaging claim release
claim renew
messaging claim renew

.. _openstack_claim_create:

openstack claim create
----------------------

.. code-block:: console

usage: openstack claim create [-h] [-f {csv,json,table,value,yaml}]
[-c COLUMN] [--max-width <integer>] [--noindent]
[--quote {all,minimal,none,nonnumeric}]
[--ttl <ttl>] [--grace <grace>]
[--limit <limit>]
<queue_name>

Create claim and return a list of claimed messages.

**Positional arguments:**

``<queue_name>``
Name of the queue to be claim.

**Optional arguments:**

``--ttl <ttl>``
Time to live in seconds for claim.

``--grace <grace>``
The message grace period in seconds.

``--limit <limit>``
Claims a set of messages, up to limit.

.. _openstack_messaging_claim_create:

openstack messaging claim create
@@ -84,28 +48,6 @@ Create claim and return a list of claimed messages.
``--limit <limit>``
Claims a set of messages, up to limit.

.. _openstack_claim_query:

openstack claim query
---------------------

.. code-block:: console

usage: openstack claim query [-h] [-f {csv,json,table,value,yaml}] [-c COLUMN]
[--max-width <integer>] [--noindent]
[--quote {all,minimal,none,nonnumeric}]
<queue_name> <claim_id>

Display claim details.

**Positional arguments:**

``<queue_name>``
Name of the claimed queue.

``<claim_id>``
ID of the claim.

.. _openstack_messaging_claim_query:

openstack messaging claim query
@@ -128,26 +70,6 @@ Display claim details.
``<claim_id>``
ID of the claim.


.. _openstack_claim_release:

openstack claim release
-----------------------

.. code-block:: console

usage: openstack claim release [-h] <queue_name> <claim_id>

Delete a claim.

**Positional arguments:**

``<queue_name>``
Name of the claimed queue.

``<claim_id>``
Claim ID to delete.

.. _openstack_messaging_claim_release:

openstack messaging claim release
@@ -167,37 +89,6 @@ Delete a claim.
``<claim_id>``
Claim ID to delete.

.. _openstack_claim_renew:

openstack claim renew
---------------------

.. code-block:: console

usage: openstack claim renew [-h] [-f {csv,json,table,value,yaml}] [-c COLUMN]
[--max-width <integer>] [--noindent]
[--quote {all,minimal,none,nonnumeric}]
[--ttl <ttl>] [--grace <grace>]
<queue_name> <claim_id>

Renew a claim.

**Positional arguments:**

``<queue_name>``
Name of the claimed queue.

``<claim_id>``
Claim ID.

**Optional arguments:**

``--ttl <ttl>``
Time to live in seconds for claim.

``--grace <grace>``
The message grace period in seconds.

.. _openstack_messaging_claim_renew:

openstack messaging claim renew


+ 62
- 0
doc/source/command/message.rst View File

@@ -0,0 +1,62 @@
Health
======

For help on a specific :command:`openstack messaging message` command, enter:

.. code-block:: console

$ openstack messaging message COMMAND -h/--help

The one command:

.. code-block:: console

messaging message list
messaging message post

.. _openstack_messaging_message_list:

openstack messaging message list
--------------------------------

.. code-block:: console

usage: openstack messaging message list [-h] [-f {csv,json,table,value,yaml}]
[-c COLUMN]
[--quote {all,minimal,none,nonnumeric}]
[--noindent] [--max-width <integer>]
[--fit-width] [--print-empty]
[--sort-column SORT_COLUMN]
[--message-ids <message_ids>]
[--limit <limit>] [--echo]
[--include-claimed]
[--include-delayed]
[--client-id <client_id>]
<queue_name>

List all of the messages in a queue.

**Positional arguments:**

``<queue_name>``
Name of the queue.

.. _openstack_messaging_message_post:

openstack messaging message post
--------------------------------

.. code-block:: console

usage: openstack messaging message post [-h] [--client-id <client_id>]
<queue_name> <messages>

Post the messages to a queue.

**Positional arguments:**

``<queue_name>``
Name of the queue.

``<messages>``
messages. It should be json like. For example: '[{"body": "msg", "ttl": 60}]'

+ 2
- 140
doc/source/command/pool.rst View File

@@ -1,62 +1,22 @@
Pool
====

For help on a specific :command:`openstack pool` command, enter:
For help on a specific :command:`openstack messaging pool` command, enter:

.. code-block:: console

$ openstack pool COMMAND -h/--help
$ openstack messaging pool COMMAND -h/--help

The ten commands:

.. code-block:: console

pool create
messaging pool create
pool delete
messaging pool delete
pool list
messaging pool list
pool show
messaging pool show
pool update
messaging pool update

.. _openstack_pool_create:

openstack pool create
---------------------

.. code-block:: console

usage: openstack pool create [-h] [-f {json,shell,table,value,yaml}]
[-c COLUMN] [--max-width <integer>] [--noindent]
[--prefix PREFIX] [--pool_group <pool_group>]
[--pool_options <pool_options>]
<pool_name> <pool_uri> <pool_weight>

Create a pool.

**Positional arguments:**

``<pool_name>``
Name of the pool.

``<pool_uri>``
Storage engine URI.

``<pool_weight>``
weight of the pool.

**Optional arguments:**

``--pool_group <pool_group>``
Group of the pool.

``--pool_options <pool_options>``
An optional request component related to
storage-specific options.

.. _openstack_messaging_pool_create:

openstack messaging pool create
@@ -92,22 +52,6 @@ Create a pool.
An optional request component related to
storage-specific options.

.. _openstack_pool_delete:

openstack pool delete
---------------------

.. code-block:: console

usage: openstack pool delete [-h] <pool_name>

Delete a pool.

**Positional arguments:**

``<pool_name>``
Name of the pool.

.. _openstack_messaging_pool_delete:

openstack messaging pool delete
@@ -124,32 +68,6 @@ Delete a pool.
``<pool_name>``
Name of the pool.

.. _openstack_pool_list:

openstack pool list
-------------------

.. code-block:: console

usage: openstack pool list [-h] [-f {csv,json,table,value,yaml}] [-c COLUMN]
[--max-width <integer>] [--noindent]
[--quote {all,minimal,none,nonnumeric}]
[--marker <pool_name>] [--limit <limit>]
[--detailed <detailed>]

List available Pools.

**Optional arguments:**

``--marker <pool_name>``
Pool's paging marker.

``--limit <limit>``
Page size limit.

``--detailed <detailed>``
Detailed output.

.. _openstack_messaging_pool_list:

openstack messaging pool list
@@ -176,25 +94,6 @@ List available Pools.
``--detailed <detailed>``
Detailed output.

.. _openstack_pool_show:

openstack pool show
-------------------

.. code-block:: console

usage: openstack pool show [-h] [-f {json,shell,table,value,yaml}] [-c COLUMN]
[--max-width <integer>] [--noindent]
[--prefix PREFIX]
<pool_name>

Display pool details.

**Positional arguments:**

``<pool_name>``
Pool to display (name).

.. _openstack_messaging_pool_show:

openstack messaging pool show
@@ -214,43 +113,6 @@ Display pool details.
``<pool_name>``
Pool to display (name).

.. _openstack_pool_update:

openstack pool update
---------------------

.. code-block:: console

usage: openstack pool update [-h] [-f {json,shell,table,value,yaml}]
[-c COLUMN] [--max-width <integer>] [--noindent]
[--prefix PREFIX] [--pool_uri <pool_uri>]
[--pool_weight <pool_weight>]
[--pool_group <pool_group>]
[--pool_options <pool_options>]
<pool_name>

Update a pool attribute.

**Positional arguments:**

``<pool_name>``
Name of the pool.

**Optional arguments:**

``--pool_uri <pool_uri>``
Storage engine URI.

``--pool_weight <pool_weight>``
Weight of the pool.

``--pool_group <pool_group>``
Group of the pool.

``--pool_options <pool_options>``
An optional request component related to
storage-specific options.

.. _openstack_messaging_pool_update:

openstack messaging pool update


+ 2
- 189
doc/source/command/queue.rst View File

@@ -1,50 +1,24 @@
Queue
=====

For help on a specific :command:`openstack queue` command, enter:
For help on a specific :command:`openstack messaging queue` command, enter:

.. code-block:: console

$ openstack queue COMMAND -h/--help
$ openstack messaging queue COMMAND -h/--help

The fourteen commands:

.. code-block:: console

queue create
messaging queue create
queue delete
messaging queue delete
queue get metadata
messaging queue get metadata
queue list
messaging queue list
queue set metadata
messaging queue set metadata
queue signed url
messaging queue signed url
queue stats
messaging queue stats

.. _openstack_queue_create:

openstack queue create
----------------------

.. code-block:: console

usage: openstack queue create [-h] [-f {json,shell,table,value,yaml}]
[-c COLUMN] [--max-width <integer>] [--noindent]
[--prefix PREFIX]
<queue_name>

Create a queue.

**Positional arguments:**

``<queue_name>``
Name of the queue.

.. _openstack_messaging_queue_create:

openstack messaging queue create
@@ -61,22 +35,6 @@ Create a queue.

**Positional arguments:**

``<queue_name>``
Name of the queue.

.. _openstack_queue_delete:

openstack queue delete
----------------------

.. code-block:: console

usage: openstack queue delete [-h] <queue_name>

Delete a queue.

**Positional arguments:**

``<queue_name>``
Name of the queue.

@@ -93,25 +51,6 @@ Delete a queue.

**Positional arguments:**

``<queue_name>``
Name of the queue.

.. _openstack_queue_get_metadata:

openstack queue get metadata
----------------------------

.. code-block:: console

usage: openstack queue get metadata [-h] [-f {json,shell,table,value,yaml}]
[-c COLUMN] [--max-width <integer>]
[--noindent] [--prefix PREFIX]
<queue_name>

Get queue metadata.

**Positional arguments:**

``<queue_name>``
Name of the queue.

@@ -134,32 +73,6 @@ Get queue metadata.
``<queue_name>``
Name of the queue.

.. _openstack_queue_list:

openstack queue list
--------------------

.. code-block:: console

usage: openstack queue list [-h] [-f {csv,json,table,value,yaml}] [-c COLUMN]
[--max-width <integer>] [--noindent]
[--quote {all,minimal,none,nonnumeric}]
[--marker <queue_id>] [--limit <limit>]
[--detailed]

List available queues.

**Optional arguments:**

``--marker <queue_id>``
Queue's paging marker.

``--limit <limit>``
Page size limit.

``--detailed``
If show detailed information of queue.

.. _openstack_messaging_queue_list:

openstack messaging queue list
@@ -186,25 +99,6 @@ List available queues.
``--detailed``
If show detailed information of queue.

.. _openstack_queue_set_metadata:

openstack queue set metadata
----------------------------

.. code-block:: console

usage: openstack queue set metadata [-h] <queue_name> <queue_metadata>

Set queue metadata.

**Positional arguments:**

``<queue_name>``
Name of the queue.

``<queue_metadata>``
Queue metadata. It should be json like. For example: '{"age": 18}'

.. _openstack_messaging_queue_set_metadata:

openstack messaging queue set metadata
@@ -225,42 +119,6 @@ queue_metadata.
``<queue_metadata>``
Queue metadata. It should be json like. For example: '{"age": 18}'


.. _openstack_queue_signed_url:

openstack queue signed url
--------------------------

.. code-block:: console

usage: openstack queue signed url [-h] [-f {json,shell,table,value,yaml}]
[-c COLUMN] [--max-width <integer>]
[--noindent] [--prefix PREFIX]
[--paths <paths>]
[--ttl-seconds <ttl_seconds>]
[--methods <methods>]
<queue_name>

Create a pre-signed url for the queue.

**Positional arguments:**

``<queue_name>``
Name of the queue.

**Optional arguments:**

``--paths <paths>``
Allowed paths in a comma-separated list.
Options: messages, subscriptions, claims.

``--ttl-seconds <ttl_seconds>``
Length of time (in seconds) until the signature expires.

``--methods <methods>``
HTTP methods to allow as a comma-separated list.
Options: GET, HEAD, OPTIONS, POST, PUT, DELETE.

.. _openstack_messaging_queue_signed_url:

openstack messaging queue signed url
@@ -296,26 +154,6 @@ Create a pre-signed url for the queue.
HTTP methods to allow as a comma-separated list.
Options: GET, HEAD, OPTIONS, POST, PUT, DELETE.


.. _openstack_queue_stats:

openstack queue stats
---------------------

.. code-block:: console

usage: openstack queue stats [-h] [-f {json,shell,table,value,yaml}]
[-c COLUMN] [--max-width <integer>] [--noindent]
[--prefix PREFIX]
<queue_name>

Get queue stats.

**Positional arguments:**

``<queue_name>``
Name of the queue.

.. _openstack_messaging_queue_stats:

openstack messaging queue stats
@@ -335,31 +173,6 @@ Get queue stats.
``<queue_name>``
Name of the queue.

.. _openstack_queue_purge:

openstack queue purge
---------------------

.. code-block:: console

usage: openstack queue purge [-h] [--resource_types <resource_types>]
<queue_name>

Purge a queue. All the metadata of the queue will be kept. Use
``--resource_types`` to specify which resource should be pured. If
``--resource_types`` is not specified, all the messages and subscriptions in
the queue will be purged by default.

**Positional arguments:**

``<queue_name>``
Name of the queue.

**Optional arguments:**

``--resource_types <resource_types>``
Resource types want to be purged. Support ``messages`` and ``subscriptions``.

.. _openstack_messaging_queue_purge:

openstack messaging queue purge


+ 2
- 131
doc/source/command/subscription.rst View File

@@ -1,53 +1,22 @@
Subscription
============

For help on a specific :command:`openstack subscription` command, enter:
For help on a specific :command:`openstack messaging subscription` command, enter:

.. code-block:: console

$ openstack subscription COMMAND -h/--help
$ openstack messaging subscription COMMAND -h/--help

The ten commands:

.. code-block:: console

subscription create
messaging subscription create
subscription delete
messaging subscription delete
subscription list
messaging subscription list
subscription show
messaging subscription show
subscription update
messaging subscription update

.. _openstack_subscription_create:

openstack subscription create
-----------------------------

.. code-block:: console

usage: openstack subscription create [-h] [-f {json,shell,table,value,yaml}]
[-c COLUMN] [--max-width <integer>]
[--noindent] [--prefix PREFIX]
[--options <options>]
<queue_name> <subscriber> <ttl>

Create a subscription.

**Positional arguments:**

``<queue_name>``
Name of the queue.

``<subscriber>``
Subscriber which will be notified.

``<ttl>``
Time to live of the subscription in seconds.

.. _openstack_messaging_subscription_create:

openstack messaging subscription create
@@ -74,25 +43,6 @@ Create a subscription.
``<ttl>``
Time to live of the subscription in seconds.

.. _openstack_subscription_delete:

openstack subscription delete
-----------------------------

.. code-block:: console

usage: openstack subscription delete [-h] <queue_name> <subscription_id>

Delete a subscription.

**Positional arguments:**

``<queue_name>``
Name of the queue.

``<subscription_id>``
ID of the subscription.

.. _openstack_messaging_subscription_delete:

openstack messaging subscription delete
@@ -112,28 +62,6 @@ Delete a subscription.
``<subscription_id>``
ID of the subscription.

.. _openstack_subscription_list:

openstack subscription list
---------------------------

.. code-block:: console

usage: openstack subscription list [-h] [-f {csv,json,table,value,yaml}]
[-c COLUMN] [--max-width <integer>]
[--noindent]
[--quote {all,minimal,none,nonnumeric}]
[--marker <subscription_id>]
[--limit <limit>]
<queue_name>

Get list of subscriptions.

**Positional arguments:**

``<queue_name>``
Name of the queue.

.. _openstack_messaging_subscription_list:

openstack messaging subscription list
@@ -156,28 +84,6 @@ Get list of subscriptions.
``<queue_name>``
Name of the queue.

.. _openstack_subscription_show:

openstack subscription show
---------------------------

.. code-block:: console

usage: openstack subscription show [-h] [-f {json,shell,table,value,yaml}]
[-c COLUMN] [--max-width <integer>]
[--noindent] [--prefix PREFIX]
<queue_name> <subscription_id>

Query a subscription details.

**Positional arguments:**

``<queue_name>``
Name of the queue.

``<subscription_id>``
ID of the subscription.

.. _openstack_messaging_subscription_show:

openstack messaging subscription show
@@ -200,41 +106,6 @@ Query a subscription details.
``<subscription_id>``
ID of the subscription.

.. _openstack_subscription_update:

openstack subscription update
-----------------------------

.. code-block:: console

usage: openstack subscription update [-h] [-f {json,shell,table,value,yaml}]
[-c COLUMN] [--max-width <integer>]
[--noindent] [--prefix PREFIX]
[--subscriber <subscriber>] [--ttl <ttl>]
[--options <options>]
<queue_name> <subscription_id>

Update a subscription.

**Positional arguments:**

``<queue_name>``
Name of the queue.

``<subscription_id>``
ID of the subscription

**Optional arguments:**

``--subscriber <subscriber>``
Subscriber which will be notified.

``--ttl <ttl>``
Time to live of the subscription in seconds.

``--options <options>``
Metadata of the subscription in JSON format.

.. _openstack_messaging_subscription_update:

openstack messaging subscription update


Loading…
Cancel
Save