Deprecate options --dom-sid and --dom-name in idrange-mod

https://fedorahosted.org/freeipa/ticket/3636
This commit is contained in:
Ana Krivokapic 2013-05-29 09:15:19 -04:00 committed by Martin Kosek
parent c9370c4a8e
commit b1321e95d7
3 changed files with 13 additions and 10 deletions

View File

@ -2014,8 +2014,8 @@ option: Str('delattr*', cli_name='delattr', exclude='webui')
option: Int('ipabaseid', attribute=True, autofill=False, cli_name='base_id', multivalue=False, required=False)
option: Int('ipabaserid', attribute=True, autofill=False, cli_name='rid_base', multivalue=False, required=False)
option: Int('ipaidrangesize', attribute=True, autofill=False, cli_name='range_size', multivalue=False, required=False)
option: Str('ipanttrusteddomainname', attribute=False, autofill=False, cli_name='dom_name', multivalue=False, required=False)
option: Str('ipanttrusteddomainsid', attribute=True, autofill=False, cli_name='dom_sid', multivalue=False, required=False)
option: DeprecatedParam('ipanttrusteddomainname?')
option: DeprecatedParam('ipanttrusteddomainsid?')
option: Str('iparangetype', attribute=True, autofill=False, cli_name='iparangetype', multivalue=False, required=False)
option: Int('ipasecondarybaserid', attribute=True, autofill=False, cli_name='secondary_rid_base', multivalue=False, required=False)
option: Flag('raw', autofill=True, cli_name='raw', default=False, exclude='webui')

View File

@ -89,4 +89,4 @@ IPA_DATA_VERSION=20100614120000
# #
########################################################
IPA_API_VERSION_MAJOR=2
IPA_API_VERSION_MINOR=58
IPA_API_VERSION_MINOR=59

View File

@ -17,13 +17,10 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from ipalib.plugins.baseldap import *
from ipalib import api, Str, Password, DefaultFrom, _, ngettext, Object
from ipalib.parameters import Enum
from ipalib import Command
from ipalib.plugins.baseldap import (LDAPObject, LDAPCreate, LDAPDelete,
LDAPRetrieve, LDAPSearch, LDAPUpdate)
from ipalib import api, Int, Str, DeprecatedParam, _, ngettext
from ipalib import errors
from ipapython import ipautil
from ipalib import util
from ipapython.dn import DN
if api.env.in_server and api.env.context in ['lite', 'server']:
@ -195,11 +192,12 @@ class idrange(LDAPObject):
),
Str('ipanttrusteddomainsid?',
cli_name='dom_sid',
flags=('no_update',),
label=_('Domain SID of the trusted domain'),
),
Str('ipanttrusteddomainname?',
cli_name='dom_name',
flags=('no_search', 'virtual_attribute'),
flags=('no_search', 'virtual_attribute', 'no_update'),
label=_('Name of the trusted domain'),
),
Str('iparangetype?',
@ -498,6 +496,11 @@ class idrange_mod(LDAPUpdate):
msg_summary = _('Modified ID range "%(value)s"')
takes_options = LDAPUpdate.takes_options + (
DeprecatedParam('ipanttrusteddomainsid?'),
DeprecatedParam('ipanttrusteddomainname?'),
)
def pre_callback(self, ldap, dn, entry_attrs, attrs_list, *keys, **options):
assert isinstance(dn, DN)
attrs_list.append('objectclass')