From a2299070c86ae049fb5702a72567a820fe6eaa28 Mon Sep 17 00:00:00 2001 From: Jan Cholasta Date: Thu, 15 Mar 2012 04:32:37 -0400 Subject: Change parameters to use only default_from for dynamic default values. Replace all occurences of create_default with equivalent default_from and remove create_default from the framework. This is needed for proper parameter validation, as there is no way to tell which parameters to validate prior to calling create_default, because create_default does not provide information about which parameters are used for generating the default value. --- ipaserver/plugins/join.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ipaserver/plugins/join.py') diff --git a/ipaserver/plugins/join.py b/ipaserver/plugins/join.py index 81c336b2..00733638 100644 --- a/ipaserver/plugins/join.py +++ b/ipaserver/plugins/join.py @@ -52,7 +52,7 @@ class join(Command): validate_host, cli_name='hostname', doc=_("The hostname to register as"), - create_default=lambda **kw: unicode(util.get_fqdn()), + default_from=lambda: unicode(util.get_fqdn()), autofill=True, #normalizer=lamda value: value.lower(), ), @@ -60,7 +60,7 @@ class join(Command): takes_options= ( Str('realm', doc=_("The IPA realm"), - create_default=lambda **kw: get_realm(), + default_from=lambda: get_realm(), autofill=True, ), Str('nshardwareplatform?', -- cgit