:type: :py:class:`arnied_api.Arnied`
"""
self._driver = backend_driver
+ # TODO: implement `self._wait_for_arnied()` which should busy-loop with
+ # the arnied varlink socket and handle "Disconnected" errors, then perhaps
+ # drop the old binary cnf store method from the arnied wrapper
log.debug(f"Initialized cnf store with driver `{backend_driver.__name__}`")
def query(self, name=None, instance=None):
:type: :py:class:`CnfBinary`
"""
super().__init__(backend_driver=backend_driver)
+ # We assume that any external events happening to arnied require reinitializing
+ # the cnf store which is bound to the lifespan of a single arnied process.
+ self._call_arnied(arnied_wrapper.verify_running, timeout=self.ARNIED_TIMEOUT)
log.debug(f"Initialized binary cnf store with driver `{backend_driver.__name__}`")
def query(self, name=None, instance=None):
cnf.renumber()
log.debug("Committing variables via binaries:\n%s", cnf)
- self._call_arnied(arnied_wrapper.verify_running, timeout=self.ARNIED_TIMEOUT)
try:
self._driver.set_cnf(input_str=str(cnf), fix_problems=fix_problems)
except subprocess.CalledProcessError as ex:
cnf.renumber()
log.debug("Deleting variables via binaries:\n%s", cnf)
- self._call_arnied(arnied_wrapper.verify_running, timeout=self.ARNIED_TIMEOUT)
try:
self._driver.set_cnf(input_str=str(cnf), delete=True, fix_problems=fix_problems)
except subprocess.CalledProcessError as ex: