From d6cf85e6f6407c7b9b5fec96c55a7799da4c0db7 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Wed, 19 Oct 2011 15:17:45 +0200 Subject: [PATCH] implement /__object_fq/__object_name/ Signed-off-by: Steven Armstrong --- lib/cdist/core/code.py | 3 ++- lib/cdist/core/manifest.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/cdist/core/code.py b/lib/cdist/core/code.py index 2505925c..51912559 100644 --- a/lib/cdist/core/code.py +++ b/lib/cdist/core/code.py @@ -105,7 +105,8 @@ class Code(object): '__type': cdist_object.type.absolute_path, '__object': cdist_object.absolute_path, '__object_id': cdist_object.object_id, - '__object_fq': cdist_object.path, + '__object_name': cdist_object.name, + '__self': cdist_object.name, }) return self.local.run_script(script, env=env, return_output=True) diff --git a/lib/cdist/core/manifest.py b/lib/cdist/core/manifest.py index 38d2ee98..704a3978 100644 --- a/lib/cdist/core/manifest.py +++ b/lib/cdist/core/manifest.py @@ -92,10 +92,10 @@ class Manifest(object): env = os.environ.copy() env.update(self.env) env.update({ - '__self': cdist_object.name, '__object': cdist_object.absolute_path, '__object_id': cdist_object.object_id, - '__object_fq': cdist_object.name, + '__object_name': cdist_object.name, + '__self': cdist_object.name, '__type': cdist_object.type.absolute_path, '__cdist_manifest': script, })