ipatests: rename config_replica_resolvconf_with_master_data()

config_replica_resolvconf_with_master_data() is not replica specific.
Rename to config_host_resolvconf_with_master_data() as it is not tied
to any role (master, replica, client).

Signed-off-by: François Cami <fcami@redhat.com>
Reviewed-By: Sergey Orlov <sorlov@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
This commit is contained in:
François Cami 2019-07-30 16:30:41 +02:00
parent 21cd9775ec
commit 526b85a66e
3 changed files with 10 additions and 10 deletions

View File

@ -414,13 +414,13 @@ def master_authoritative_for_client_domain(master, client):
return result.returncode == 0
def config_replica_resolvconf_with_master_data(master, replica):
def config_host_resolvconf_with_master_data(master, host):
"""
Configure replica /etc/resolv.conf to use master as DNS server
Configure host /etc/resolv.conf to use master as DNS server
"""
content = ('search {domain}\nnameserver {master_ip}'
.format(domain=master.domain.name, master_ip=master.ip))
replica.put_file_contents(paths.RESOLV_CONF, content)
host.put_file_contents(paths.RESOLV_CONF, content)
def install_replica(master, replica, setup_ca=True, setup_dns=False,

View File

@ -495,12 +495,12 @@ class TestBackupAndRestoreWithReplica(IntegrationTest):
# Configure /etc/resolv.conf on each replica to use the master as DNS
# Otherwise ipa-replica-manage re-initialize is unable to
# resolve the master name
tasks.config_replica_resolvconf_with_master_data(
cls.master,
cls.replica1)
tasks.config_replica_resolvconf_with_master_data(
cls.master,
cls.replica2)
tasks.config_host_resolvconf_with_master_data(
cls.master, cls.replica1
)
tasks.config_host_resolvconf_with_master_data(
cls.master, cls.replica2
)
# Configure only master and one replica.
# Replica is configured without CA
tasks.install_topo(

View File

@ -42,7 +42,7 @@ class TestNFS(IntegrationTest):
clients = (cls.clients[0], cls.replicas[0], cls.replicas[1])
for client in clients:
tasks.backup_file(client, paths.RESOLV_CONF)
tasks.config_replica_resolvconf_with_master_data(
tasks.config_host_resolvconf_with_master_data(
cls.master, client
)
tasks.install_client(cls.master, client)