From e9a3b997176814f890ad90c69a6c14966a24d43f Mon Sep 17 00:00:00 2001 From: Tomas Babej Date: Wed, 29 Apr 2015 08:16:09 +0200 Subject: [PATCH] winsync-migrate: Rename to tool to achive consistency with other tools https://fedorahosted.org/freeipa/ticket/4524 Reviewed-By: Martin Babinsky --- install/tools/ipa-winsync-migrate | 4 ++-- ipaserver/winsync_migrate/__init__.py | 22 ---------------------- ipaserver/winsync_migrate/base.py | 11 +++++------ 3 files changed, 7 insertions(+), 30 deletions(-) delete mode 100644 ipaserver/winsync_migrate/__init__.py diff --git a/install/tools/ipa-winsync-migrate b/install/tools/ipa-winsync-migrate index 9eb9a03eb..9f2466312 100755 --- a/install/tools/ipa-winsync-migrate +++ b/install/tools/ipa-winsync-migrate @@ -18,6 +18,6 @@ # along with this program. If not, see . # -from ipaserver.winsync_migrate.base import MigrateWinsync +from ipaserver.winsync_migrate.base import WinsyncMigrate -MigrateWinsync.run_cli() +WinsyncMigrate.run_cli() diff --git a/ipaserver/winsync_migrate/__init__.py b/ipaserver/winsync_migrate/__init__.py deleted file mode 100644 index e0da63db3..000000000 --- a/ipaserver/winsync_migrate/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# Authors: Tomas Babej -# -# Copyright (C) 2015 Red Hat -# see file 'COPYING' for use and warranty information -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# - -""" -Base subpackage for winsync-migrate related code. -""" diff --git a/ipaserver/winsync_migrate/base.py b/ipaserver/winsync_migrate/base.py index 21056a070..cb62c7e11 100644 --- a/ipaserver/winsync_migrate/base.py +++ b/ipaserver/winsync_migrate/base.py @@ -32,7 +32,7 @@ from ipaserver.install import replication DEFAULT_TRUST_VIEW_NAME = u'Default Trust View' -class MigrateWinsync(admintool.AdminTool): +class WinsyncMigrate(admintool.AdminTool): """ Tool to migrate winsync users. """ @@ -53,7 +53,7 @@ class MigrateWinsync(admintool.AdminTool): """ Adds command line options to the tool. """ - super(MigrateWinsync, cls).add_options(parser) + super(WinsyncMigrate, cls).add_options(parser) parser.add_option( "--realm", @@ -77,8 +77,7 @@ class MigrateWinsync(admintool.AdminTool): the realm passed via --realm option """ - # Require root to have access to HTTP keytab - super(MigrateWinsync, self).validate_options(needs_root=True) + super(WinsyncMigrate, self).validate_options(needs_root=True) if self.options.realm is None: raise admintool.ScriptError( @@ -223,10 +222,10 @@ class MigrateWinsync(admintool.AdminTool): except errors.DatabaseError, e: sys.exit("Cannot connect to the LDAP database. Please check if IPA is running.") - super(MigrateWinsync, cls).main(argv) + super(WinsyncMigrate, cls).main(argv) def run(self): - super(MigrateWinsync, self).run() + super(WinsyncMigrate, self).run() # Stop winsync agreement with the given host self.delete_winsync_agreement()