Skip to content
Snippets Groups Projects

make send-request and compute accept plain json

Merged Philipp S. Sommer requested to merge send-request-json into master
2 files
+ 43
5
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 11
5
@@ -479,12 +479,15 @@ def get_parser(
# test subparser (to test the connection to the connect to the pulsar
# messaging system)
sp = subparsers.add_parser(
"send-request", help="Test a request via the pulsar messaging system."
"send-request", help="Test a request via the messaging system."
)
sp.add_argument(
"request",
help="A JSON-formatted file with the request.",
type=argparse.FileType("r"),
help=(
"The request to send as YAML string, or the path to a YAML or "
"JSON file."
),
type=_load_dict,
)
sp.set_defaults(method_name="send_request", command_params=["request"])
@@ -495,8 +498,11 @@ def get_parser(
)
sp.add_argument(
"request",
help="A JSON-formatted file with the request.",
type=argparse.FileType("r"),
help=(
"The request to process as YAML string, or the path to a YAML or "
"JSON file."
),
type=_load_dict,
)
sp.set_defaults(method_name="process_request", command_params=["request"])
Loading