trivial: Fix formatting of command help texts

Use the reST, Luke.

Change-Id: Ie4a75c14c67a615e81ba97b60e6a5d61d2e0f764
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
Stephen Finucane 2020-02-18 14:51:00 +00:00
parent 35cc92e603
commit 644feaa50e
5 changed files with 37 additions and 38 deletions

View File

@ -28,7 +28,7 @@ class SetAggregate(command.Lister, version.CheckerMixin):
UUID list will remove all associations with aggregates for the UUID list will remove all associations with aggregates for the
particular resource provider. particular resource provider.
This command requires at least --os-placement-api-version 1.1. This command requires at least ``--os-placement-api-version 1.1``.
""" """
def get_parser(self, prog_name): def get_parser(self, prog_name):
@ -92,7 +92,7 @@ class ListAggregate(command.Lister):
"""List resource provider aggregates. """List resource provider aggregates.
This command requires at least --os-placement-api-version 1.1. This command requires at least ``--os-placement-api-version 1.1``.
""" """
def get_parser(self, prog_name): def get_parser(self, prog_name):

View File

@ -57,7 +57,7 @@ class SetAllocation(command.Lister, version.CheckerMixin):
allocations for accounting and data consistency reasons. allocations for accounting and data consistency reasons.
Starting with ``--os-placement-api-version 1.12`` the API response Starting with ``--os-placement-api-version 1.12`` the API response
contains the project_id and user_id of allocations which also contains the ``project_id`` and ``user_id`` of allocations which also
appears in the CLI output. appears in the CLI output.
Starting with ``--os-placement-api-version 1.28`` a consumer generation is Starting with ``--os-placement-api-version 1.28`` a consumer generation is
@ -251,9 +251,8 @@ class ShowAllocation(command.Lister, version.CheckerMixin):
"""Show resource allocations for a given consumer. """Show resource allocations for a given consumer.
Starting with ``--os-placement-api-version 1.12`` the API response contains Starting with ``--os-placement-api-version 1.12`` the API response contains
the project_id and user_id of allocations which also appears in the CLI the ``project_id`` and ``user_id`` of allocations which also appears in the
output. CLI output.
""" """
def get_parser(self, prog_name): def get_parser(self, prog_name):

View File

@ -25,7 +25,7 @@ class ListAllocationCandidate(command.Lister, version.CheckerMixin):
Returns a representation of a collection of allocation requests and Returns a representation of a collection of allocation requests and
resource provider summaries. Each allocation request has information resource provider summaries. Each allocation request has information
to issue an "openstack resource provider allocation set" request to claim to issue an ``openstack resource provider allocation set`` request to claim
resources against a related set of resource providers. resources against a related set of resource providers.
As several allocation requests are available its necessary to select one. As several allocation requests are available its necessary to select one.
@ -44,9 +44,9 @@ class ListAllocationCandidate(command.Lister, version.CheckerMixin):
+---+------------+-------------------------+-------------------------+ +---+------------+-------------------------+-------------------------+
In this case, the user is looking for resource providers that can have In this case, the user is looking for resource providers that can have
capacity to allocate 1 VCPU resource class. There is one resource provider capacity to allocate 1 ``VCPU`` resource class. There is one resource
that can serve that allocation request and that resource providers current provider that can serve that allocation request and that resource providers
VCPU inventory used is 0 and available capacity is 128. current ``VCPU`` inventory used is 0 and available capacity is 128.
This command requires at least ``--os-placement-api-version 1.10``. This command requires at least ``--os-placement-api-version 1.10``.
""" """

View File

@ -104,17 +104,18 @@ class SetInventory(command.Lister, version.CheckerMixin):
Note that by default this is a full replacement of the existing inventory. Note that by default this is a full replacement of the existing inventory.
If you want to retain the existing inventory and add a new resource class If you want to retain the existing inventory and add a new resource class
inventory, you must specify all resource class inventory, old and new, or inventory, you must specify all resource class inventory, old and new, or
specify the --amend option. specify the ``--amend`` option.
If a specific inventory field is not specified for a given resource class, If a specific inventory field is not specified for a given resource class,
it is assumed to be the total, i.e. --resource VCPU=16 is equivalent to it is assumed to be the total, i.e. ``--resource VCPU=16`` is equivalent to
--resource VCPU:total=16. ``--resource VCPU:total=16``.
Example: openstack resource provider inventory set <uuid> \ Example::
--resource VCPU=16 \
--resource MEMORY_MB=2048 \
--resource MEMORY_MB:step_size=128
openstack resource provider inventory set <uuid> \
--resource VCPU=16 \
--resource MEMORY_MB=2048 \
--resource MEMORY_MB:step_size=128
""" """
def get_parser(self, prog_name): def get_parser(self, prog_name):
@ -250,14 +251,14 @@ class SetInventory(command.Lister, version.CheckerMixin):
class SetClassInventory(command.ShowOne): class SetClassInventory(command.ShowOne):
"""Replace the inventory record of the class for the resource provider. """Replace the inventory record of the class for the resource provider.
Example: openstack resource provider inventory class set <uuid> VCPU \ Example::
--total 16 \
--max_unit 4 \
--reserved 1
openstack resource provider inventory class set <uuid> VCPU \
--total 16 \
--max_unit 4 \
--reserved 1
""" """
def get_parser(self, prog_name): def get_parser(self, prog_name):
@ -303,15 +304,13 @@ class SetClassInventory(command.ShowOne):
class DeleteInventory(command.Command, version.CheckerMixin): class DeleteInventory(command.Command, version.CheckerMixin):
"""Delete the inventory. """Delete the inventory.
Depending on the resource class argument presence, it can Depending on the resource class argument presence, delete all inventory for
delete all inventory for a given resource provider or for a resource a given resource provider or for a resource provider/class pair.
provider/class pair.
Delete all inventories for given resource provider Delete all inventories for given resource provider requires at least
requires at least ``--os-placement-api-version 1.5``. ``--os-placement-api-version 1.5``.
""" """
def get_parser(self, prog_name): def get_parser(self, prog_name):
@ -326,8 +325,8 @@ class DeleteInventory(command.Command, version.CheckerMixin):
'--resource-class', '--resource-class',
metavar='<resource_class>', metavar='<resource_class>',
required=self.compare_version(version.lt('1.5')), required=self.compare_version(version.lt('1.5')),
help=(RC_HELP help=(RC_HELP + '\n'
+ '\nThis argument can be omitted starting with ' 'This argument can be omitted starting with '
'``--os-placement-api-version 1.5``. If it is omitted all ' '``--os-placement-api-version 1.5``. If it is omitted all '
'inventories of the specified resource provider ' 'inventories of the specified resource provider '
'will be deleted.') 'will be deleted.')

View File

@ -25,7 +25,7 @@ class ListResourceClass(command.Lister):
"""Return a list of all resource classes. """Return a list of all resource classes.
This command requires at least --os-placement-api-version 1.2. This command requires at least ``--os-placement-api-version 1.2``.
""" """
def get_parser(self, prog_name): def get_parser(self, prog_name):
@ -47,7 +47,7 @@ class CreateResourceClass(command.Command):
"""Create a new resource class. """Create a new resource class.
This command requires at least --os-placement-api-version 1.2. This command requires at least ``--os-placement-api-version 1.2``.
""" """
def get_parser(self, prog_name): def get_parser(self, prog_name):
@ -71,8 +71,9 @@ class SetResourceClass(command.Command):
"""Create or validate the existence of single resource class. """Create or validate the existence of single resource class.
Unlike "resource class create" also succeed if the resource class Unlike ``openstack resource class create``, this command also succeeds if
already exists, which makes this an idempotent check or create command. the resource class already exists, which makes this an idempotent check or
create command.
This command requires at least ``--os-placement-api-version 1.7``. This command requires at least ``--os-placement-api-version 1.7``.
""" """
@ -98,9 +99,9 @@ class SetResourceClass(command.Command):
class ShowResourceClass(command.ShowOne): class ShowResourceClass(command.ShowOne):
"""Return a representation of the resource class identified by {name}. """Return a representation of the resource class identified by ``<name>``.
This command requires at least --os-placement-api-version 1.2. This command requires at least ``--os-placement-api-version 1.2``.
""" """
def get_parser(self, prog_name): def get_parser(self, prog_name):
@ -126,11 +127,11 @@ class ShowResourceClass(command.ShowOne):
class DeleteResourceClass(command.Command): class DeleteResourceClass(command.Command):
"""Delete the resource class identified by {name}. """Delete the resource class identified by ``<name>``.
Only custom resource classes can be deleted. Only custom resource classes can be deleted.
This command requires at least --os-placement-api-version 1.2. This command requires at least ``--os-placement-api-version 1.2``.
""" """
def get_parser(self, prog_name): def get_parser(self, prog_name):