From d32f75145676bacefde0d08a14680a5984623451 Mon Sep 17 00:00:00 2001 From: Koren Lev Date: Fri, 29 Sep 2017 01:38:18 +0300 Subject: release 1.0 calipso for opnfv apex Change-Id: I3e63cd27c5f4d3756e67a07c749863a68e84dde2 Signed-off-by: Koren Lev --- app/utils/inventory_mgr.py | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'app/utils/inventory_mgr.py') diff --git a/app/utils/inventory_mgr.py b/app/utils/inventory_mgr.py index 257b0e3..77c1165 100644 --- a/app/utils/inventory_mgr.py +++ b/app/utils/inventory_mgr.py @@ -77,13 +77,16 @@ class InventoryMgr(MongoAccess, metaclass=Singleton): self.set_collection("clique_constraints") self.set_collection("cliques") self.set_collection("monitoring_config") - self.set_collection("constants", use_default_name=True) self.set_collection("scans") self.set_collection("messages") - self.set_collection("monitoring_config_templates", - use_default_name=True) self.set_collection("environments_config") self.set_collection("supported_environments") + self.set_collection("constants", + use_default_name=True) + self.set_collection("monitoring_config_templates", + use_default_name=True) + self.set_collection("api_tokens", + use_default_name=True) def clear(self, scan_plan): if scan_plan.inventory_only: @@ -348,9 +351,13 @@ class InventoryMgr(MongoAccess, metaclass=Singleton): if isinstance(env_config['mechanism_drivers'], list) \ else env_config['mechanism_drivers'] - full_env = {'environment.distribution': env_config['distribution'], - 'environment.type_drivers': env_config['type_drivers'], - 'environment.mechanism_drivers': mechanism_driver} + full_env = { + 'environment.distribution': env_config['distribution'], + 'environment.distribution_version': + {"$in": [env_config['distribution_version']]}, + 'environment.type_drivers': env_config['type_drivers'], + 'environment.mechanism_drivers': mechanism_driver + } return self.is_feature_supported_in_env(full_env, feature) def is_feature_supported_in_env(self, env_def: dict, -- cgit 1.2.3-korg