Skip to content

Commit 5afe480

Browse files
committed
Fix really long help strings
Each command should have a summary line followed by a longer description, if needed. Some commands were not following this. Fix them. Change-Id: If1ce7654037d192626460f34c069ea0979919b9b Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
1 parent 29129a7 commit 5afe480

File tree

4 files changed

+33
-35
lines changed

4 files changed

+33
-35
lines changed

openstackclient/common/quota.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -749,12 +749,10 @@ def take_action(self, parsed_args):
749749

750750

751751
class ShowQuota(command.Lister):
752-
_description = _(
753-
"Show quotas for project or class. "
754-
"Specify ``--os-compute-api-version 2.50`` or higher to see "
755-
"``server-groups`` and ``server-group-members`` output for a given "
756-
"quota class."
757-
)
752+
_description = _("""Show quotas for project or class.
753+
754+
Specify ``--os-compute-api-version 2.50`` or higher to see ``server-groups``
755+
and ``server-group-members`` output for a given quota class.""")
758756

759757
def get_parser(self, prog_name):
760758
parser = super().get_parser(prog_name)

openstackclient/compute/v2/server.py

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -555,10 +555,10 @@ def take_action(self, parsed_args):
555555

556556

557557
class AddServerVolume(command.ShowOne):
558-
_description = _(
559-
"Add volume to server. "
560-
"Specify ``--os-compute-api-version 2.20`` or higher to add a volume "
561-
"to a server with status ``SHELVED`` or ``SHELVED_OFFLOADED``.")
558+
_description = _("""Add volume to server.
559+
560+
Specify ``--os-compute-api-version 2.20`` or higher to add a volume to a server
561+
with status ``SHELVED`` or ``SHELVED_OFFLOADED``.""")
562562

563563
def get_parser(self, prog_name):
564564
parser = super(AddServerVolume, self).get_parser(prog_name)
@@ -3705,11 +3705,10 @@ def take_action(self, parsed_args):
37053705

37063706

37073707
class RemoveServerVolume(command.Command):
3708-
_description = _(
3709-
"Remove volume from server. "
3710-
"Specify ``--os-compute-api-version 2.20`` or higher to remove a "
3711-
"volume from a server with status ``SHELVED`` or "
3712-
"``SHELVED_OFFLOADED``.")
3708+
_description = _("""Remove volume from server.
3709+
3710+
Specify ``--os-compute-api-version 2.20`` or higher to remove a
3711+
volume from a server with status ``SHELVED`` or ``SHELVED_OFFLOADED``.""")
37133712

37143713
def get_parser(self, prog_name):
37153714
parser = super(RemoveServerVolume, self).get_parser(prog_name)
@@ -3746,11 +3745,10 @@ def take_action(self, parsed_args):
37463745

37473746

37483747
class RescueServer(command.Command):
3749-
_description = _(
3750-
"Put server in rescue mode. "
3751-
"Specify ``--os-compute-api-version 2.87`` or higher to rescue a "
3752-
"server booted from a volume."
3753-
)
3748+
_description = _("""Put server in rescue mode.
3749+
3750+
Specify ``--os-compute-api-version 2.87`` or higher to rescue a
3751+
server booted from a volume.""")
37543752

37553753
def get_parser(self, prog_name):
37563754
parser = super(RescueServer, self).get_parser(prog_name)
@@ -4294,10 +4292,10 @@ def _show_progress(progress):
42944292

42954293

42964294
class ShowServer(command.ShowOne):
4297-
_description = _(
4298-
"Show server details. Specify ``--os-compute-api-version 2.47`` "
4299-
"or higher to see the embedded flavor information for the server."
4300-
)
4295+
_description = _("""Show server details.
4296+
4297+
Specify ``--os-compute-api-version 2.47`` or higher to see the embedded flavor
4298+
information for the server.""")
43014299

43024300
def get_parser(self, prog_name):
43034301
parser = super(ShowServer, self).get_parser(prog_name)

openstackclient/compute/v2/service.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,11 @@ def take_action(self, parsed_args):
7171

7272

7373
class ListService(command.Lister):
74-
_description = _("List compute services. Using "
75-
"``--os-compute-api-version`` 2.53 or greater will "
76-
"return the ID as a UUID value which can be used to "
77-
"uniquely identify the service in a multi-cell "
78-
"deployment.")
74+
_description = _("""List compute services.
75+
76+
Using ``--os-compute-api-version`` 2.53 or greater will return the ID as a UUID
77+
value which can be used to uniquely identify the service in a multi-cell
78+
deployment.""")
7979

8080
def get_parser(self, prog_name):
8181
parser = super(ListService, self).get_parser(prog_name)

openstackclient/volume/v2/backup_record.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,10 @@
2626

2727

2828
class ExportBackupRecord(command.ShowOne):
29-
_description = _('Export volume backup details. Backup information can be '
30-
'imported into a new service instance to be able to '
31-
'restore.')
29+
_description = _("""Export volume backup details.
30+
31+
Backup information can be imported into a new service instance to be able to
32+
restore.""")
3233

3334
def get_parser(self, prog_name):
3435
parser = super(ExportBackupRecord, self).get_parser(prog_name)
@@ -54,9 +55,10 @@ def take_action(self, parsed_args):
5455

5556

5657
class ImportBackupRecord(command.ShowOne):
57-
_description = _('Import volume backup details. Exported backup details '
58-
'contain the metadata necessary to restore to a new or '
59-
'rebuilt service instance')
58+
_description = _("""Import volume backup details.
59+
60+
Exported backup details contain the metadata necessary to restore to a new or
61+
rebuilt service instance""")
6062

6163
def get_parser(self, prog_name):
6264
parser = super(ImportBackupRecord, self).get_parser(prog_name)

0 commit comments

Comments
 (0)