def __init__(self, api_uri: str, matchbox_path: str, ignition_dict: dict, extra_selector_dict=None):
"""
:param api_uri: http://1.1.1.1:5000
:param matchbox_path: /var/lib/matchbox
:param ignition_dict: ignition.yaml
"""
self.api_uri = api_uri
os.environ["API_URI"] = self.api_uri
self.matchbox_path = matchbox_path
self.ignition_dict = ignition_dict
self._reporting_ignitions()
self.extra_selector = extra_selector_dict if extra_selector_dict else {}
# inMemory cache for http queries
if EC.sync_cache_ttl > 0:
self._cache_query = SimpleCache(default_timeout=EC.sync_cache_ttl)
else:
self._cache_query = NullCache()
评论列表
文章目录