From 50fae1c6590a1c34dbf835356254bff2020eebc1 Mon Sep 17 00:00:00 2001 From: Joao Gilberto Magalhaes Date: Tue, 23 Aug 2022 23:04:20 -0500 Subject: [PATCH] Adjust method parse --- src/processor/__init__.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/processor/__init__.py b/src/processor/__init__.py index c7ab3be..726b14b 100644 --- a/src/processor/__init__.py +++ b/src/processor/__init__.py @@ -64,8 +64,7 @@ class ProcessorInterface: pass def parse(self): - # Abstract - pass + self.cfg = HaproxyConfigGenerator(ContainerEnv.read()) def get_letsencrypt_hosts(self): return self.letsencrypt_hosts @@ -116,9 +115,6 @@ class Docker(ProcessorInterface): for container in self.client.containers.list(): self.parsed_object[container.name] = container.labels - def parse(self): - self.cfg = HaproxyConfigGenerator(ContainerEnv.read()) - class Swarm(ProcessorInterface): def __init__(self, filename = None): @@ -130,9 +126,6 @@ class Swarm(ProcessorInterface): for container in self.client.services.list(): self.parsed_object[container.attrs["Spec"]["Name"]] = container.attrs["Spec"]["Labels"] - def parse(self): - self.cfg = HaproxyConfigGenerator(ContainerEnv.read()) - class Kubernetes(ProcessorInterface): def __init__(self, filename = None): @@ -175,8 +168,6 @@ class Kubernetes(ProcessorInterface): self.parsed_object[cluster_ip] = data self.parsed_object[cluster_ip].update(rule_data) - def parse(self): - self.cfg = HaproxyConfigGenerator(ContainerEnv.read())