[Freeipa-devel] [PATCH] Add make_xxx_dn routines for policy
Jakub Hrozek
jhrozek at redhat.com
Thu Feb 12 13:19:32 UTC 2009
On Wed, 2009-02-11 at 13:55 -0500, Rob Crittenden wrote:
> I'm not 100% sure all DNs are going to be this formulaic though we
> can
> probably handle those as 1-offs and do the majority this way. Perhaps
> a
> bit more generically like:
>
> def make_dn(self, attr, value, container):
> return '%s=%s,%s,%s' % (
> attr,
> self.dn.escape_dn_chars(value),
> self.get_container(container),
> self.api.env.basedn,
> )
This looks good to me and would cover most of the cases. It's important
to have the 'attr' attribute generic as not all dn's start with cn=
(most policy related ones actually start with ipaUniqueID=).
Jakub
More information about the Freeipa-devel
mailing list