def METHOD_NAME(spec, gateway_was_up, network_was_up):
    """Exit with results"""
    result = {
        "succeeded": True,
        "diags": "\n".join(diags),
        "result": {
            "succeeded": True,
            "network-up": network_was_up
        }
    }
    if "gateway" in spec:
        result["result"]["gateway-up"] = gateway_was_up
    pscheduler.succeed_json(result)