}
takes_options = [
- Option("--host", help="LDB URL for database or target server", type=str),
+ Option("--url", help="LDB URL for database or target server", type=str),
Option("--force", help="Force seizing of the role without attempting to transfer first.", action="store_true"),
Option("--role", type="choice", choices=["rid", "pdc", "infrastructure","schema","naming","all"],
help="""The FSMO role to seize or transfer.\n
"fSMORoleOwner")
samdb.modify(m)
- def run(self, subcommand, force=None, host=None, role=None,
+ def run(self, subcommand, force=None, url=None, role=None,
credopts=None, sambaopts=None, versionopts=None):
lp = sambaopts.get_loadparm()
creds = credopts.get_credentials(lp, fallback_machine=True)
- samdb = SamDB(url=host, session_info=system_session(),
+ samdb = SamDB(url=url, session_info=system_session(),
credentials=creds, lp=lp)
domain_dn = samdb.domain_dn()
creds = self.get_credentials()
cmd_line_auth = "-U%s/%s%%%s" % (creds.get_domain(),
creds.get_username(), creds.get_password())
- # bin/samba-tool fsmo transfer --role=role --host=ldap://DC:389
- cmd_line = "%s fsmo transfer --role=%s --host=ldap://%s:389 %s" % (net_cmd, role, DC,
+ # bin/samba-tool fsmo transfer --role=role --url=ldap://DC:389
+ cmd_line = "%s fsmo transfer --role=%s --url=ldap://%s:389 %s" % (net_cmd, role, DC,
cmd_line_auth)
ret = os.system(cmd_line)
self.assertEquals(ret, 0, "Transferring role %s to %s has failed!" % (role, DC))