summaryrefslogtreecommitdiffstats
path: root/ipatests/test_integration/host.py
diff options
context:
space:
mode:
authorTomas Babej <tbabej@redhat.com>2013-09-04 16:26:23 +0200
committerPetr Viktorin <pviktori@redhat.com>2013-10-24 14:08:40 +0200
commit35d843b273340cbc7459479d8362241fef3a2556 (patch)
treee89b6f04e6ea75522c92c98890f052089de9f3a2 /ipatests/test_integration/host.py
parente8941ef6cbdf4b8aba7bd66c472a7acb0aa0a4a1 (diff)
downloadfreeipa-35d843b273340cbc7459479d8362241fef3a2556.tar.gz
freeipa-35d843b273340cbc7459479d8362241fef3a2556.tar.xz
freeipa-35d843b273340cbc7459479d8362241fef3a2556.zip
ipatests: Add WinHost class
Part of: https://fedorahosted.org/freeipa/ticket/3834
Diffstat (limited to 'ipatests/test_integration/host.py')
-rw-r--r--ipatests/test_integration/host.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/ipatests/test_integration/host.py b/ipatests/test_integration/host.py
index a5cced84c..157c5eda8 100644
--- a/ipatests/test_integration/host.py
+++ b/ipatests/test_integration/host.py
@@ -42,6 +42,8 @@ class BaseHost(object):
self.hostname = shortname + '.' + self.domain.name
self.external_hostname = hostname
+ self.netbios = self.domain.name.split('.')[0].upper()
+
self.logger_name = '%s.%s.%s' % (
self.__module__, type(self).__name__, shortname)
self.log = log_mgr.get_logger(self.logger_name)
@@ -94,6 +96,12 @@ class BaseHost(object):
def from_env(cls, env, domain, hostname, role, index):
ip = env.get('BEAKER%s%s_IP_env%s' %
(role.upper(), index, domain.index), None)
+
+ if role == 'ad':
+ cls = WinHost
+ else:
+ cls = Host
+
self = cls(domain, hostname, role, index, ip)
return self
@@ -217,3 +225,14 @@ class Host(BaseHost):
command.wait(raiseonerr=raiseonerr)
return command
+
+
+class WinHost(BaseHost):
+ """
+ Representation of a remote Windows host.
+
+ This serves as a sketch class once we move from manual preparation of
+ Active Directory to the automated setup.
+ """
+
+ pass