#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# PagerDuty

# Copyright (C) 2019 tribe29 GmbH - License: GNU General Public License v2
# This file is part of Checkmk (https://checkmk.com). It is subject to the terms and
# conditions defined in the file COPYING, which is part of this source code package.

from cmk.notification_plugins.pagerduty import pagerduty_msg
from cmk.notification_plugins.utils import post_request, process_by_status_code

if __name__ == "__main__":
    # PagerDuty replies with 202 because the request is further processed
    # by them. Thus their reply only includes field validation checks.
    response = post_request(pagerduty_msg)
    process_by_status_code(response, success_code=202)
