diff options
| author | Jan Cholasta <jcholast@redhat.com> | 2016-06-02 15:58:43 +0200 |
|---|---|---|
| committer | Jan Cholasta <jcholast@redhat.com> | 2016-06-03 09:00:34 +0200 |
| commit | 3cf5f83d92a2c315eb8a0dd2ed06cd1d61df5d36 (patch) | |
| tree | 35d9b5235752fca82159e5e12d99d75225c15b3b /ipalib/plugins/idrange.py | |
| parent | 0e989e2a28fb8093528176574ffd2ae2ecac4c14 (diff) | |
ipalib: replace DeprecatedParam with `deprecated` Param argument
Introduce new `deprecated` Param keywork argument. Setting it to True on a
param has the same effect as using DeprecatedParam. This allows deprecating
params while retaining their type information.
Revert all DeprecatedParam params back to their original definition and set
`deprecated` to True.
Remove the now unused DeprecatedParam class.
https://fedorahosted.org/freeipa/ticket/4739
Reviewed-By: David Kupka <dkupka@redhat.com>
Diffstat (limited to 'ipalib/plugins/idrange.py')
| -rw-r--r-- | ipalib/plugins/idrange.py | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/ipalib/plugins/idrange.py b/ipalib/plugins/idrange.py index 7e868c363..ccd67995e 100644 --- a/ipalib/plugins/idrange.py +++ b/ipalib/plugins/idrange.py @@ -22,7 +22,7 @@ import six from ipalib.plugable import Registry from .baseldap import (LDAPObject, LDAPCreate, LDAPDelete, LDAPRetrieve, LDAPSearch, LDAPUpdate) -from ipalib import api, Int, Str, DeprecatedParam, StrEnum, _, ngettext +from ipalib import api, Int, Str, StrEnum, _, ngettext from ipalib import errors from ipapython.dn import DN @@ -617,8 +617,22 @@ class idrange_mod(LDAPUpdate): msg_summary = _('Modified ID range "%(value)s"') takes_options = LDAPUpdate.takes_options + ( - DeprecatedParam('ipanttrusteddomainsid?'), - DeprecatedParam('ipanttrusteddomainname?'), + Str( + 'ipanttrusteddomainsid?', + deprecated=True, + cli_name='dom_sid', + flags=('no_update', 'no_option'), + label=_('Domain SID of the trusted domain'), + autofill=False, + ), + Str( + 'ipanttrusteddomainname?', + deprecated=True, + cli_name='dom_name', + flags=('no_search', 'virtual_attribute', 'no_update', 'no_option'), + label=_('Name of the trusted domain'), + autofill=False, + ), ) def pre_callback(self, ldap, dn, entry_attrs, attrs_list, *keys, **options): |
