summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSol Jerome <solj@ices.utexas.edu>2010-02-07 20:13:43 +0000
committerSol Jerome <solj@ices.utexas.edu>2010-02-07 20:13:43 +0000
commit110ec1e7cb42410b32b3ee451eccbd5bbfe62ea1 (patch)
tree3eb77fe2ff1b4134890d76d5089ee7ba949b70fe
parentfb2025ba8e8738acf8a076927758d2943e9f9198 (diff)
downloadbcfg2-110ec1e7cb42410b32b3ee451eccbd5bbfe62ea1.tar.gz
bcfg2-110ec1e7cb42410b32b3ee451eccbd5bbfe62ea1.tar.bz2
bcfg2-110ec1e7cb42410b32b3ee451eccbd5bbfe62ea1.zip
POSIXCompat: Clean up FIXME
Signed-off-by: Sol Jerome <solj@ices.utexas.edu> git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5714 ce84e21b-d406-0410-9b95-82705330c041
-rw-r--r--src/lib/Server/Plugins/POSIXCompat.py19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/lib/Server/Plugins/POSIXCompat.py b/src/lib/Server/Plugins/POSIXCompat.py
index 9cd09d454..647e8e631 100644
--- a/src/lib/Server/Plugins/POSIXCompat.py
+++ b/src/lib/Server/Plugins/POSIXCompat.py
@@ -1,21 +1,20 @@
-'''
- This plugin provides a compatibility layer which turns new-style
- POSIX entries into old-style entries.
-'''
+"""This plugin provides a compatibility layer which turns new-style
+POSIX entries into old-style entries.
+"""
+
__revision__ = '$Revision$'
import Bcfg2.Server.Plugin
COMPAT_DICT = {'file': 'ConfigFile',
- 'device': 'device',
'directory': 'Directory',
- 'nonexistent': 'nonexistent',
'permissions': 'Permissions',
'symlink': 'SymLink'}
class POSIXCompat(Bcfg2.Server.Plugin.Plugin,
- Bcfg2.Server.Plugin.GoalValidator):
+ Bcfg2.Server.Plugin.GoalValidator):
+ """POSIXCompat is a goal validator plugin for POSIX entries"""
name = 'POSIXCompat'
__version__ = '$Id$'
__author__ = 'bcfg-dev@mcs.anl.gov'
@@ -25,14 +24,14 @@ class POSIXCompat(Bcfg2.Server.Plugin.Plugin,
Bcfg2.Server.Plugin.GoalValidator.__init__(self)
def validate_goals(self, metadata, goals):
+ """Verify that we are generating correct old
+ Cfg/Directory/Symlink entries"""
for goal in goals:
for entry in goal.getchildren():
if entry.tag == 'Path' and \
entry.get('type') not in ['nonexistent', 'device']:
+ # Use new entry 'type' attribute to map old entry tags
oldentry = entry
entry.tag = COMPAT_DICT[entry.get('type')]
del entry.attrib['type']
- # FIXME: use another attribute? old clients only
- # know about type=None
- #entry.set('type', 'POSIXCompat')
goal.replace(oldentry, entry)