diff options
author | Jason Gerard DeRose <jderose@redhat.com> | 2008-09-24 21:29:15 +0000 |
---|---|---|
committer | Jason Gerard DeRose <jderose@redhat.com> | 2008-09-24 21:29:15 +0000 |
commit | 566d5ea02a5dfdf6f0da0ce1a3f0bb656604c233 (patch) | |
tree | 913fc43715530c7d8153756bf8601137ae0c447e /ipalib/frontend.py | |
parent | 5479a349a87458e8e1a7997ad16720778e65be96 (diff) | |
download | freeipa-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.py | 4 |
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): |