diff options
author | Petr Viktorin <pviktori@redhat.com> | 2013-09-17 12:24:40 +0200 |
---|---|---|
committer | Petr Viktorin <pviktori@redhat.com> | 2013-10-03 18:57:41 +0200 |
commit | 758c73e1493d8499f346c1fb7e3ca1e18ec1454e (patch) | |
tree | fd9b4bef5611baa58caf924606862b8eca885608 /ipatests/test_integration/test_caless.py | |
parent | 7d2d1cb59d22eeed9ed62541299e96ea97006d0e (diff) | |
download | freeipa.git-758c73e1493d8499f346c1fb7e3ca1e18ec1454e.tar.gz freeipa.git-758c73e1493d8499f346c1fb7e3ca1e18ec1454e.tar.xz freeipa.git-758c73e1493d8499f346c1fb7e3ca1e18ec1454e.zip |
test_integration.host: Move transport-related functionality to a new module
This will make it possible to use a different mechanism for cases like
- Paramiko is not available
- Hosts without SSH servers (e.g. Windows)
Add BaseHost, Transport & Command base classes that define the interface
and common functionality, and Host, ParamikoTransport & SSHCommand with
specific details.
The {get,put}_file_contents methods are left on Host for convenience;
all other Transport methods must be now accessed through the transport.
Part of the work for https://fedorahosted.org/freeipa/ticket/3890
Diffstat (limited to 'ipatests/test_integration/test_caless.py')
-rw-r--r-- | ipatests/test_integration/test_caless.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/ipatests/test_integration/test_caless.py b/ipatests/test_integration/test_caless.py index 643c9c48..12faf296 100644 --- a/ipatests/test_integration/test_caless.py +++ b/ipatests/test_integration/test_caless.py @@ -103,7 +103,7 @@ class CALessBase(IntegrationTest): host.mkdir_recursive(cls.crl_path) for source in glob.glob(os.path.join(base, '*.crl')): dest = os.path.join(cls.crl_path, os.path.basename(source)) - host.put_file(source, dest) + host.transport.put_file(source, dest) @classmethod def uninstall(cls): @@ -174,8 +174,8 @@ class CALessBase(IntegrationTest): @classmethod def copy_cert(cls, host, filename): - host.put_file(os.path.join(cls.cert_dir, filename), - os.path.join(host.config.test_dir, filename)) + host.transport.put_file(os.path.join(cls.cert_dir, filename), + os.path.join(host.config.test_dir, filename)) @classmethod def uninstall_server(self, host=None): @@ -211,8 +211,9 @@ class CALessBase(IntegrationTest): if dirsrv_pkcs12_exists: files_to_copy.append(dirsrv_pkcs12) for filename in set(files_to_copy): - master.put_file(os.path.join(self.cert_dir, filename), - os.path.join(master.config.test_dir, filename)) + master.transport.put_file( + os.path.join(self.cert_dir, filename), + os.path.join(master.config.test_dir, filename)) self.collect_log(replica, '/var/log/ipareplica-install.log') self.collect_log(replica, '/var/log/ipaclient-install.log') |