From 66b3038124bcf29969f47845b5de8fae47ccb01e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Holger=20Wei=C3=9F?= Date: Tue, 5 Jul 2011 23:24:21 +0200 Subject: 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). --- src/lib/Server/Admin/Compare.py | 5 +++++ 1 file changed, 5 insertions(+) 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: -- cgit v1.2.3-1-g7c22