Add a new objectclass, ipaObject, that will add a UUID to many IPA objects

ipaObject is defined as an auxiliary objectclass so it is up to the
plugin author to ensure that the objectclass is included an a UUID generated.
ipaUniqueId is a MUST attribute so if you include the objectclass you must
ensure that the uuid is generated.

This also fixes up some unrelated unit test failures.
This commit is contained in:
Rob Crittenden
2009-08-10 16:24:10 -04:00
committed by Jason Gerard DeRose
parent dbeb409ebd
commit c781e8a57d
16 changed files with 54 additions and 31 deletions

View File

@@ -24,6 +24,7 @@ Users (Identity)
from ipalib import api, crud, errors
from ipalib import Command, Object
from ipalib import Flag, Int, Password, Str
from ipalib import uuid
# parent DN
_container_dn = api.env.container_user
@@ -151,6 +152,8 @@ class user_add(crud.Create):
# fill default group's gidNumber
entry_attrs['gidnumber'] = group_attrs['gidnumber']
entry_attrs['ipauniqueid'] = str(uuid.uuid1())
# create user entry
ldap.add_entry(dn, entry_attrs)