Decorate the ConnectionBase methods, switch to calling super from individual connection classes

This commit is contained in:
Matt Martz 2015-06-04 13:27:18 -05:00
parent 9754c67138
commit bce281014c
5 changed files with 32 additions and 12 deletions

View file

@ -92,16 +92,19 @@ class ConnectionBase(with_metaclass(ABCMeta, object)):
"""Connect to the host we've been initialized with"""
pass
@ensure_connect
@abstractmethod
def exec_command(self, cmd, tmp_path, executable=None, in_data=None):
"""Run a command on the remote host"""
pass
@ensure_connect
@abstractmethod
def put_file(self, in_path, out_path):
"""Transfer a file from local to remote"""
pass
@ensure_connect
@abstractmethod
def fetch_file(self, in_path, out_path):
"""Fetch a file from remote to local"""