install: improve CLI positional argument handling

Instead of specifying which knobs should be positional arguments in
cli.install_tool(), do it using a flag in knob definition, where the rest
of CLI configuration is.

As a side effect, the usage string for CLI tools can now be generated
automatically.

https://fedorahosted.org/freeipa/ticket/6392

Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
Jan Cholasta
2016-10-27 09:23:22 +02:00
parent 8c742b1539
commit a641e279ff
4 changed files with 71 additions and 49 deletions

View File

@@ -1444,6 +1444,8 @@ class Replica(BaseServer):
replica_file = Knob(
str, None,
description="a file generated by ipa-replica-prepare",
cli_positional=True,
cli_name='replica_file',
)
setup_ca = Knob(BaseServer.setup_ca)