summaryrefslogtreecommitdiffstats
path: root/ipalib/frontend.py
diff options
context:
space:
mode:
authorJason Gerard DeRose <jderose@redhat.com>2008-09-24 21:29:15 +0000
committerJason Gerard DeRose <jderose@redhat.com>2008-09-24 21:29:15 +0000
commit566d5ea02a5dfdf6f0da0ce1a3f0bb656604c233 (patch)
tree913fc43715530c7d8153756bf8601137ae0c447e /ipalib/frontend.py
parent5479a349a87458e8e1a7997ad16720778e65be96 (diff)
downloadfreeipa-566d5ea02a5dfdf6f0da0ce1a3f0bb656604c233.tar.gz
freeipa-566d5ea02a5dfdf6f0da0ce1a3f0bb656604c233.tar.xz
freeipa-566d5ea02a5dfdf6f0da0ce1a3f0bb656604c233.zip
347: Added primary_key instance attribute to Param and corresponding kwarg; expanded unit tests for Param.__init__()
Diffstat (limited to 'ipalib/frontend.py')
-rw-r--r--ipalib/frontend.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/ipalib/frontend.py b/ipalib/frontend.py
index ff0d34921..7e22a9fa0 100644
--- a/ipalib/frontend.py
+++ b/ipalib/frontend.py
@@ -128,7 +128,8 @@ class Param(plugable.ReadOnly):
default=None,
default_from=None,
rules=tuple(),
- normalize=None
+ normalize=None,
+ primary_key=False,
)
def __init__(self, name, type_=ipa_types.Unicode(), **kw):
@@ -155,6 +156,7 @@ class Param(plugable.ReadOnly):
self.__normalize = self.__kw['normalize']
self.rules = self.__check_type(tuple, 'rules')
self.all_rules = (type_.validate,) + self.rules
+ self.primary_key = self.__check_type(bool, 'primary_key')
lock(self)
def __clone__(self, **override):