1
0
Fork 0

Reading from Docker and Swarm

This commit is contained in:
Joao Gilberto Magalhaes 2019-07-17 01:55:07 -05:00
parent b196905320
commit b7ec691e8f
7 changed files with 63 additions and 14 deletions

View file

@ -3,12 +3,12 @@ import sys
from easymapping import HaproxyConfigGenerator
if len(sys.argv) != 2:
print("You need to pass the easyconfig.cfg path")
print("You need to pass the easyconfig.yml path")
exit(1)
with open(sys.argv[1], 'r') as content_file:
parsed = yaml.load(content_file.read())
parsed = yaml.load(content_file.read(), Loader=yaml.FullLoader)
cfg = HaproxyConfigGenerator(parsed)
print(cfg.generate())