From a0c984acddbe9fc88c588d3b54901a6a40337faa Mon Sep 17 00:00:00 2001
From: Nico Schottelius <nico@kr.ethz.ch>
Date: Wed, 5 Oct 2011 16:38:19 +0200
Subject: [PATCH 1/2] config+install is broken now due to refactoring

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
---
 lib/cdist/config_install.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/cdist/config_install.py b/lib/cdist/config_install.py
index a550c45e..8211f374 100644
--- a/lib/cdist/config_install.py
+++ b/lib/cdist/config_install.py
@@ -81,6 +81,7 @@ class ConfigInstall:
          cdist.exec.run_or_fail(cmd, stdout=output_fd, remote_prefix=self.remote_prefix)
          output_fd.close()
 
+# FIXME: where to call this from?
  def run_type_explorer(self, cdist_object):
      """Run type specific explorers for objects"""
 
@@ -97,6 +98,7 @@ class ConfigInstall:
      # Need to transfer at least the parameters for objects to be useful
      self.path.transfer_object_parameter(cdist_object)
 
+     # FIXME: Broken due to refactoring into type.py
      explorers = self.path.list_type_explorers(type)
      for explorer in explorers:
          remote_cmd = cmd + [os.path.join(self.path.remote_type_explorer_dir(type), explorer)]

From 7f85aab3ef3b63a261be8da5e9edcc1c39765d2c Mon Sep 17 00:00:00 2001
From: Nico Schottelius <nico@kr.ethz.ch>
Date: Wed, 5 Oct 2011 16:45:10 +0200
Subject: [PATCH 2/2] add some pseudo code to adapt to changes

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
---
 lib/cdist/config_install.py | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/lib/cdist/config_install.py b/lib/cdist/config_install.py
index 8211f374..9a84c2cf 100644
--- a/lib/cdist/config_install.py
+++ b/lib/cdist/config_install.py
@@ -260,6 +260,17 @@ class ConfigInstall:
                  log.debug("Skipping rerun of object %s", cdist_object)
                  continue
              else:
+                 # FIXME: run_type_explorer:
+                 # object can return type
+                 # type has explorers
+                 # path knows about where to save explorer output
+                 # type = self.path.objects[object].type()
+                 # self.path.types['type'].explorers()
+                 # for explorer in explorers:
+                 #  output = cdist.exec.run_debug_or_fail_shell(explorer) 
+                 #  if output:
+                 #      write_output_to(output, os.path.join(self.path.objects[object].explorer_dir(),explorer) )
+                 # 
                  self.run_type_explorer(cdist_object)
                  self.run_type_manifest(cdist_object)
                  self.objects_prepared.append(cdist_object)