- self.ns = ns.NsLcm(self.db, self.msg, self.fs, self.lcm_tasks, self.ro_config, self.vca_config, self.loop)
- self.netslice = netslice.NetsliceLcm(self.db, self.msg, self.fs, self.lcm_tasks, self.ro_config,
- self.vca_config, self.loop)
- self.vim = vim_sdn.VimLcm(self.db, self.msg, self.fs, self.lcm_tasks, self.ro_config, self.loop)
- self.wim = vim_sdn.WimLcm(self.db, self.msg, self.fs, self.lcm_tasks, self.ro_config, self.loop)
- self.sdn = vim_sdn.SdnLcm(self.db, self.msg, self.fs, self.lcm_tasks, self.ro_config, self.loop)
- self.k8scluster = vim_sdn.K8sClusterLcm(self.db, self.msg, self.fs, self.lcm_tasks, self.vca_config, self.loop)
- self.k8srepo = vim_sdn.K8sRepoLcm(self.db, self.msg, self.fs, self.lcm_tasks, self.vca_config, self.loop)
+ if self.config.get("tsdb") and self.config["tsdb"].get("driver"):
+ if self.config["tsdb"]["driver"] == "prometheus":
+ self.prometheus = prometheus.Prometheus(self.config["tsdb"], self.worker_id, self.loop)
+ else:
+ raise LcmException("Invalid configuration param '{}' at '[tsdb]':'driver'".format(
+ config["tsdb"]["driver"]))
+ else:
+ self.prometheus = None