summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSol Jerome <solj@ices.utexas.edu>2009-09-07 21:15:05 +0000
committerSol Jerome <solj@ices.utexas.edu>2009-09-07 21:15:05 +0000
commitd45f6d05a3c4d88177813d3df567fe219b8fdfad (patch)
tree409953edf7b58cffa5a2a1fcf69cf8a5d995889d
parenta1f7a568112f61daaa9b2ac9903419f2d4718c40 (diff)
downloadbcfg2-d45f6d05a3c4d88177813d3df567fe219b8fdfad.tar.gz
bcfg2-d45f6d05a3c4d88177813d3df567fe219b8fdfad.tar.bz2
bcfg2-d45f6d05a3c4d88177813d3df567fe219b8fdfad.zip
Compat: Fix plugin to generate proper spec for older clients
Signed-off-by: Sol Jerome <solj@ices.utexas.edu> git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5418 ce84e21b-d406-0410-9b95-82705330c041
-rw-r--r--src/lib/Server/Plugins/Compat.py18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/lib/Server/Plugins/Compat.py b/src/lib/Server/Plugins/Compat.py
index 8e3aa7102..f381fe982 100644
--- a/src/lib/Server/Plugins/Compat.py
+++ b/src/lib/Server/Plugins/Compat.py
@@ -6,11 +6,13 @@ __revision__ = '$Revision$'
import Bcfg2.Server.Plugin
-COMPAT_DICT = {'configfile': 'ConfigFile',
- 'device': 'Device',
- 'directory': 'Directory',
- 'permissions': 'Permissions',
- 'symlink': 'SymLink'}
+# FIXME: We will need this mapping if we decide to change the
+# specification to use lowercase types for new POSIX entry types
+#COMPAT_DICT = {'configfile': 'ConfigFile',
+# 'device': 'Device',
+# 'directory': 'Directory',
+# 'permissions': 'Permissions',
+# 'symlink': 'SymLink'}
class Compat(Bcfg2.Server.Plugin.Plugin,
Bcfg2.Server.Plugin.GoalValidator):
@@ -27,6 +29,8 @@ class Compat(Bcfg2.Server.Plugin.Plugin,
for entry in goal.getchildren():
if entry.tag == 'Path':
oldentry = entry
- entry.tag = COMPAT_DICT['%s' % entry.get('type')]
- entry.set('type', 'Compat')
+ entry.tag = entry.get('type')
+ # FIXME: use another attribute? old clients only
+ # know about type=None
+ #entry.set('type', 'Compat')
goal.replace(oldentry, entry)