diff options
Diffstat (limited to 'app/utils/inventory_mgr.py')
-rw-r--r-- | app/utils/inventory_mgr.py | 19 |
1 files changed, 13 insertions, 6 deletions
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, |