Hello,

This patch addresses ticket https://fedorahosted.org/freeipa/ticket/3636

-- 
Regards,

Ana Krivokapic
Associate Software Engineer
FreeIPA team
Red Hat Inc.

From 704114481caed03cf02daac56d78dc43a3759a3a Mon Sep 17 00:00:00 2001
From: Ana Krivokapic <akriv...@redhat.com>
Date: Wed, 29 May 2013 09:15:19 -0400
Subject: [PATCH] Deprecate options --dom-sid and --dom-name in idrange-mod

https://fedorahosted.org/freeipa/ticket/3636
---
 API.txt                   |  4 ++--
 VERSION                   |  2 +-
 ipalib/plugins/idrange.py | 17 ++++++++++-------
 3 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/API.txt b/API.txt
index e5bb7beb49c287badecb36ed95451a2561a68976..0a4b356e6f8a66d785e222f5941ff65a3cb484b7 100644
--- a/API.txt
+++ b/API.txt
@@ -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')
diff --git a/VERSION b/VERSION
index 359a43bb329757c298e54184456975d1b09991d8..a95ccb91457c4caf9767843951b8290b15b377d6 100644
--- a/VERSION
+++ b/VERSION
@@ -89,4 +89,4 @@ IPA_DATA_VERSION=20100614120000
 #                                                      #
 ########################################################
 IPA_API_VERSION_MAJOR=2
-IPA_API_VERSION_MINOR=58
+IPA_API_VERSION_MINOR=59
diff --git a/ipalib/plugins/idrange.py b/ipalib/plugins/idrange.py
index 54f6fbb3e19b9aa01dfde2a8d0c5da4498632386..fa2569ad34557d0d65567e631cef0d66b6fd544e 100644
--- a/ipalib/plugins/idrange.py
+++ b/ipalib/plugins/idrange.py
@@ -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?',
@@ -481,6 +479,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')
-- 
1.8.2.1

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to