From 48ae37e832d921ecd0fd32bb250723b1d56429db Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Thu, 13 Oct 2011 13:04:23 +0200 Subject: [PATCH] implement transfer_object_parameters Signed-off-by: Steven Armstrong --- lib/cdist/core/explorer.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/cdist/core/explorer.py b/lib/cdist/core/explorer.py index c79124b3..ad19db20 100644 --- a/lib/cdist/core/explorer.py +++ b/lib/cdist/core/explorer.py @@ -74,7 +74,8 @@ class Explorer(object): '__explorer': self.remote.global_explorer_path, } - # FIXME: should i do this? + ### global + def transfer_global_explorers(self): """Transfer the global explorers to the remote side.""" self.remote.mkdir(self.remote.global_explorer_path) @@ -85,7 +86,8 @@ class Explorer(object): script = os.path.join(self.remote.global_explorer_path, explorer) return self.remote.run_script(script, env=self.env) - # FIXME: should i do this? + ### type + def transfer_type_explorers(self, cdist_type): """Transfer the type explorers for the given type to the remote side.""" source = os.path.join(self.local.type_path, cdist_type.explorer_path) @@ -93,9 +95,12 @@ class Explorer(object): self.remote.mkdir(destination) self.remote.transfer(source, destination) - # FIXME: should i do this? probably not def transfer_object_parameters(self, cdist_object): - pass + """Transfer the parameters for the given object to the remote side.""" + source = os.path.join(self.local.object_path, cdist_object.parameter_path) + destination = os.path.join(self.remotei.object_path, cdist_object.parameter_path) + self.remote.mkdir(destination) + self.remote.transfer(source, destination) def run_type_explorer(self, explorer, cdist_object): """Run the given type explorer for the given object and return it's output."""