Closed joshqoon closed 2 years ago
I will accept the proposed change as it but could I have a update with it so I can add a test for it.
would this help?
{
"exabgp": "5.0.0",
"time": 1651219870.115168,
"host": "sr-lab-exabgp",
"pid": 4042882,
"ppid": 84633,
"counter": 84,
"type": "update",
"header": "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00A402",
"body": "0x0000008D900E003440044704C0A8640200000100270200000000000002BC0100001A0200000400003E3402010004000000000203000601013400004140010100400206020100003E34801D45010A0002010A04020006726F7574657204030003490090040400040A860029040A000C8000001F4004890003003E80040B00020001040C000C00000003E804890003003A98",
"neighbor": {
"address": {
"local": "192.168.100.1",
"peer": "192.168.100.2"
},
"asn": {
"local": 65050,
"peer": 15924
},
"direction": "receive",
"message": {
"update": {
"attribute": {
"origin": "igp",
"as-path": {
"0": {
"element": "as-sequence",
"value": [
15924
]
}
},
"bgp-ls": {
"generic-lsid-266": [
"0x010A"
],
"node-name": "router",
"area-id": "4784272",
"local-te-router-ids": [
"10.134.0.41"
],
"sr-capability-flags": {
"I": 1,
"V": 0,
"RSV": 0
},
"sids": [
[
8000,
16000
]
],
"sr-algorithms": [
0,
1
],
"generic-lsid-1036": [
"0x00000003E804890003003A98"
]
}
},
"announce": {
"bgp-ls bgp-ls": {
"192.168.100.2": [
{
"ls-nlri-type": "bgpls-node",
"l3-routing-topology": 700,
"protocol-id": 2,
"node-descriptors": [
{
"autonomous-system": 15924
},
{
"bgp-ls-identifier": "0"
},
{
"router-id": "010134000041"
}
],
"nexthop": "192.168.100.2"
}
]
}
}
}
}
}
}
Thank you. Yes, the BGP payload is in the header and body fields.
couple of more issues in the json generated for sr capabilities:
Two issues in the json below :
"sr_capability_flags"
is repeated"sids"
tuple is not valid in json and sr-base is incorrectly decodedsr_capability_flags
is generated from the line below:https://github.com/Exa-Networks/exabgp/blob/b3f4dd8dfd5582fc50a25704bc3b9e2baaf5105e/src/exabgp/bgp/message/update/attribute/bgpls/node/srcap.py#L85
here is a diff that works for me: