summaryrefslogtreecommitdiffstats
path: root/ipalib
diff options
context:
space:
mode:
authorJason Gerard DeRose <jderose@redhat.com>2008-09-24 18:02:00 +0000
committerJason Gerard DeRose <jderose@redhat.com>2008-09-24 18:02:00 +0000
commit792bf7b1d0f295290aa30bd358d67ecfc7233588 (patch)
tree9dad6ad4aab19fc1693b1410851a704488b9b9c0 /ipalib
parent11a07008b896ac995755b2f2a90e6089ca1344a5 (diff)
downloadfreeipa-792bf7b1d0f295290aa30bd358d67ecfc7233588.tar.gz
freeipa-792bf7b1d0f295290aa30bd358d67ecfc7233588.tar.xz
freeipa-792bf7b1d0f295290aa30bd358d67ecfc7233588.zip
340: Changed default for Param.required to True
Diffstat (limited to 'ipalib')
-rw-r--r--ipalib/frontend.py12
-rw-r--r--ipalib/tests/test_frontend.py2
2 files changed, 12 insertions, 2 deletions
diff --git a/ipalib/frontend.py b/ipalib/frontend.py
index 1ff620236..92c610c44 100644
--- a/ipalib/frontend.py
+++ b/ipalib/frontend.py
@@ -118,10 +118,20 @@ def parse_param_spec(spec):
class Param(plugable.ReadOnly):
__nones = (None, '', tuple(), [])
+ __default = dict(
+ type=ipa_types.Unicode(),
+ doc='',
+ required=True,
+ multivalue=False,
+ default=None,
+ default_from=None,
+ rules=tuple(),
+ normalize=None
+ )
def __init__(self, name, type_,
doc='',
- required=False,
+ required=True,
multivalue=False,
default=None,
default_from=None,
diff --git a/ipalib/tests/test_frontend.py b/ipalib/tests/test_frontend.py
index 1fe4e376c..252e46428 100644
--- a/ipalib/tests/test_frontend.py
+++ b/ipalib/tests/test_frontend.py
@@ -143,7 +143,7 @@ class test_Param(ClassChecker):
assert read_only(o, 'name') is name
assert read_only(o, 'type') is type_
assert read_only(o, 'doc') == ''
- assert read_only(o, 'required') is False
+ assert read_only(o, 'required') is True
assert read_only(o, 'multivalue') is False
assert read_only(o, 'default') is None
assert read_only(o, 'default_from') is None