ipalib, ipaserver: migrate all plugins to Registry-based registration

Do not use the deprecated API.register method.

https://fedorahosted.org/freeipa/ticket/4739

Reviewed-By: David Kupka <dkupka@redhat.com>
This commit is contained in:
Jan Cholasta
2016-03-03 15:12:19 +01:00
parent 0d62968b6f
commit bed546ee82
19 changed files with 99 additions and 81 deletions

View File

@@ -17,12 +17,15 @@
# 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 import api, errors
from ipalib import Registry, errors
from ipalib import Updater
from ipapython.dn import DN
from ipapython.ipa_log_manager import root_logger
register = Registry()
@register()
class update_uniqueness_plugins_to_new_syntax(Updater):
"""
Migrate uniqueness plugins to new style syntax
@@ -218,5 +221,3 @@ class update_uniqueness_plugins_to_new_syntax(Updater):
update_list.append(update)
return False, update_list
api.register(update_uniqueness_plugins_to_new_syntax)