From 164661376e18f21cac6b59d45fa003e0ef6ca76a Mon Sep 17 00:00:00 2001 From: agopi Date: Tue, 30 Oct 2018 16:28:58 -0400 Subject: [PATCH] Added more testing to compare soft metadata in CLI One of the edge cases that was missing was that of a service not being present in uuid 2's metadata, added a simple test case to ensure it's present in both datasets before continuing. Change-Id: Ic2c49fb6dc348acf5dff8291008200a24001340f --- browbeat/elastic.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/browbeat/elastic.py b/browbeat/elastic.py index ec0354d60..a9daa5b31 100644 --- a/browbeat/elastic.py +++ b/browbeat/elastic.py @@ -464,6 +464,13 @@ class Elastic(object): "Host [{}] missing ".format(host)) continue for service in meta[0][host]: + if service not in meta[1][host].keys(): + self.logger.debug( + "UUID {} " + "- Missing Service : " + "Host [{}] Service [{}]".format( + uuids[1], host, service)) + continue for options in meta[0][host][service].keys(): if options not in meta[1][host][service]: self.logger.debug(