Skip to content

Commit 08b017c

Browse files
committed
allow dry runs
1 parent 3878d23 commit 08b017c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

microservices/gatewayApi/v2/routes/gateway.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,10 @@ def patterned_write_config(namespace: str) -> object:
457457
:return: JSON of success message or error message
458458
"""
459459

460-
dry_run = False
460+
config = request.get_json()
461+
462+
dry_run = config.get("dryRun", True)
463+
document = config.get("document", {})
461464

462465
event_id = str(uuid.uuid4())
463466

@@ -517,7 +520,7 @@ def patterned_write_config(namespace: str) -> object:
517520

518521
# dfile.save("%s/%s" % (tempFolder, 'config.yaml'))
519522

520-
gw_pattern_context = GatewayConfigPattern (**request.get_json())
523+
gw_pattern_context = GatewayConfigPattern (**document)
521524
gw_pattern_context.set_gateway(namespace)
522525

523526
dfile = gw_pattern_context.get_config_file()

0 commit comments

Comments
 (0)