diff --git a/sysinv/sysinv/sysinv/sysinv/helm/helm.py b/sysinv/sysinv/sysinv/sysinv/helm/helm.py index 1ea3fb325d..0290b565c7 100644 --- a/sysinv/sysinv/sysinv/sysinv/helm/helm.py +++ b/sysinv/sysinv/sysinv/sysinv/helm/helm.py @@ -59,16 +59,24 @@ class HelmOperator(object): def __init__(self, dbapi=None): self.dbapi = dbapi - # register chart operators for lookup + # Initialize the plugins + self.helm_system_applications = {} self.chart_operators = {} + self.armada_manifest_operators = {} + # Find all plugins for apps, charts per app, and armada manifest + # operators + self.discover_plugins() + + def discover_plugins(self): + """ Scan for all available plugins """ # dict containing sequence of helm charts per app - self.helm_system_applications = self.get_helm_applications() + self.helm_system_applications = self._load_helm_applications() # dict containing Armada manifest operators per app - self.armada_manifest_operators = self.load_armada_manifest_operators() + self.armada_manifest_operators = self._load_armada_manifest_operators() - def load_armada_manifest_operators(self): + def _load_armada_manifest_operators(self): """Build a dictionary of armada manifest operators""" operators_dict = {} @@ -91,7 +99,7 @@ class HelmOperator(object): manifest_op = self.armada_manifest_operators['generic'] return manifest_op - def get_helm_applications(self): + def _load_helm_applications(self): """Build a dictionary of supported helm applications""" helm_application_dict = {} @@ -118,6 +126,10 @@ class HelmOperator(object): return supported_helm_applications + def get_helm_applications(self): + """ Get the system applications and charts """ + return self.helm_system_applications + @property def context(self): thread_context = eventlet.greenthread.getcurrent()