diff --git a/lib/cdist/copy.py b/lib/cdist/copy.py new file mode 100644 index 00000000..b0eae54e --- /dev/null +++ b/lib/cdist/copy.py @@ -0,0 +1,13 @@ + # FIXME: To Copy + def transfer_dir(self, source, destination): + """Transfer directory and previously delete the remote destination""" + self.remove_remote_dir(destination) + cdist.exec.run_or_fail(os.environ['__remote_copy'].split() + + ["-r", source, self.target_host + ":" + destination]) + + # FIXME: To Copy + def transfer_file(self, source, destination): + """Transfer file""" + cdist.exec.run_or_fail(os.environ['__remote_copy'].split() + + [source, self.target_host + ":" + destination]) + diff --git a/lib/cdist/path.py b/lib/cdist/path.py index 448fc918..2f6670e8 100644 --- a/lib/cdist/path.py +++ b/lib/cdist/path.py @@ -113,19 +113,6 @@ class Path: def remove_remote_dir(self, destination): cdist.exec.run_or_fail(["rm", "-rf", destination], remote_prefix=True) - # FIXME: To Copy - def transfer_dir(self, source, destination): - """Transfer directory and previously delete the remote destination""" - self.remove_remote_dir(destination) - cdist.exec.run_or_fail(os.environ['__remote_copy'].split() + - ["-r", source, self.target_host + ":" + destination]) - - # FIXME: To Copy - def transfer_file(self, source, destination): - """Transfer file""" - cdist.exec.run_or_fail(os.environ['__remote_copy'].split() + - [source, self.target_host + ":" + destination]) - # FIXME Move into configinstall def transfer_object_parameter(self, cdist_object): """Transfer the object parameter to the remote destination"""