#!/usr/bin/env python3
#
# Development Order #5:
#
# This is the meat and bones of the tool, where the actual desired
# commands or operation will be run. The results are then recorded
# and added to the 'results' JSON data, which will then be sent
# back to the test. Both system and api are able to be used here.
#

import pscheduler

from run_http import run


# from stdin
input = pscheduler.json_load(exit_on_error=True)
log = pscheduler.Log(prefix='tool-curl', quiet=True)

try:
    pscheduler.succeed_json(run(input))
except Exception as ex:
    pscheduler.succeed_json({
        "succeeded": False,
        "error": str(ex)
    })

assert False, "This should not be reached."
