From 74c280911bb1e3bca234d72236df9a584feb29c9 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 10 Sep 2011 00:53:10 +0200 Subject: [PATCH] begin run_object_gencode() and import missing FIXME bits deploy_to() Signed-off-by: Nico Schottelius --- bin/cdist | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/bin/cdist b/bin/cdist index ff114325..46422ce5 100755 --- a/bin/cdist +++ b/bin/cdist @@ -429,6 +429,23 @@ class Cdist: self.shell_run_or_debug_fail(manifest, [manifest], env=env) + def run_object_gencode(self, cdist_object): + """Run the gencode scripts for the object""" + log.info("Running manifest %s, env=%s", manifest, extra_env) + env = os.environ.copy() + + env['__target_host'] = self.target_host + env['__global'] = self.out_dir + + # FIXME: if -local, -remote... + + + # Other environment stuff + if extra_env: + env.update(extra_env) + + self.shell_run_or_debug_fail(manifest, [manifest], env=env) + def deploy_to(self): """Mimic the old deploy to: Deploy to one host""" @@ -451,6 +468,17 @@ class Cdist: objects = self.list_objects() + # Now do the final steps over the existing objects + for cdist_object in objects: + # FIXME: Check requirements and execute those before + + # FIXME: to be implemented + # cdist-object-gencode-run "$__cdist_target_host" "$__cdist_object_self" + # cdist-object-code-run "$__cdist_target_host" "$__cdist_object_self" + + self.run_type_explorer(cdist_object) + self.run_type_manifest(cdist_object) + if __name__ == "__main__":