diff options
author | Koren Lev <korenlev@gmail.com> | 2017-09-29 01:38:18 +0300 |
---|---|---|
committer | Koren Lev <korenlev@gmail.com> | 2017-09-29 01:38:18 +0300 |
commit | d32f75145676bacefde0d08a14680a5984623451 (patch) | |
tree | 4b5eaf1107e6973b1eac636309a99c83074acbfc /app/utils/inventory_mgr.py | |
parent | 0c5426cd309d720db1e30641e43d311ee0b751b0 (diff) |
release 1.0 calipso for opnfv apex
Change-Id: I3e63cd27c5f4d3756e67a07c749863a68e84dde2
Signed-off-by: Koren Lev <korenlev@gmail.com>
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, |