Skip to content
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.

Fix title rendering #171

Merged
merged 1 commit into from
Feb 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 14 additions & 9 deletions conjur/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def command_epilog(example, command=None, subcommands=None):
"""
This method builds the footer for each command help screen.
"""
refer_to_help = "See more details in each subcommands help:"
refer_to_help = "See more details in each subcommand's help:"
if subcommands:
res = ""
for subcommand in subcommands:
Expand Down Expand Up @@ -295,11 +295,14 @@ def run(self, *args):
usage=argparse.SUPPRESS,
add_help=False,
formatter_class=formatter_class)
replace_policy_parser.add_argument('-f', '--file', required=True, metavar='VALUE',

replace_options = replace_policy_parser.add_argument_group(title=self.title("Options"))

replace_options.add_argument('-f', '--file', required=True, metavar='VALUE',
help='Provide policy file name')
replace_policy_parser.add_argument('-b', '--branch', required=True, metavar='VALUE',
replace_options.add_argument('-b', '--branch', required=True, metavar='VALUE',
help='Provide the policy branch name')
replace_policy_parser.add_argument('-h', '--help', action='help', help='Display help screen and exit')
replace_options.add_argument('-h', '--help', action='help', help='Display help screen and exit')

policy_update_name = 'update - Update existing resources in policy or create new resources'
policy_update_usage = 'conjur [global options] policy update [options] [args]'
Expand All @@ -311,11 +314,13 @@ def run(self, *args):
usage=argparse.SUPPRESS,
add_help=False,
formatter_class=formatter_class)
update_policy_parser.add_argument('-f', '--file', required=True, metavar='VALUE',
replace_options = update_policy_parser.add_argument_group(title=self.title("Options"))

replace_options.add_argument('-f', '--file', required=True, metavar='VALUE',
help='Provide policy file name')
update_policy_parser.add_argument('-b', '--branch', required=True, metavar='VALUE',
replace_options.add_argument('-b', '--branch', required=True, metavar='VALUE',
help='Provide the policy branch name')
update_policy_parser.add_argument('-h', '--help', action='help', help='Display help screen and exit')
replace_options.add_argument('-h', '--help', action='help', help='Display help screen and exit')

policy_options = policy_subparser.add_argument_group(title=self.title("Options"))
policy_options.add_argument('-h', '--help', action='help', help='Display help screen and exit')
Expand Down Expand Up @@ -373,7 +378,7 @@ def run(self, *args):
formatter_class=formatter_class)

user_change_password_options = user_change_password.add_argument_group(title=self.title("Options"))
user_change_password_options.add_argument('-p', '--password',
user_change_password_options.add_argument('-p', '--password', metavar='VALUE',
help='Provide the new password for the logged-in user')
user_change_password_options.add_argument('-h', '--help', action='help', help='Display help screen and exit')

Expand All @@ -394,7 +399,7 @@ def run(self, *args):
add_help=False,
formatter_class=formatter_class)
host_subparsers = host_subparser.add_subparsers(dest='action', title=self.title("Subcommands"))
host_rotate_api_key_name = 'rotate-api-key - Rotate a hosts API key'
host_rotate_api_key_name = 'rotate-api-key - Rotate a host\'s API key'
host_rotate_api_key_usage = 'conjur [global options] host rotate-api-key [options] [args]'
host_rotate_api_key_parser = host_subparsers.add_parser('rotate-api-key',
help='Rotate a host\'s API key',
Expand Down
2 changes: 1 addition & 1 deletion test/util/test_runners/test_runner_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def __init__(self, run_oss_tests, url, account, login, password, invoke_cli_as_p
self.test_name_identifier = test_name_identifier
# Tests
if invoke_cli_as_process and test_name_identifier == 'integration':
self.test_name_identifier = "test_with_process"
self.test_name_identifier = "test-with-process"
self.invoke_cli_as_process = invoke_cli_as_process
self.cli_to_test = cli_to_test
self.files_folder = files_folder
Expand Down