diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2007-07-23 18:13:32 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2007-07-23 18:13:32 +0000 |
commit | 8823854ee3b106cb17e8a43626f70f51726f3c15 (patch) | |
tree | f9a758348218ec83270b03822c8915e455dded09 | |
parent | 4d663541a23c9bc0348a32175e93cd35295a72b1 (diff) | |
download | bcfg2-8823854ee3b106cb17e8a43626f70f51726f3c15.tar.gz bcfg2-8823854ee3b106cb17e8a43626f70f51726f3c15.tar.bz2 bcfg2-8823854ee3b106cb17e8a43626f70f51726f3c15.zip |
Add a realname attribute in altsrc bound entries and add TCheetah support
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@3543 ce84e21b-d406-0410-9b95-82705330c041
-rw-r--r-- | src/lib/Server/Core.py | 2 | ||||
-rw-r--r-- | src/lib/Server/Plugins/TCheetah.py | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/Server/Core.py b/src/lib/Server/Core.py index c24bc6948..35f3288dc 100644 --- a/src/lib/Server/Core.py +++ b/src/lib/Server/Core.py @@ -276,10 +276,12 @@ class Core(object): if 'altsrc' in entry.attrib: oldname = entry.get('name') entry.set('name', entry.get('altsrc')) + entry.set('realname', oldname) del entry.attrib['altsrc'] try: ret = self.Bind(entry, metadata) entry.set('name', oldname) + del entry.attrib['realname'] return ret except: entry.set('name', oldname) diff --git a/src/lib/Server/Plugins/TCheetah.py b/src/lib/Server/Plugins/TCheetah.py index 748d4cd14..8ad0bcd42 100644 --- a/src/lib/Server/Plugins/TCheetah.py +++ b/src/lib/Server/Plugins/TCheetah.py @@ -47,6 +47,7 @@ class TemplateFile: '''Build literal file information''' self.template.metadata = metadata self.template.path = entry.get('name') + self.template.realpath = entry.get('realname', entry.get('name')) self.template.properties = self.properties.properties try: entry.text = str(self.template) |