winsync-migrate: Rename to tool to achive consistency with other tools

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

Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
This commit is contained in:
Tomas Babej 2015-04-29 08:16:09 +02:00
parent 7017d9e8a6
commit e9a3b99717
3 changed files with 7 additions and 30 deletions

View File

@ -18,6 +18,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
from ipaserver.winsync_migrate.base import MigrateWinsync from ipaserver.winsync_migrate.base import WinsyncMigrate
MigrateWinsync.run_cli() WinsyncMigrate.run_cli()

View File

@ -1,22 +0,0 @@
# Authors: Tomas Babej <tbabej@redhat.com>
#
# 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 <http://www.gnu.org/licenses/>.
#
"""
Base subpackage for winsync-migrate related code.
"""

View File

@ -32,7 +32,7 @@ from ipaserver.install import replication
DEFAULT_TRUST_VIEW_NAME = u'Default Trust View' DEFAULT_TRUST_VIEW_NAME = u'Default Trust View'
class MigrateWinsync(admintool.AdminTool): class WinsyncMigrate(admintool.AdminTool):
""" """
Tool to migrate winsync users. Tool to migrate winsync users.
""" """
@ -53,7 +53,7 @@ class MigrateWinsync(admintool.AdminTool):
""" """
Adds command line options to the tool. Adds command line options to the tool.
""" """
super(MigrateWinsync, cls).add_options(parser) super(WinsyncMigrate, cls).add_options(parser)
parser.add_option( parser.add_option(
"--realm", "--realm",
@ -77,8 +77,7 @@ class MigrateWinsync(admintool.AdminTool):
the realm passed via --realm option the realm passed via --realm option
""" """
# Require root to have access to HTTP keytab super(WinsyncMigrate, self).validate_options(needs_root=True)
super(MigrateWinsync, self).validate_options(needs_root=True)
if self.options.realm is None: if self.options.realm is None:
raise admintool.ScriptError( raise admintool.ScriptError(
@ -223,10 +222,10 @@ class MigrateWinsync(admintool.AdminTool):
except errors.DatabaseError, e: except errors.DatabaseError, e:
sys.exit("Cannot connect to the LDAP database. Please check if IPA is running.") 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): def run(self):
super(MigrateWinsync, self).run() super(WinsyncMigrate, self).run()
# Stop winsync agreement with the given host # Stop winsync agreement with the given host
self.delete_winsync_agreement() self.delete_winsync_agreement()