mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-24 16:10:02 -06:00
ipa_restore: Import only FQDN from ipalib.constants
https://fedorahosted.org/freeipa/ticket/5619 Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
parent
e45f7314e1
commit
5b32ffcd1a
@ -27,7 +27,8 @@ import itertools
|
||||
|
||||
from six.moves.configparser import SafeConfigParser
|
||||
|
||||
from ipalib import api, errors, constants
|
||||
from ipalib import api, errors
|
||||
from ipalib.constants import FQDN
|
||||
from ipapython import version, ipautil, certdb
|
||||
from ipapython.ipautil import run, user_input
|
||||
from ipapython import admintool
|
||||
@ -215,7 +216,7 @@ class Restore(admintool.AdminTool):
|
||||
self.backup_dir = os.path.join(paths.IPA_BACKUP_DIR, self.backup_dir)
|
||||
|
||||
self.log.info("Preparing restore from %s on %s",
|
||||
self.backup_dir, constants.FQDN)
|
||||
self.backup_dir, FQDN)
|
||||
|
||||
self.header = os.path.join(self.backup_dir, 'header')
|
||||
|
||||
@ -278,10 +279,10 @@ class Restore(admintool.AdminTool):
|
||||
self.log.info("Performing %s restore from %s backup" %
|
||||
(restore_type, self.backup_type))
|
||||
|
||||
if self.backup_host != constants.FQDN:
|
||||
if self.backup_host != FQDN:
|
||||
raise admintool.ScriptError(
|
||||
"Host name %s does not match backup name %s" %
|
||||
(constants.FQDN, self.backup_host))
|
||||
(FQDN, self.backup_host))
|
||||
|
||||
if self.backup_ipa_version != str(version.VERSION):
|
||||
self.log.warning(
|
||||
|
Loading…
Reference in New Issue
Block a user