summaryrefslogtreecommitdiffstats
path: root/ipalib
diff options
context:
space:
mode:
authorPavel Zuna <pzuna@redhat.com>2009-06-10 14:18:08 +0200
committerRob Crittenden <rcritten@redhat.com>2009-06-10 11:53:14 -0400
commitdc23be68784a1ae3d5c88cc4861142c9efa5394e (patch)
tree0c67cea506a4782ff9de8ac8699578b3f662cd78 /ipalib
parent4b08770b78fa8d7460b55322d8f1d52a821df731 (diff)
downloadfreeipa.git-dc23be68784a1ae3d5c88cc4861142c9efa5394e.tar.gz
freeipa.git-dc23be68784a1ae3d5c88cc4861142c9efa5394e.tar.xz
freeipa.git-dc23be68784a1ae3d5c88cc4861142c9efa5394e.zip
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.
Diffstat (limited to 'ipalib')
-rw-r--r--ipalib/frontend.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/ipalib/frontend.py b/ipalib/frontend.py
index 54e962a7..aca350a4 100644
--- a/ipalib/frontend.py
+++ b/ipalib/frontend.py
@@ -795,9 +795,9 @@ class Object(HasParam):
continue
yield param
- def get_dn(self, primary_key):
+ def get_dn(self, *args, **kwargs):
"""
- Construct an LDAP DN from a primary_key.
+ Construct an LDAP DN.
"""
raise NotImplementedError('%s.get_dn()' % self.name)
@@ -878,7 +878,7 @@ class Attribute(Plugin):
def __init__(self):
m = re.match(
- '^([a-z][a-z0-9]+)_([a-z][a-z0-9]+)$',
+ '^([a-z][a-z0-9]+)_([a-z][a-z0-9]+(?:_[a-z][a-z0-9]+)*)$',
self.__class__.__name__
)
assert m