diff options
author | Holger Weiß <holger@zedat.fu-berlin.de> | 2011-07-05 23:24:21 +0200 |
---|---|---|
committer | Holger Weiß <holger@zedat.fu-berlin.de> | 2011-07-05 23:24:21 +0200 |
commit | 66b3038124bcf29969f47845b5de8fae47ccb01e (patch) | |
tree | 201f7bc581c2e1e1fa65992c4adc17fe55499c73 /src | |
parent | 653fe9d7f8c62b812e5dbd42ab93cf72387f3ca1 (diff) | |
download | bcfg2-66b3038124bcf29969f47845b5de8fae47ccb01e.tar.gz bcfg2-66b3038124bcf29969f47845b5de8fae47ccb01e.tar.bz2 bcfg2-66b3038124bcf29969f47845b5de8fae47ccb01e.zip |
bcfg2-admin compare: Check for removed bundles
Check for bundles specified in the old configuration but not in the new
configuration (not just the other way round).
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/Server/Admin/Compare.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/Server/Admin/Compare.py b/src/lib/Server/Admin/Compare.py index 54f3750e9..19a0bf002 100644 --- a/src/lib/Server/Admin/Compare.py +++ b/src/lib/Server/Admin/Compare.py @@ -90,6 +90,11 @@ class Compare(Bcfg2.Server.Admin.Mode): bundle.set('name', bundle.get('name')[:-4]) rcs = [] + for bundle in old.findall('./Bundle'): + if len(new.xpath('Bundle[@name="%s"]' % (bundle.get('name')))) == 0: + print("Bundle %s only in old configuration" % + bundle.get('name')) + rcs.append(False) for bundle in new.findall('./Bundle'): equiv = old.xpath('Bundle[@name="%s"]' % (bundle.get('name'))) if len(equiv) == 0: |