From f431b4b08bf2e0b28225bfdf84f62aa2a8aa9bbb Mon Sep 17 00:00:00 2001 From: Sol Jerome Date: Mon, 7 Sep 2009 01:54:44 +0000 Subject: POSIX: Add support for unified Path entries This commit adds support for a new Path entry which unifies all the various POSIX entry types. A new plugin is included which will allow you to transform new Path entries back into their old format (for compatibility with old clients). Signed-off-by: Sol Jerome git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5414 ce84e21b-d406-0410-9b95-82705330c041 --- src/lib/Client/Tools/POSIX.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'src/lib/Client/Tools/POSIX.py') diff --git a/src/lib/Client/Tools/POSIX.py b/src/lib/Client/Tools/POSIX.py index bfbe79066..bc9626e88 100644 --- a/src/lib/Client/Tools/POSIX.py +++ b/src/lib/Client/Tools/POSIX.py @@ -79,11 +79,11 @@ def isString(strng): class POSIX(Bcfg2.Client.Tools.Tool): '''POSIX File support code''' name = 'POSIX' - __handles__ = [('ConfigFile', None), ('Directory', None), - ('Path', 'ConfigFile'), ('Path', 'Device'), - ('Path', 'Directory'), ('Path', 'Perms'), - ('Path', 'SymLink'), ('Permissions', None), - ('SymLink', None)] + __handles__ = [('ConfigFile', None), ('ConfigFile', 'Compat'), + ('Directory', None), ('Path', 'ConfigFile'), + ('Path', 'Device'), ('Path', 'Directory'), + ('Path', 'Perms'), ('Path', 'SymLink'), + ('Permissions', None), ('SymLink', None)] __req__ = {'ConfigFile': ['name', 'owner', 'group', 'perms'], 'Directory': ['name', 'owner', 'group', 'perms'], 'Path': ['name', 'type'], @@ -149,6 +149,12 @@ class POSIX(Bcfg2.Client.Tools.Tool): except OSError: return False + def VerifyDevice(self, entry, _): + return False + + def InstallDevice(self, entry): + return False + def VerifyDirectory(self, entry, modlist): '''Verify Directory Entry''' while len(entry.get('perms', '')) < 4: -- cgit v1.2.3-1-g7c22