Commit Graph

84 Commits

Author SHA1 Message Date
Jason Gerard DeRose
2478ccd357 Fixed some unicode encoded/decode issues in textui.prompt_password() and textui.prompt() 2008-11-19 03:31:29 -07:00
Jason Gerard DeRose
4afee15d4b Calling 'passwd' command now prompts for password using textui.prompt_password() 2008-11-18 13:43:43 -07:00
Jason Gerard DeRose
0a60a6bcc4 Added textui.prompt_password() method; added logic in cli for dealing with 'password' flag in param.flags 2008-11-18 11:30:16 -07:00
Jason Gerard DeRose
75d1918996 Added some experimental textui methods 2008-11-17 20:41:01 -07:00
Jason Gerard DeRose
8474bd01da Command.get_defaults() now returns param.default if param.type is a Bool 2008-11-17 18:50:30 -07:00
Jason Gerard DeRose
42bf555a3a Started updated user_* commands to use textui 2008-11-17 15:27:08 -07:00
Jason Gerard DeRose
e7ec413158 Moved plugins command from ipalib.cli to ipalib.plugins.f_misc 2008-11-16 19:50:17 -07:00
Jason Gerard DeRose
e3fec8f219 Fixed textui.print_keyval for cases when the row is a list instead of a tuple 2008-11-14 22:03:31 -07:00
Jason Gerard DeRose
c974451edf Added print_plain() and print_paragraph() methods to textui plugin and cleaned up the order of its methods 2008-11-14 13:33:42 -07:00
Jason Gerard DeRose
82d3de773b Added textui.prompt() method, which CLI.prompt_interactively() uses 2008-11-13 23:54:34 -07:00
Jason Gerard DeRose
f5594dd489 Started work on cleaning up how exceptions are caught and sys.exit() is called in ipalib.cli.CLI 2008-11-13 23:29:35 -07:00
Jason Gerard DeRose
01a7f1f437 Calling ./ipa with no command now calls Command.help() 2008-11-12 10:15:24 -07:00
Jason Gerard DeRose
f04aaff97c output_for_cli signature is now output_for_cli(textui, result, *args, **options) 2008-11-12 09:55:11 -07:00
Jason Gerard DeRose
014af24731 Changed calling signature of output_for_cli(); started work on 'textui' backend plugin 2008-11-12 00:46:04 -07:00
Rob Crittenden
f131480643 Move socket errors from the XML-RPC plugin to the client 2008-11-03 17:38:05 -05:00
Rob Crittenden
d53218a932 Handle exceptions in the command-line instead of in the XMLRPC client plugin 2008-11-03 17:19:29 -05:00
Jason Gerard DeRose
5e5a83e4e8 Renamed API.bootstrap_from_options() to bootstrap_with_global_options() 2008-10-31 19:03:07 -06:00
Jason Gerard DeRose
a23d41a57f Reoganized global option functionality to it is easy for any script to use the environment-related global options; lite-xmlrpc.py now uses same global options 2008-10-31 18:17:08 -06:00
Jason Gerard DeRose
6879140db7 Added ipalib.plugins.f_misc with new 'context' Command; moved 'env' Command from cli to f_misc 2008-10-30 02:20:28 -06:00
Jason Gerard DeRose
ddb5449c7f Did some initial work for Context plugins 2008-10-30 01:11:33 -06:00
Jason Gerard DeRose
138305b365 Added an example CLI-specific env command 2008-10-28 02:23:13 -06:00
Jason Gerard DeRose
316bd855d5 Added util.configure_logging() function; API.bootstrap() now calls util.configure_logging() 2008-10-28 01:39:02 -06:00
Jason Gerard DeRose
83d6c95e46 API.load_plugins() no longer takes dry_run=False kwarg and instead checks in env.mode == 'unit_test' to decide whether to load the plugins; it also only loads ipa_server.plugins in env.in_server is True 2008-10-27 23:39:43 -06:00
Jason Gerard DeRose
6e456cc749 More CLI cleanup, got all basics working again 2008-10-27 23:30:55 -06:00
Jason Gerard DeRose
9b1e3f5946 More docstrings, functionality, and unit tests for improved CLI class 2008-10-27 19:21:49 -06:00
Jason Gerard DeRose
e6254026fe Implemented basic CLI.bootstrap(); added corresponding unit tests 2008-10-27 15:19:49 -06:00
Jason Gerard DeRose
17fd9cc431 Started cleanup work on CLI class, added unit tests for CLI.parse_globals() 2008-10-27 14:49:34 -06:00
Jason Gerard DeRose
10026284db Started cleanup work on CLI class, added unit tests for CLI.parse_globals() 2008-10-27 14:48:02 -06:00
Rob Crittenden
06a82bf4b6 Fix ipa command running in server_context=True
Make the LDAP host and port environment variables
More changes so that commands have a shell return value
lite-xmlrpc no longer hardcodes the kerberos credentials cache location
2008-10-23 11:00:50 -04:00
Rob Crittenden
f189b02996 Return a value to the shell that called ipa 2008-10-22 17:52:32 -04:00
Rob Crittenden
bc5edcf893 Gracefully handle keyboard interrupts (^C) 2008-10-21 14:42:13 -04:00
Rob Crittenden
6b998ed479 Make boolean options work like standard OptionParser booleans 2008-10-21 09:32:48 -04:00
Jason Gerard DeRose
ac0a019605 Reworked 'plugins' command to use output_for_cli() 2008-10-20 18:57:03 -06:00
Jason Gerard DeRose
721982870e Removed generic Command.output_for_cli() method; CLI.run_interactive() now only calls output_for_cli() if it has been implemented 2008-10-17 21:05:03 -06:00
Martin Nagy
3a80297b04 Reworking Environment, moved it to config.py 2008-10-17 23:11:51 +02:00
Jason Gerard DeRose
1480224724 Started roughing out user_add() using api.Backend.ldap; added Command.output_for_cli() to take care of formatting print output 2008-10-14 01:45:30 -06:00
Jason Gerard DeRose
22669f1fc2 CLI.run_interactive() now uses Param.cli_name instead of Param.name for prompts and errors 2008-10-13 22:00:18 -06:00
Jason Gerard DeRose
b6dcd183a6 CLI now maps Param.cli_name to Param.name 2008-10-13 20:31:10 -06:00
Martin Nagy
4a1c4a3fe3 Implement argument parsing for the CLI 2008-10-08 00:07:44 +02:00
Martin Nagy
4a68c719f0 Implement config file reading 2008-10-08 00:07:44 +02:00
Martin Nagy
149429f305 Environment is now subclassed from object, rather then dict. Added tests for Environment and config.py 2008-10-02 17:22:41 -06:00
Martin Nagy
afdc721038 Add support for environment variables, change tests accordingly 2008-09-29 17:45:14 -06:00
Jason Gerard DeRose
eaf15d5a52 327: Improved formatting on show-api cli command 2008-09-24 05:35:40 +00:00
Jason Gerard DeRose
f3ac709922 326: Made output of plugins cli command nicer 2008-09-24 05:03:10 +00:00
Jason Gerard DeRose
3e70c3b56b 325: API.finalize() now creates instance attribtue 'plugins', which is a tuple of PluginInfo objects; renamed show_plugins cli command to namespaces; added new cli command plugins 2008-09-24 04:44:52 +00:00
Jason Gerard DeRose
3bf2da5714 324: Removed 'smart_option_order' from Command.__public__; cli commands help, console, and show_plugins now override Command.run() instead of Command.__call__() 2008-09-24 03:10:35 +00:00
Jason Gerard DeRose
4e8ff5c656 318: Renamed all references to 'public' module to 'frontend' 2008-09-24 00:01:29 +00:00
Jason Gerard DeRose
2d83614006 305: Ported cli.py to changes in public.py 2008-09-21 19:00:41 +00:00
Jason Gerard DeRose
23e251a605 288: CLI now uses Command.group_args() to check for required arguments 2008-09-10 23:33:36 +00:00
Jason Gerard DeRose
687f603562 284: Removed depreciated Command.Option property; removed corresponding unit tests; updated affected code 2008-09-10 15:31:34 +00:00