Merge "trivial: Fix formatting of command help texts"

This commit is contained in:
Zuul 2020-09-11 01:13:08 +00:00 committed by Gerrit Code Review
commit 8d852bc956
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
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):
@ -92,7 +92,7 @@ class ListAggregate(command.Lister):
"""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):

View File

@ -57,7 +57,7 @@ class SetAllocation(command.Lister, version.CheckerMixin):
allocations for accounting and data consistency reasons.
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.
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.
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
output.
the ``project_id`` and ``user_id`` of allocations which also appears in the
CLI output.
"""
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
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.
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
capacity to allocate 1 VCPU resource class. There is one resource provider
that can serve that allocation request and that resource providers current
VCPU inventory used is 0 and available capacity is 128.
capacity to allocate 1 ``VCPU`` resource class. There is one resource
provider that can serve that allocation request and that resource providers
current ``VCPU`` inventory used is 0 and available capacity is 128.
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.
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
specify the --amend option.
specify the ``--amend`` option.
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
--resource VCPU:total=16.
it is assumed to be the total, i.e. ``--resource VCPU=16`` is equivalent to
``--resource VCPU:total=16``.
Example: openstack resource provider inventory set <uuid> \
--resource VCPU=16 \
--resource MEMORY_MB=2048 \
--resource MEMORY_MB:step_size=128
Example::
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):
@ -250,14 +251,14 @@ class SetInventory(command.Lister, version.CheckerMixin):
class SetClassInventory(command.ShowOne):
"""Replace the inventory record of the class for the resource provider.
Example: openstack resource provider inventory class set <uuid> VCPU \
--total 16 \
--max_unit 4 \
--reserved 1
Example::
openstack resource provider inventory class set <uuid> VCPU \
--total 16 \
--max_unit 4 \
--reserved 1
"""
def get_parser(self, prog_name):
@ -303,15 +304,13 @@ class SetClassInventory(command.ShowOne):
class DeleteInventory(command.Command, version.CheckerMixin):
"""Delete the inventory.
Depending on the resource class argument presence, it can
delete all inventory for a given resource provider or for a resource
provider/class pair.
Depending on the resource class argument presence, delete all inventory for
a given resource provider or for a resource provider/class pair.
Delete all inventories for given resource provider
requires at least ``--os-placement-api-version 1.5``.
Delete all inventories for given resource provider requires at least
``--os-placement-api-version 1.5``.
"""
def get_parser(self, prog_name):
@ -326,8 +325,8 @@ class DeleteInventory(command.Command, version.CheckerMixin):
'--resource-class',
metavar='<resource_class>',
required=self.compare_version(version.lt('1.5')),
help=(RC_HELP
+ '\nThis argument can be omitted starting with '
help=(RC_HELP + '\n'
'This argument can be omitted starting with '
'``--os-placement-api-version 1.5``. If it is omitted all '
'inventories of the specified resource provider '
'will be deleted.')

View File

@ -25,7 +25,7 @@ class ListResourceClass(command.Lister):
"""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):
@ -47,7 +47,7 @@ class CreateResourceClass(command.Command):
"""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):
@ -71,8 +71,9 @@ class SetResourceClass(command.Command):
"""Create or validate the existence of single resource class.
Unlike "resource class create" also succeed if the resource class
already exists, which makes this an idempotent check or create command.
Unlike ``openstack resource class create``, this command also succeeds if
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``.
"""
@ -98,9 +99,9 @@ class SetResourceClass(command.Command):
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):
@ -126,11 +127,11 @@ class ShowResourceClass(command.ShowOne):
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.
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):