예제 #1
0
파일: v1.py 프로젝트: jack8daniels2/yabgp
def get_peer_statistic(peer_ip):
    """
    Get one peer's message statistic, include sending and receiving.

    **Example request**

    .. sourcecode:: http

      GET /v1/peer/10.124.1.245/statistic HTTP/1.1
      Host: example.com
      Accept: application/json

    **Example response**:

    .. sourcecode:: http

      HTTP/1.1 200 OK
      Vary: Accept
      Content-Type: text/json
      {
          "receive": {
              "Keepalives": 3,
              "Notifications": 0,
              "Opens": 1,
              "Route Refresh": 0,
              "Updates": 5
          },
          "send": {
              "Keepalives": 3,
              "Notifications": 0,
              "Opens": 1,
              "Route Refresh": 0,
              "Updates": 0
          }
      }

    :param peer_ip: peer ip address
    :status 200: the api can work.

    """
    return flask.jsonify(api_utils.get_peer_msg_statistic(peer_ip))
예제 #2
0
파일: v1.py 프로젝트: jack8daniels2/yabgp
def get_peer_statistic(peer_ip):
    """
    Get one peer's message statistic, include sending and receiving.

    **Example request**

    .. sourcecode:: http

      GET /v1/peer/10.124.1.245/statistic HTTP/1.1
      Host: example.com
      Accept: application/json

    **Example response**:

    .. sourcecode:: http

      HTTP/1.1 200 OK
      Vary: Accept
      Content-Type: text/json
      {
          "receive": {
              "Keepalives": 3,
              "Notifications": 0,
              "Opens": 1,
              "Route Refresh": 0,
              "Updates": 5
          },
          "send": {
              "Keepalives": 3,
              "Notifications": 0,
              "Opens": 1,
              "Route Refresh": 0,
              "Updates": 0
          }
      }

    :param peer_ip: peer ip address
    :status 200: the api can work.

    """
    return flask.jsonify(api_utils.get_peer_msg_statistic(peer_ip))
예제 #3
0
def get_peer_statistic(peer_ip):
    """
    Get one peer's message statistic, include sending and receiving.
    """
    return flask.jsonify(api_utils.get_peer_msg_statistic(peer_ip))
예제 #4
0
파일: v1.py 프로젝트: c0ns0le/yabgp
def get_peer_statistic(peer_ip):
    """
    Get one peer's message statistic, include sending and receiving.
    """
    return flask.jsonify(api_utils.get_peer_msg_statistic(peer_ip))