From 51c868745547d887541120a02c10c2605e1447ae Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 15 May 2013 10:08:23 +0200 Subject: [PATCH] re-add object_prepare, use new run() method Signed-off-by: Nico Schottelius --- cdist/config_install.py | 7 +++++++ scripts/cdist | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/cdist/config_install.py b/cdist/config_install.py index 5adf8b9d..43bfb7e4 100644 --- a/cdist/config_install.py +++ b/cdist/config_install.py @@ -129,6 +129,13 @@ class ConfigInstall(object): raise cdist.Error("The requirements of the following objects could not be resolved: %s" % ("; ".join(info_string))) + def object_prepare(self, cdist_object): + """Prepare object: Run type explorer + manifest""" + self.log.info("Running manifest and explorers for " + cdist_object.name) + self.explorer.run_type_explorers(cdist_object) + self.manifest.run_type_manifest(cdist_object) + cdist_object.state = core.CdistObject.STATE_PREPARED + def object_run(self, cdist_object, dry_run=False): """Run gencode and code for an object""" self.log.debug("Trying to run object " + cdist_object.name) diff --git a/scripts/cdist b/scripts/cdist index 00c55ae8..bca4fea7 100755 --- a/scripts/cdist +++ b/scripts/cdist @@ -160,7 +160,7 @@ def configinstall(args, mode): (time_end - time_start)) if len(failed_hosts) > 0: - raise cdist.Error("Failed to deploy to the following hosts: " + + raise cdist.Error("Failed to configure the following hosts: " + " ".join(failed_hosts)) def configinstall_onehost(host, args, mode, parallel): @@ -179,7 +179,7 @@ def configinstall_onehost(host, args, mode, parallel): debug=args.debug) c = mode(context) - c.deploy_and_cleanup() + c.run() context.cleanup() except cdist.Error as e: