summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHolger Weiß <holger@zedat.fu-berlin.de>2011-07-05 18:01:27 +0200
committerHolger Weiß <holger@zedat.fu-berlin.de>2011-07-05 18:01:27 +0200
commit967c76d15ba2ed299e9975186db01b5db68418da (patch)
tree71fa894c8f1bbf6aa35d0ab4f9d828f9827146a7 /src
parent1e6857d3e444b8132668d0e36357ff776d9b0e4f (diff)
downloadbcfg2-967c76d15ba2ed299e9975186db01b5db68418da.tar.gz
bcfg2-967c76d15ba2ed299e9975186db01b5db68418da.tar.bz2
bcfg2-967c76d15ba2ed299e9975186db01b5db68418da.zip
bcfg2-admin compare: Handle POSIX <Path> entries
Let "bcfg2-admin compare" handle POSIX <Path> tags instead of the old-style entries. While at it, add support for all attributes which might show up in configuration specifications.
Diffstat (limited to 'src')
-rw-r--r--src/lib/Server/Admin/Compare.py22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/lib/Server/Admin/Compare.py b/src/lib/Server/Admin/Compare.py
index cd6a6e42e..7a28a8560 100644
--- a/src/lib/Server/Admin/Compare.py
+++ b/src/lib/Server/Admin/Compare.py
@@ -14,13 +14,19 @@ class Compare(Bcfg2.Server.Admin.Mode):
def __init__(self, configfile):
Bcfg2.Server.Admin.Mode.__init__(self, configfile)
- self.important = {'Package': ['name', 'version'],
- 'Service': ['name', 'status'],
- 'Directory': ['name', 'owner', 'group', 'perms'],
- 'SymLink': ['name', 'to'],
- 'ConfigFile': ['name', 'owner', 'group', 'perms'],
- 'Permissions': ['name', 'perms'],
- 'PostInstall': ['name']}
+ self.important = {'Path': ['name', 'type', 'owner', 'group', 'perms',
+ 'important', 'paranoid', 'sensitive',
+ 'dev_type', 'major', 'minor', 'prune',
+ 'encoding', 'empty', 'to', 'recursive',
+ 'vcstype', 'sourceurl', 'revision'],
+ 'Package': ['name', 'type', 'version', 'simplefile',
+ 'verify'],
+ 'Service': ['name', 'type', 'status', 'mode',
+ 'target', 'sequence', 'parameters'],
+ 'Action': ['name', 'timing', 'when', 'status',
+ 'command'],
+ 'PostInstall': ['name']
+ }
def compareStructures(self, new, old):
for child in new.getchildren():
@@ -34,7 +40,7 @@ class Compare(Bcfg2.Server.Admin.Mode):
(child.tag, child.get('name')))
continue
elif len(equiv) >= 1:
- if child.tag == 'ConfigFile':
+ if child.tag == 'Path' and child.get('type') == 'file':
if child.text != equiv[0].text:
print(" %s %s contents differ" \
% (child.tag, child.get('name')))