[Freeipa-devel] [PATCHES] Make plugins use baseldap classes.

Pavel Zůna pzuna at redhat.com
Tue Sep 8 14:03:19 UTC 2009


This is a series of patches that depends on patches:
- Improve attribute printing in the CLI.
- Improve ipalib.plugins.baseldap classes.

All plugins are converted to extend baseldap classes. This makes things 
more consistent, fixes some general bugs (with return values for 
example) and it also makes plugins easier to maintain (as it removes a 
lot of duplicate code).

Because baseldap classes have features that enable us to define 
relationships between plugins, I thought it might be best to submit all 
of the conversions at once and have all the relationships fully defined.

Affected plugins:
config
user
host
service
group
hostgroup
netgroup
rolegroup
taskgroup
pwpolicy

There's also a patch that fixes all unit tests.

Jenny, I included you to Cc, because the patch introduces a lot of 
changes to the UI (and you're probably not going to like me for this).

Each command extending the LDAP* base classes now has a --raw option. 
Without it, data from LDAP is formated and translated to human readable. 
For example:

# ipa user-show admin --all
----------
user-show:
----------
User: admin
   user id: admin
   full name: Administrator
   last name: Administrator
   home directory: /home/admin
   login shell: /bin/bash
   uid number: 999
   gid number: 1001
   gecos: Administrator
   kerberos principal: admin at PZUNA
   last password change: 20090904122852Z
   password expiration: 20091203122852Z
   member of groups: admins

# ipa user-show admin --all --raw
----------
user-show:
----------
   dn: uid=admin,cn=users,cn=accounts,dc=pzuna
   uid: admin
   cn: Administrator
   sn: Administrator
   homedirectory: /home/admin
   loginshell: /bin/bash
   uidnumber: 999
   gidnumber: 1001
   gecos: Administrator
   krbprincipalname: admin at PZUNA
   krblastpwdchange: 20090904122852Z
   krbpasswordexpiration: 20091203122852Z
   memberof: cn=admins,cn=groups,cn=accounts,dc=pzuna
   objectclass: top
   objectclass: person
   objectclass: posixaccount
   objectclass: krbprincipalaux
   objectclass: inetuser

Advantages: more user friendly, allows for easy localization, 
translation of DNs to primary keys (immediately usable as input to other 
plugin commands)

I recommend, that you use the --raw flag for testing.



I know it's a lot of changes, so I setup a git repo at:
git://fedorapeople.org/~pzuna/freeipa.git

It should be up-to-date with master and all my patches are applied 
there. I hope it makes reviewing them at least a bit easier.

Pavel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0021-Make-pwpolicy-plugin-use-baseldap-classes.patch
Type: application/mbox
Size: 6254 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20090908/b21b9127/attachment.mbox>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0011-Make-the-config-plugin-use-baseldap-classes.patch
Type: application/mbox
Size: 7037 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20090908/b21b9127/attachment-0001.mbox>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0012-Make-the-user-plugin-use-baseldap-classes.patch
Type: application/mbox
Size: 13494 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20090908/b21b9127/attachment-0002.mbox>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0013-Make-the-host-plugin-use-baseldap-classes.patch
Type: application/mbox
Size: 12719 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20090908/b21b9127/attachment-0003.mbox>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0014-Make-the-service-plugin-use-baseldap-classes.patch
Type: application/mbox
Size: 12291 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20090908/b21b9127/attachment-0004.mbox>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0015-Make-the-group-plugin-use-baseldap-classes.patch
Type: application/mbox
Size: 8398 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20090908/b21b9127/attachment-0005.mbox>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0016-Make-the-hostgroup-plugin-use-baseldap-classes.patch
Type: application/mbox
Size: 8568 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20090908/b21b9127/attachment-0006.mbox>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0017-Make-the-netgroup-plugin-use-baseldap-classes.patch
Type: application/mbox
Size: 16597 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20090908/b21b9127/attachment-0007.mbox>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0018-Make-the-rolegroup-plugin-use-baseldap-classes.patch
Type: application/mbox
Size: 4147 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20090908/b21b9127/attachment-0008.mbox>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0019-Make-the-taskgroup-plugin-use-baseldap-classes.patch
Type: application/mbox
Size: 7463 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20090908/b21b9127/attachment-0009.mbox>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0020-Fix-unit-tests-for-plugins-using-baseldap-classes.patch
Type: application/mbox
Size: 47143 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20090908/b21b9127/attachment-0010.mbox>


More information about the Freeipa-devel mailing list