From 87422471be9fe76ba4b039aaff962d75d1270d51 Mon Sep 17 00:00:00 2001 From: uccu Date: Sat, 21 May 2022 22:00:38 +0800 Subject: [PATCH] feat: implment Parser parse link --- compose_viz/parser.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/compose_viz/parser.py b/compose_viz/parser.py index b9959fa..04a40be 100644 --- a/compose_viz/parser.py +++ b/compose_viz/parser.py @@ -79,7 +79,9 @@ class Parser: volume_target = spilt_data[1] service_volumes.append(Volume(source=volume_source, target=volume_target)) - + service_links: List[str] = [] + if service.get("links"): + service_links = service["links"] services.append( Service( @@ -90,6 +92,7 @@ class Parser: ports=service_ports, depends_on=service_depends_on, volumes=service_volumes, + links=service_links ) ) # Service print debug