From 3cf5f83d92a2c315eb8a0dd2ed06cd1d61df5d36 Mon Sep 17 00:00:00 2001 From: Jan Cholasta Date: Thu, 2 Jun 2016 15:58:43 +0200 Subject: 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 --- ipalib/plugins/idrange.py | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'ipalib/plugins/idrange.py') 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): -- cgit