Commit Graph
100 Commits
Author SHA1 Message Date
Pavel Zuna f5d63dbecc Filter all NULL values in ldap2.add_entry. python-ldap doesn't like'em.
Previously we only filtered None values, but it turns out that's not enough.
2009-11-18 14:34:16 -05:00
Pavel Zuna 63c6c12d69 Use File parameter for CSR in cert_request command plugin. 2009-11-06 16:05:36 -07:00
Pavel Zuna 566a3cb972 Add 'File' parameter type.
Accepts filenames and loads file contents as parameter value.
2009-11-06 16:05:31 -07:00
Pavel Zuna 192cccea97 Remove ipalib/plugins/basegroup.py. It's become obsolete. 2009-10-23 09:38:00 -04:00
Pavel Zuna 04c5b5ae42 Fix bug in print_attribute.
When the attribute had no values an exception was generated while
trying to word-wrap it.
2009-10-23 09:37:23 -04:00
Pavel Zuna 6b38de9454 Display membership attributes (member, memberOf) by default in show/find. 2009-10-21 10:35:03 -04:00
Pavel Zuna 0373166002 Fix bug in HBAC and netgroup plugin get_primary_key_from_dn methods. 2009-10-08 10:11:29 -04:00
Pavel Zuna 0dd92f10cc Fix bug in group plugin. Was using wrong variable for attributes.
Fix bug #527537.
2009-10-08 10:10:01 -04:00
Pavel Zuna 5be9721292 Fix unit tests for plugins using baseldap classes. 2009-10-07 10:00:32 -04:00
Pavel Zuna cbbfd16e9f Make the taskgroup plugin use baseldap classes. 2009-10-07 10:00:04 -04:00
Pavel Zuna 8f29e416be Make the rolegroup plugin use baseldap classes. 2009-10-05 16:02:26 -04:00
Pavel Zuna 26b05cd364 Make the hostgroup plugin use baseldap classes. 2009-10-05 16:02:02 -04:00
Pavel Zuna 9b77455cbb Make the netgroup plugin use baseldap classes. 2009-10-05 16:01:02 -04:00
Pavel Zuna fbd1ff40f9 Make the user plugin use baseldap classes. 2009-10-05 15:59:23 -04:00
Pavel Zuna be82f941d0 Make the service plugin use baseldap classes. 2009-10-05 15:59:16 -04:00
Pavel Zuna e01b1b8f99 Fix unit tests for plugins using baseldap classes. 2009-10-05 15:59:09 -04:00
Pavel Zuna 1e48662b9b Make the group plugin use baseldap classes. 2009-10-05 15:58:54 -04:00
Pavel Zuna 5af07b693a Make the config plugin use baseldap classes. 2009-10-05 15:58:40 -04:00
Pavel Zuna a6eb928f98 Add HBAC plugin and introduce GeneralizedTime parameter type. 2009-10-05 15:55:27 -04:00
Pavel Zuna 944371a38c Make the host plugin use baseldap classes. 2009-09-28 15:00:27 -06:00
Pavel Zuna d0b3ba4523 Fix typos and minor bugs in baseldap. Add --all to LDAPUpdate.
Also, member attributes are now mapped to 'member user', 'member group',
etc. instead of 'member users', 'member groups'. In other words,
the second word is now taken from LDAPObject.object_name instead of
LDAPObject.object_name_plural.
2009-09-11 09:21:51 -04:00
Pavel Zuna db7e0802fa Fix incorrect imports in ipa-server-certinstall. 2009-09-11 09:19:41 -04:00
Pavel Zuna b80e773c1d Automatically generate an auto.master map for new automount location.
Also, add the automountlocation-show command for completeness sake.
2009-09-10 10:06:27 -04:00
Pavel Zuna fa140e7f2a Remove parent_key parameter kwarg.
Also replace a TYPE_ERROR with ValidationError.
2009-09-10 10:01:05 -04:00
Pavel Zuna 9fcd431477 Add support for different automount maps per location. 2009-09-10 10:00:50 -04:00
Pavel Zuna e0f3e765db Fix: Object.params_minus_pk was invalid when there was no primary_key. 2009-09-09 09:56:34 -04:00
Pavel Zuna 2147a845cf Improve ipalib.plugins.baseldap classes.
- remove obsolete code related to PluginProxy
- remove parent_key attribute, for the purpose of nested objects
  the parent's primary key is retrieved automatically
- added support for auto-generating of UUIDs
- make use of the improved attribute printing in CLI
- make LDAPDelete delete all sub-entries, not just one-level
- minor bug fixes
2009-09-09 09:55:35 -04:00
Pavel Zuna 6f37d139cb Remove obsolete CRUD base classes as they aren't used anymore. 2009-09-08 13:43:33 -04:00
Pavel Zuna 34970fef5e Improve attribute printing in the CLI.
- allow choice between single/multiple value per line
- word wrapping
2009-09-08 13:41:54 -04:00
Pavel Zuna f294bee09d Fix bug in dns_find - execute() returned different value than expected. 2009-09-08 13:39:06 -04:00
Pavel Zuna 356375ef18 Make ldap2.add_entry proof to None values, because python-ldap hate'em. 2009-09-08 13:38:25 -04:00
Pavel Zuna 91d01a532a Introduce a list of attributes for which only MOD_REPLACE operations are generated. 2009-08-28 13:18:21 -04:00
Pavel Zuna b7b9f9b6a6 Add options in baseldap classes to display unaltered LDAP entries.
The options in question is '--raw'.
2009-08-05 09:20:49 -04:00
Pavel Zuna 322d8238a0 All-around improvements to baseldap.py classes.
- attribute re-mapping, ordering and hiding
  (Enables plugins to completely hide LDAP internals from users
   and full localisation of command output.)
- translation of member DNs into object names
  (No more DNs when listing group members etc.)
- support for "singleton" LDAP objects
  (Objects like "pwpolicy"; not accessed by primary key.)
- new base classes for commands: LDAPModMember, LDAPAddMember
  and LDAPRemoveMember
  (Providing support for objects with 'member'-like attributes.)
- LDAPSearch implicit exit code changed to 1 when nothing is found
2009-08-03 23:08:21 -06:00
Pavel Zuna b4d173d844 Fix bug in _get_syntax (it was always returning None).
Also prevent a few cases of double processing of arguments.
2009-08-03 23:01:44 -06:00
Pavel Zuna b20c69dec7 Prevent double encoding/decoding when processing compound types. 2009-08-03 23:00:17 -06:00
Pavel Zuna 104d02e167 Enable attribute re-mapping and ordering when printing entries.
Also print multiple values on one line separated by commas.
2009-08-03 22:56:06 -06:00
Pavel Zuna 94181d54fe Make object classes of automatically created entries lowercase.
This makes them more consistent with entries created by plugins.
It's a cosmetic thing, not that useful.
2009-07-10 08:58:44 -04:00
Pavel Zuna 551648b8a9 Change command names from *group-del-member to *group-remove-member.
Signed-off-by: Jason Gerard DeRose <jderose@redhat.com>
2009-07-09 13:25:19 -06:00
Pavel Zuna 3b613091bb Import explode_dn from ldap.functions for backward compatibility with older version of python-ldap. Fix bug in add_entry_to_group.
Resolves 510149
2009-07-08 12:15:58 -04:00
Pavel Zuna f59cab1ccd Fix bug in ldap2.modify_password and make adding/removing members slightly more efficient. 2009-07-07 22:56:56 -04:00
Pavel Zuna 48d6669796 Fix unit tests to handle new group-{add, del}-member semantics. 2009-07-02 13:33:05 -04:00
Pavel Zuna 34b5b0d563 Fix bug: number of found entries was reported incorrectly in some plugins. 2009-07-02 13:33:05 -04:00
Pavel Zuna 537ba4034d Make basegroup-{add, del}-member print failed members with error descriptions. 2009-07-02 13:33:05 -04:00
Pavel Zuna 5e4c0014df Fix bug: when deleting hosts, their services where deleted incorrectly 2009-07-02 13:33:04 -04:00
Pavel Zuna 3c5988d078 Remove outstanding 2's from plugins. 2009-07-02 13:33:04 -04:00
Pavel Zuna 72e4816140 Add unit tests for new plugins. 2009-07-02 13:33:04 -04:00
Pavel Zuna 57b55d8e2f Add utility functions for plugin unit testing. 2009-07-02 13:33:04 -04:00
Pavel Zuna 12ee586392 Remove unit tests for old plugins. 2009-07-02 13:33:04 -04:00
Pavel Zuna da461998c1 Add automount plugin. 2009-07-02 13:33:03 -04:00
Pavel Zuna 57123f2a99 Fix minor bugs, typos, etc. discovered by unit tests in plugins. 2009-07-02 13:33:03 -04:00
Pavel Zuna 341a47f5a3 Fix bug in basegroup and passwd plugins (incorrect use of find_entry_by_attr). 2009-07-02 13:33:02 -04:00
Pavel Zuna 4b6a6c405c Rename *-create/*-delete commands to *-add/*-del respectively. 2009-07-02 13:33:02 -04:00
Pavel Zuna 89993d9939 Fix Encoder.decode test. 2009-07-02 13:33:02 -04:00
Pavel Zuna c2d2344268 Replace references to basegroup2 in taskgroup plugin. 2009-07-02 13:33:02 -04:00
Pavel Zuna b6cfae46e4 Rename plugins2 to plugins. 2009-07-02 13:33:02 -04:00
Pavel Zuna e1e1db9c9f Rename plugins2 files (remove '2' suffix'). 2009-07-02 13:33:01 -04:00
Pavel Zuna 8c7883364c Remove use_ldap2 constant. 2009-07-02 13:33:01 -04:00
Pavel Zuna ebdebe802d Remove all references to use_ldap2. 2009-07-02 13:33:01 -04:00
Pavel Zuna 3ce00484f4 Always use new LDAP backend when creating context. 2009-07-02 13:33:00 -04:00
Pavel Zuna 4b993782e6 Delete plugins using old LDAP backend. 2009-07-02 13:33:00 -04:00
Pavel Zuna 79ac9c6c78 Add conversion of attribute name synonyms when generating modlists. 2009-06-15 13:11:44 -04:00
Pavel Zuna 2ff4b3906f Change plugins2 using find_entries to support incomplete (truncated) search results. 2009-06-15 11:19:04 -04:00
Pavel Zuna 48e1f47ed1 Add new set of base classes for plugins using LDAP. 2009-06-15 11:18:59 -04:00
Pavel Zuna ad54fc3399 Add support for incomplete (truncated) search results.
ldap2.find_entries now returns a tuple containing 2 values. First,
a list of entries (dn, entry_attrs), Second, the truncated flag. If
the truncated flag is True, search results hit a server limitation
and are incomplete.

This patch also removes decoding of non-string scalar python types into
unicode (they are left unchanged).
2009-06-15 11:18:55 -04:00
Pavel Zuna 473e03d2f7 Add host plugin port to new LDAP backend. 2009-06-12 15:53:25 -04:00
Pavel Zuna 6e84f08143 Fix bugs in ldap2. 2009-06-12 15:10:57 -04:00
Pavel Zuna b8fdcb3a0b Add passwd plugin port to new LDAP backend. 2009-06-10 11:55:09 -04:00
Pavel Zuna a5292b2280 Add ACI plugin port to new LDAP backend. 2009-06-10 11:55:03 -04:00
Pavel Zuna 8edaff5266 Generate crud.Search arguments with get_args. 2009-06-10 11:53:20 -04:00
Pavel Zuna dc23be6878 Make get_dn parameter list more generic. Fix Attribute name regex.
The old name regex made it impossible to have Attribute instances with
names composed of more than two words separated by underscores.
2009-06-10 11:53:14 -04:00
Pavel Zuna 4b08770b78 Add 'parent_key' kwarg in Param class. 2009-06-10 11:53:10 -04:00
Pavel Zuna c47d716e95 Modify PluginProxy to use __public__ defined in derived classes instead of base classes. 2009-06-10 11:53:07 -04:00
Pavel Zuna 789fec4381 Add service plugin port to new LDAP backend. 2009-06-10 11:51:49 -04:00
Pavel Zuna 87bfd6b21a Fix bug in ldap2.normalize_dn.
DN was always returned as lower-case, sometimes resulting in 2 RDN values with different cases when creating entries.
2009-06-10 11:51:15 -04:00
Pavel Zuna cda0f85ce5 Fix bug in Encoder where tuples were encoded into lists. Fix Encoder and Command.args_options_2_entry unit tests. 2009-06-10 11:51:10 -04:00
Pavel Zuna 83f45cc541 Fix DS ACI parsing. 2009-06-02 16:20:48 -04:00
Pavel Zuna 90cc00feab Make delegation plugin consistent with plugins2 and use new Crud methods. 2009-06-02 16:20:44 -04:00
Pavel Zuna 66d291001a Remove unused reference to old LDAP backend in join plugin. 2009-06-02 16:20:41 -04:00
Pavel Zuna a1548bc670 Fix bug where List parameters where always cloned with keywords parsed from name. 2009-06-02 16:20:35 -04:00
Pavel Zuna b29006dd0a Add pwpolicy plugin port to new LDAP backend. 2009-05-27 10:02:50 -04:00
Pavel Zuna 924010cfc9 Add defaultoptions plugin port to new LDAP backend. 2009-05-26 14:50:31 -04:00
Pavel Zuna 13b55b5a52 Add taskgroup plugin port to new LDAP backend. 2009-05-26 14:50:28 -04:00
Pavel Zuna 5a8573129c Add rolegroup plugin port to new LDAP backend. 2009-05-26 14:50:26 -04:00
Pavel Zuna 56e001fd88 Add new env variables: container_taskgroup, container_rolegroup and container_netgroup. 2009-05-26 14:50:24 -04:00
Pavel Zuna 85bc20b0df Make it easier to search for a single entry by attribute value (find_entry_by_attr). Fix minor search filter generation issues. 2009-05-26 13:40:46 -04:00
Pavel Zuna a92e440218 Clone options of crud.Update and crud.Search with autofill=False. 2009-05-26 13:36:58 -04:00
Pavel Zuna 37a391cd78 Make plugins2 use lowercase when reffering to LDAP attributes. 2009-05-22 15:58:09 -06:00
Pavel Zuna 708fe4dfe5 Make ldap2 always return attribute names as lowercase. Add Encoder to ldap2 base classes and use encode_args/decode_retval where applicable. 2009-05-22 15:58:00 -06:00
Pavel Zuna 9468c9fca8 Fix bug where finalized IPA object where trying to modify their member variables in Encoder methods. 2009-05-22 15:57:27 -06:00
Pavel Zuna eec367b0c8 Fix bug in group2-mod command.
posixGroup object class was added to the group entry incorrectly when modifying gid number.
2009-05-21 15:22:58 -06:00
Pavel Zuna 7b93f7bbd7 Add netgroup plugin port to new LDAP backend. 2009-05-20 16:46:56 -06:00
Pavel Zuna 75a70af943 Add hostgroup plugin port to new LDAP backend. 2009-05-20 16:46:48 -06:00
Pavel Zuna 1e55b0a1ab Fix counting of successfully added members. Add checks for use_ldap2 in group2. Some cosmetic changes. 2009-05-20 16:46:39 -06:00
Pavel Zuna a3ae5047f3 Add group plugin port to new LDAP backend. 2009-05-20 16:46:28 -06:00
Pavel Zuna 9437fc669e Add Encoder base class and method decorators to encode arguments/decode return values. Also - unit tests. 2009-05-19 09:56:39 -04:00
Pavel Zuna 36c239cda4 Add DNS management plugin port to the new ldap backend. 2009-04-30 16:17:49 -04:00
Pavel Zuna 8eabf068fb Make search filter generation a bit safer. Minor bug fixes/code improvements. 2009-04-30 16:17:44 -04:00
Pavel Zuna 9992b23a08 Change help interface to display builtin commands and a list of topics based on plugin modules. 2009-04-30 15:55:16 -04:00
Pavel Zuna 75b551fd5e Use right attribute name for e-mail in user2 plugin. 2009-04-30 13:50:05 -04:00