From ef0ff3f02b366037be1f8c9a0399113a714e1941 Mon Sep 17 00:00:00 2001 From: Bas Harenslak Date: Tue, 21 Sep 2021 00:44:07 +0200 Subject: [PATCH] Added example JSON for airflow pools import (#18376) Co-authored-by: Bas Harenslak --- airflow/cli/cli_parser.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/airflow/cli/cli_parser.py b/airflow/cli/cli_parser.py index 15390bec5c9ff..7093116ba49cf 100644 --- a/airflow/cli/cli_parser.py +++ b/airflow/cli/cli_parser.py @@ -357,7 +357,22 @@ def _check(value): ARG_POOL_NAME = Arg(("pool",), metavar='NAME', help="Pool name") ARG_POOL_SLOTS = Arg(("slots",), type=int, help="Pool slots") ARG_POOL_DESCRIPTION = Arg(("description",), help="Pool description") -ARG_POOL_IMPORT = Arg(("file",), metavar="FILEPATH", help="Import pools from JSON file") +ARG_POOL_IMPORT = Arg( + ("file",), + metavar="FILEPATH", + help="Import pools from JSON file. Example format::\n" + + textwrap.indent( + textwrap.dedent( + ''' + { + "pool_1": {"slots": 5, "description": ""}, + "pool_2": {"slots": 10, "description": "test"} + }''' + ), + " " * 4, + ), +) + ARG_POOL_EXPORT = Arg(("file",), metavar="FILEPATH", help="Export all pools to JSON file") # variables