feat: implement depends_on long syntax
This commit is contained in:
parent
9503c55f76
commit
a5b0fa5078
1 changed files with 6 additions and 1 deletions
|
@ -145,10 +145,15 @@ class Parser:
|
||||||
|
|
||||||
service_depends_on: List[str] = []
|
service_depends_on: List[str] = []
|
||||||
if service.get("depends_on"):
|
if service.get("depends_on"):
|
||||||
service_depends_on = service["depends_on"]
|
if type(service["depends_on"]) is list:
|
||||||
|
for depends_on in service["depends_on"]:
|
||||||
|
service_depends_on.append(str(depends_on))
|
||||||
|
elif type(service["depends_on"]) is dict:
|
||||||
|
service_depends_on = list(service["depends_on"].keys())
|
||||||
|
|
||||||
service_volumes: List[Volume] = []
|
service_volumes: List[Volume] = []
|
||||||
if service.get("volumes"):
|
if service.get("volumes"):
|
||||||
|
assert type(service["volumes"]) is list
|
||||||
for volume_data in service["volumes"]:
|
for volume_data in service["volumes"]:
|
||||||
if type(volume_data) is dict:
|
if type(volume_data) is dict:
|
||||||
assert volume_data["source"] and volume_data["target"], "Invalid volume input, aborting."
|
assert volume_data["source"] and volume_data["target"], "Invalid volume input, aborting."
|
||||||
|
|
Loading…
Reference in a new issue