import time
from .. import mgr, logger
-from ..settings import Settings
class NoOrchesrtatorConfiguredException(Exception):
return cls._instance
def _call(self, method, *args, **kwargs):
- if not Settings.ORCHESTRATOR_BACKEND:
+ _backend = mgr.get_module_option_ex("orchestrator_cli", "orchestrator")
+ if not _backend:
raise NoOrchesrtatorConfiguredException()
- return mgr.remote(Settings.ORCHESTRATOR_BACKEND, method, *args,
- **kwargs)
+ return mgr.remote(_backend, method, *args, **kwargs)
def _wait(self, completions):
while not self._call("wait", completions):
return completion.result
def available(self):
- if not Settings.ORCHESTRATOR_BACKEND:
+ _backend = mgr.get_module_option_ex("orchestrator_cli", "orchestrator")
+ if not _backend:
return False
status, desc = self._call("available")
logger.info("[ORCH] is orchestrator available: %s, %s", status, desc)
# NFS Ganesha settings
GANESHA_CLUSTERS_RADOS_POOL_NAMESPACE = ('', str)
- # Orchestrator settings
- ORCHESTRATOR_BACKEND = ('', str)
-
# Prometheus settings
PROMETHEUS_API_HOST = ('', str) # Not in use ATM
ALERTMANAGER_API_HOST = ('', str)