cli: Do interactive prompting after a context is created

Some commands require a connection for interactive prompting.
Prompt after the connection is created.

Option parsing is still done before connecting so that help
can be printed out without a Kerberos ticket.

https://fedorahosted.org/freeipa/ticket/3453
This commit is contained in:
Petr Viktorin authored and Martin Kosek committed 2013-02-26 18:19:16 +01:00
1 parent 68ffb4af2f
commit 8b8859ed7d
2 files changed
+5 -4

No files matched your search

+2 -1
View File
@@ -18,7 +18,8 @@ class TestCLIParsing(object):
executioner = api.Backend.cli
cmd = executioner.get_command(argv)
kw_got = executioner.argv_to_keyword_arguments(cmd, argv[1:])
kw_got = executioner.parse(cmd, argv[1:])
kw_got = executioner.process_keyword_arguments(cmd, kw_got)
util.assert_deepequal(expected_command_name, cmd.name, 'Command name')
util.assert_deepequal(kw_expected, kw_got)