From 31ce938593ca53c32a7c7756eadd8a373676f42e Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Thu, 13 Oct 2011 14:57:49 +0200 Subject: [PATCH] implement transfer_code_remote Signed-off-by: Steven Armstrong --- lib/cdist/core/code.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/cdist/core/code.py b/lib/cdist/core/code.py index a6804c0b..c42c360b 100644 --- a/lib/cdist/core/code.py +++ b/lib/cdist/core/code.py @@ -115,3 +115,10 @@ class Code(object): def run_gencode_remote(self, cdist_object): """Run the gencode-remote script for the given cdist object.""" return self._run_gencode(cdist_object, 'remote') + + def transfer_code_remote(self, cdist_object): + """Transfer the code_remote script for the given object to the remote side.""" + source = os.path.join(self.local.object_path, cdist_object.code_remote_path) + destination = os.path.join(self.remote.object_path, cdist_object.code_remote_path) + self.remote.mkdir(destination) + self.remote.transfer(source, destination)