summaryrefslogtreecommitdiffstats
path: root/ipalib/cli.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix output of failed managedby hosts, allow a host to manage itself.Rob Crittenden2011-01-111-2/+2
| | | | | | | | | | | The output problem was a missing label for failed managedby. This also fixes a call to print_entry that was missing the flags argument. Add a flag to specify whether a group can be a member of itself, defaulting to False. ticket 708
* Display the entries that failed when deleting with --continue.Rob Crittenden2011-01-101-3/+6
| | | | | | | | | | | | We collected the failures but didn't report it back. This changes the API of most delete commands so rather than returning a boolean it returns a dict with the only current key as failed. This also adds a new parameter flag, suppress_empty. This will try to not print values that are empty if included. This makes the output of the delete commands a bit prettier. ticket 687
* Changed concept of ipa helpJan Zeleny2011-01-071-20/+97
| | | | | | | | | | | | | | | | | | | | | | | | The concept is now following: topic: either a module or a group of modules containing registered commands. All these commands will usually handle common entity type (e.g. hbac rules) subtopic: each topic can have a number of subtopics. In this case topic is a group of modules and each module represents a subtopic. grouping modules to topics is possible by assigning a 2-tuple to module variable: topic = ('topic-name','topic description') The topic description has to be the same in all modules in the topic. These are examples of commands now available in IPA help: ipa help - display a list of all topics ipa help hbac - display help for hbac topic ipa help hbacrule - display help for a subtopic of hbac ipa help hbacrule-add - display help for a particular command https://fedorahosted.org/freeipa/ticket/410
* Change FreeIPA license to GPLv3+Jakub Hrozek2010-12-201-5/+5
| | | | | | | | | | The changes include: * Change license blobs in source files to mention GPLv3+ not GPLv2 only * Add GPLv3+ license text * Package COPYING not LICENSE as the license blobs (even the old ones) mention COPYING specifically, it is also more common, I think https://fedorahosted.org/freeipa/ticket/239
* If any params marked alwaysask are provided then prompt for none of them.Rob Crittenden2010-12-091-1/+6
| | | | ticket 604
* Add labels for passwords, fix output of exceptions, fix passwd output.Rob Crittenden2010-12-021-1/+1
| | | | | | | | | | | Passwords didn't have internationalizable labels. Exceptions that occured during required input weren't printed as unicode so weren't being translated properly. Don't use output_for_cli() directly in the passwd plugin, use output.Output. ticket 352
* Use better description for group names in help and always prompt for membersRob Crittenden2010-12-021-5/+8
| | | | | | | | | | | | | | | | | | | When running <foo>-[add|remove]-member completely interactively it didn't prompt for managing membership, it just reported that 0 members were handled which was rather confusing. This will work via a shell if you want to echo too: $ echo "" | ipa group-add-member g1 This returns 0 members because nothing is read for users or group members. $ echo -e "g1\nadmin\n" | ipa group-add-member This adds the user admin to the group g1. It adds it as a user because user membership is prompted for first. ticket 415
* Prompt correctly for required Password params.Pavel Zuna2010-11-301-10/+13
| | | | Ticket #361
* Don't include INTERNAL commands in `ipa help commands` output.Rob Crittenden2010-11-101-0/+2
| | | | ticket 463
* Return reason for failure when updating group membership fails.Rob Crittenden2010-10-281-1/+13
| | | | | | | | | | | We used to return a list of dns that failed to be added. We now return a list of tuples instead. The tuple looks like (dn, reason) where reason is the exception that was returned. Also made the label we use for failures to be singular instead of plural since we now print them out individually instead of as comma-separated. ticket 270
* Set default encoding to utf-8, use unicode when printing output.Rob Crittenden2010-10-221-4/+5
| | | | | | The Gettext() object only does the lookup when you print it as a unicode. ticket 308
* Add Requires on ipa-client to ipa-admintools, ensure ipa client is configuredRob Crittenden2010-10-151-1/+3
| | | | | | | | | | It makes little sense to install ipa-admintools without ipa-client, require it. Also see if the client has been configured. This is a bit tricky since we have a full set of defaults. Add a new env option that gets set if at least one configuration file is loaded. ticket 213
* Try to make topic help less confusing. Rename Related to Topic commands.Rob Crittenden2010-09-231-3/+4
| | | | | | | Also don't print the commands at the bottom if the plugin implements only one command, like the passwd plugin. ticket 105
* Add support for client failover to the ipa command-line.Rob Crittenden2010-08-161-2/+3
| | | | | | | | | | | | This adds a new global option to the ipa command, -f/--no-fallback. If this is included then just the server configured in /etc/ipa/default.conf is used. Otherwise that is tried first then all servers in DNS with the ldap SRV record are tried. Create a new Local() Command class for local-only commands. The help command is one of these. It shouldn't need a remote connection to execute. ticket #15
* Fix output for commands that do not return entries.Pavel Zuna2010-03-261-2/+2
| | | | | | | | | | | | I also changed the default value of the print_all argument in textui.print_entry from False to True. It think it makes more sense this way, because: 1) if order is None, it will still print something 2) if order is not None, it will print what's in order first and then the rest 3) commands that care about the print_all argument have to set it in any case, those that don't care usually want to print everything
* Add INTERNAL flag to frontend plugins. If set, the plugin won't show in UI.Pavel Zuna2010-03-221-1/+3
|
* localize doc stringsJohn Dennis2010-03-081-1/+1
| | | | | | | | | | | | A number of doc strings were not localized, wrap them in _(). Some messages were not localized, wrap them in _() Fix a couple of failing tests: The method name in RPC should not be unicode. The doc attribute must use the .msg attribute for comparison. Also clean up imports of _() The import should come from ipalib or ipalib.text, not ugettext from request.
* fix bug 570392, command help tracebackJohn Dennis2010-03-051-1/+1
| | | | | | | | | | | | | | | | | | | As a consequence of using doc=_('some message') the _() method was returning a Gettext instance, thus when optparse was handed the help text it received a Gettext instance instead of a basestring. optparse tried to operate on the Gettext instance as if it were a basestring and since it wasn't threw an exception. The fix is to promote (e.g. cast) the option.doc to unicode. If the option.doc was a str it becomes unicode, if it was unicode nothing happens, if it was Gettext (or any other object implementing the __unicode__() method) object is converted to unicode via the objects rules. By the way, while debugging this I discovered strings which were not localized, sometimes option.doc would be a str and sometimes a Gettext object. In a subsequent patch I'll fix all those unlocalized doc strings, but I don't want to bury this fix along with a load of string fixes.
* Fix non XML-RPC testsJason Gerard DeRose2010-02-191-9/+0
|
* Used named variables in calls to print_attribute()Rob Crittenden2010-02-171-2/+2
|
* Reverse patch to not encode int values, handled at OID level properly now.Rob Crittenden2010-02-171-5/+1
|
* Auto-generate --all and --raw for commands, that return entries.Pavel Zuna2010-02-171-26/+34
|
* Don't base64-encode integersRob Crittenden2010-02-171-1/+5
| | | | | | This is a temporary fix until we either use Params to determine output type or treat integers differently from other binary values internally (as unicode instead of str, for example).
* Use the Output tuple to determine the order of outputRob Crittenden2010-02-151-5/+8
| | | | | | | | | | | | | | The attributes displayed is now dependant upon their definition in a Param. This enhances that, giving some level of control over how the result is displayed to the user. This also fixes displaying group membership, including failures of adding/removing entries. All tests pass now though there is still one problem. We need to return the dn as well. Once that is fixed we just need to comment out all the dn entries in the tests and they should once again pass.
* Base64-encode binary values on the command-lineRob Crittenden2010-02-021-3/+17
|
* Temporary fix for name collision of textui.print_entry.Pavel Zuna2010-01-201-1/+1
| | | | Somehow there's two of them... rename old one to print_entry1.
* Take 2: Extensible return values and validation; steps toward a single ↵Jason Gerard DeRose2009-12-101-3/+55
| | | | output_for_cli(); enable more webUI stuff
* Fix Bool parameter type. It was impossible to set it to FALSE.Pavel Zuna2009-11-301-1/+1
|
* Print only one line of docstrings in command listings.Pavel Zuna2009-11-301-4/+3
| | | | Full docstring is shown on `ipa help COMMAND`.
* Fix typo in name of exceptionRob Crittenden2009-11-121-1/+1
|
* Add 'File' parameter type.Pavel Zuna2009-11-061-1/+34
| | | | Accepts filenames and loads file contents as parameter value.
* Fix bug in print_attribute.Pavel Zuna2009-10-231-1/+1
| | | | | When the attribute had no values an exception was generated while trying to word-wrap it.
* Removed util.add_global_options() and frontend.ApplicationJason Gerard DeRose2009-10-141-2/+2
|
* Giant webui patch take 2Jason Gerard DeRose2009-10-131-1/+1
|
* Fix unit tests for plugins using baseldap classes.Pavel Zuna2009-10-051-1/+4
|
* Improve attribute printing in the CLI.Pavel Zuna2009-09-081-5/+28
| | | | | - allow choice between single/multiple value per line - word wrapping
* Removed PluginProxy and all its usesJason Gerard DeRose2009-08-051-6/+9
|
* Fix three broken unit testsJason Gerard DeRose2009-08-041-2/+1
|
* Enable attribute re-mapping and ordering when printing entries.Pavel Zuna2009-08-031-10/+22
| | | | Also print multiple values on one line separated by commas.
* Require a password only once when it is passed in via a pipeRob Crittenden2009-07-101-21/+13
|
* Add a one-character option for parametersRob Crittenden2009-07-101-1/+4
|
* Add a return value to exceptions.Rob Crittenden2009-07-101-4/+11
| | | | | | | | Returning the exception value doesn't work because a shell return value is in the range of 0-255. The default return value is 1 which means "something went wrong." The only specific return value implemented so far is 2 which is "not found".
* Add textui function to display and prompt user for selection for *-find.Rob Crittenden2009-07-101-7/+63
| | | | | Since we may end up executing a *-show when an entry is selected we need to defer destroying the connection context.
* Two new arguments for the help built-in command: topics and commandsRob Crittenden2009-06-151-2/+7
| | | | | ipa help topics will show all topics (equivalent to ipa help) ipa help commands will show list of all available commands
* Fix a few issues introduced by the new Param.use_in_context() patchRob Crittenden2009-05-211-1/+1
|
* Re-enable doctest, fix broken docstringsJason Gerard DeRose2009-05-131-3/+3
|
* When reading a password, if there is no tty, read from stdin instead.Rob Crittenden2009-05-041-2/+14
| | | | | | This will allow one to pipe a password in: echo -e "secret123\secret123\n" | ipa password someuser
* Change help interface to display builtin commands and a list of topics based ↵Pavel Zuna2009-04-301-20/+77
| | | | on plugin modules.
* Fixed cli.run() catching SystemExit exception under Python2.4Jason Gerard DeRose2009-04-281-1/+1
| | | | Resolves BZ #498088
* Rename errors2.py to errors.py. Modify all affected files.Pavel Zuna2009-04-231-1/+1
|