Commit Graph

220 Commits

Author SHA1 Message Date
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
Jason Gerard DeRose
8062075f84 279: Fixed cli and public.Method re new Command.args attribute 2008-09-10 02:02:26 +00:00
Jason Gerard DeRose
0215bc8009 276: Option.__init__(): doc is now 3rd kwarg instead of 2nd positional arg; updated unit tests and other affected code 2008-09-10 00:21:40 +00:00
Jason Gerard DeRose
21a0bab79e 272: Add a quick positional arg experiment 2008-09-09 01:41:15 +00:00
Jason Gerard DeRose
cb9c442708 270: show-plugins now only shows namespaces with at least one member 2008-09-08 21:44:53 +00:00
Jason Gerard DeRose
03fd184e8e 269: Renamed print_api command to show_plugins 2008-09-08 21:42:48 +00:00
Jason Gerard DeRose
e74713a076 267: Finished builtin CLI api command 2008-09-08 21:37:02 +00:00
Jason Gerard DeRose
641403278e 266: Started work on new cli.print_api Command 2008-09-04 18:35:04 +00:00
Jason Gerard DeRose
22d9b8c078 265: Fixed small formatting error with use of CLI.print_commands() 2008-09-04 09:27:28 +00:00
Jason Gerard DeRose
553b0c596d 264: Cleaned up docstrings on all example plugins 2008-09-04 09:22:18 +00:00
Jason Gerard DeRose
6b9ba734e1 263: CLI.print_commands() now seperates Command subclasses from Application subclasses 2008-09-04 09:04:35 +00:00
Jason Gerard DeRose
6f95249d52 261: More work on demo using Option.__call__() for interactive input 2008-09-04 08:33:41 +00:00
Jason Gerard DeRose
915486dadc 260: Option.normalize() now does same conversion for multivalue as Option.convert() does 2008-09-04 08:16:12 +00:00
Jason Gerard DeRose
71d36aa6a0 258: Added some experimental features for interactively prompting for values 2008-09-04 07:18:26 +00:00
Jason Gerard DeRose
01b73e6910 257: Improved help command, now parsing options with optparse 2008-09-04 06:33:57 +00:00
Jason Gerard DeRose
b16deabdff 256: Fixed cli.help plugin so it looks up commands in CLI instead of API 2008-09-04 05:18:14 +00:00
Jason Gerard DeRose
ab81ca56fd 255: CLI help, console commands now subclass from public.Application; other tweeking to make CLI utilize Application 2008-09-04 04:39:01 +00:00
Jason Gerard DeRose
330c17730c 201: Added new cli command 'console' that starts a custom interactive Python console 2008-08-27 00:25:33 +00:00
Jason Gerard DeRose
b0ec8fe551 182: Renamed plublic.cmd base class to Command 2008-08-15 19:49:04 +00:00
Jason Gerard DeRose
ba8d32a110 150: NameSpace.__iter__() now iterates through the names, not the members; added NameSpace.__call__() method which iterates through the members; NameSpace no longer requires members to be Proxy instances; updated unit tests and affected code; cleaned up NameSpace docstrings and switch to epydoc param docstrings 2008-08-14 05:46:20 +00:00
Jason Gerard DeRose
d95133b66f 149: CLI.run() now does an arg.decode('utf-8') for args in sys.argv so that non-ascii characters work 2008-08-14 01:09:11 +00:00
Jason Gerard DeRose
fe7440735d 148: Added some basic out put for cli.help.__call__() method 2008-08-13 07:20:10 +00:00
Jason Gerard DeRose
d422ef1134 146: Removed CLI.parse_kw() method and corresponding unit tests 2008-08-13 06:40:25 +00:00
Jason Gerard DeRose
337c9964d4 145: Added new CLI.parse() method; added corresponding unit tests 2008-08-13 06:25:42 +00:00
Jason Gerard DeRose
14cdb57b50 140: Added a skeleton help command in cli.py 2008-08-13 04:02:39 +00:00
Jason Gerard DeRose
b9fa9dc240 139: Removed dummy gettext _() func from cli.py; improved CLI.print_commands() 2008-08-13 03:15:00 +00:00
Jason Gerard DeRose
0fed74b56d 138: Added ProxyTarget.doc property; CLI.print_commands() now uses cmd.doc instead of cmd.get_doc() 2008-08-13 02:34:36 +00:00
Jason Gerard DeRose
05cefc2af6 136: CLI.print_commands() now prints cmd.get_doc() as well 2008-08-13 02:10:09 +00:00
Jason Gerard DeRose
0b5efa2a62 134: Added CLI.mcl (Max Command Length) property; added corresponding unit tests 2008-08-13 01:52:17 +00:00
Jason Gerard DeRose
64054a673c 122: The dictorary interface to CLI now has keys build using to_cli(), rather than converting at each call 2008-08-12 23:33:02 +00:00
Jason Gerard DeRose
99d7638ff5 115: CLI now parses out kw args; cmd.__call__() now uses print_n_call() to give feedback on the calling 2008-08-12 16:49:23 +00:00
Jason Gerard DeRose
bc4b26ffca 114: Fixed cmd.__get_options(); more work on CLI 2008-08-12 02:03:47 +00:00
Jason Gerard DeRose
afdbc42b2e 112: More work on cli.py 2008-08-11 21:38:30 +00:00
Jason Gerard DeRose
9282418291 110: Started fleshing out more in cli.py 2008-08-11 19:35:57 +00:00
Jason Gerard DeRose
3fe13d5945 87: Moved to_cli(), from_cli() functions from plugable.py into new cli.py file; moved corresponding unit tests into new test_cli.py file 2008-08-08 21:46:23 +00:00