alice-lg / birdwatcher

A JSON API for BIRD
BSD 3-Clause "New" or "Revised" License
66 stars 41 forks source link

The problem that Capabilities cannot output. #33

Closed muraoka-mf closed 3 years ago

muraoka-mf commented 3 years ago

I want to use birdwatcher to get Local Capabilities and Neighbor Capabilities from BIRDv2.0.7 via API. However, as shown below, both Capabilities are not in output.

        “BXXX_XXX_XXX_XXX”: {
            "action": "restart",
            "af_announced": "ipv4",
            "bgp_next_hop": “XXX.XXX.XXX.XXX”,
            "bgp_state": "Established",
            "bird_protocol": "BGP",
            "connection": "Established",
            "description": “XXXXXX”,
            "hold_timer": “30/30",
            "input_filter": “XXXXXXX”,
            "keepalive_timer": "1/10",
            "local_as": XXXXX,
            "neighbor_address": “XXX”.XXX.XXX.XXX,
            "neighbor_as": XXXXXX,
            "neighbor_id": “XXX.XXX.XXX.XXX”,
            "output_filter": "",
            "preference": 100,
              :
              :
muraoka-mf commented 3 years ago

This seems to be possible for Neighbor Capabilities, https://github.com/mfeed/birdwatcher/pull/4/files

output

“BXXX_XXX_XXX_XXX”: {
    :
    "neighbor_capabilities": {
            "4-octet_as_numbers": "",
            "af_announced": "ipv4"
            "enhanced_refresh": "",
            "extended_message": "",
            "multiprotocol": "",
            "route_refresh": ""
    },
    :
}


However, the API output for BIRDv1 looks like the following it. How do you think about this schema change?

“BXXX_XXX_XXX_XXX”: {
    :
     "neighbor_caps": "refresh enhanced-refresh AS4",
    :
}