summaryrefslogtreecommitdiffstats
path: root/ipatests/test_integration/host.py
diff options
context:
space:
mode:
authorPetr Viktorin <pviktori@redhat.com>2013-06-27 15:28:13 +0200
committerPetr Viktorin <pviktori@redhat.com>2013-07-25 12:32:35 +0200
commit13f4b7e9cf8f0f9f0c33775ac8b64d28d9c82323 (patch)
treed853510dce1287d2366763efe38a6bff0f40015e /ipatests/test_integration/host.py
parentac70c2cc5cf6434045dcb8c7f54b4b0b59873c47 (diff)
downloadfreeipa-13f4b7e9cf8f0f9f0c33775ac8b64d28d9c82323.tar.gz
freeipa-13f4b7e9cf8f0f9f0c33775ac8b64d28d9c82323.tar.xz
freeipa-13f4b7e9cf8f0f9f0c33775ac8b64d28d9c82323.zip
Add install_topo to test tasks
This allows a cluster of replicas and clients to be installed in a named topology. Several named topologies are available (star, line, complete, tree, tree2) and new ones can be defined as a simple function.
Diffstat (limited to 'ipatests/test_integration/host.py')
-rw-r--r--ipatests/test_integration/host.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/ipatests/test_integration/host.py b/ipatests/test_integration/host.py
index e3cc4c924..38e6a34e0 100644
--- a/ipatests/test_integration/host.py
+++ b/ipatests/test_integration/host.py
@@ -162,6 +162,10 @@ class Host(object):
self.log_collectors = []
+ def __str__(self):
+ template = ('<{s.__class__.__name__} {s.hostname} ({s.role})>')
+ return template.format(s=self)
+
def __repr__(self):
template = ('<{s.__module__}.{s.__class__.__name__} '
'{s.hostname} ({s.role})>')
@@ -222,9 +226,11 @@ class Host(object):
:param raiseonerr: If true, an exception will be raised if the command
does not exit with return code 0
"""
+ assert self.transport
+
+ self._command_index += 1
command = RemoteCommand(self, argv, index=self._command_index,
log_stdout=log_stdout)
- self._command_index += 1
if cwd is None:
cwd = self.config.test_dir