summaryrefslogtreecommitdiffstats
path: root/ipalib/frontend.py
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/frontend.py
parent4b08770b78fa8d7460b55322d8f1d52a821df731 (diff)
downloadfreeipa-dc23be68784a1ae3d5c88cc4861142c9efa5394e.tar.gz
freeipa-dc23be68784a1ae3d5c88cc4861142c9efa5394e.tar.xz
freeipa-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/frontend.py')
-rw-r--r--ipalib/frontend.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/ipalib/frontend.py b/ipalib/frontend.py
index 54e962a76..aca350a49 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