Skip to content

Commit

Permalink
Merge pull request #1980 from tcaiazza/nxos-bgp-shut
Browse files Browse the repository at this point in the history
Fix NXOS get_bgp_neighbor when neighbor is admin shut
  • Loading branch information
mirceaulinic authored Mar 21, 2024
2 parents 1014cfa + 78f5aaa commit ea78527
Show file tree
Hide file tree
Showing 3 changed files with 848 additions and 0 deletions.
1 change: 1 addition & 0 deletions napalm/nxos/nxos.py
Original file line number Diff line number Diff line change
Expand Up @@ -1046,6 +1046,7 @@ def get_bgp_neighbors(self) -> Dict[str, models.BGPStateNeighborsPerVRFDict]:
"Established": {"is_up": True, "is_enabled": True},
"Closing": {"is_up": True, "is_enabled": True},
"Shutdown": {"is_up": False, "is_enabled": False},
"Admin (Shut)": {"is_up": False, "is_enabled": False},
}
"""
af_name_dict = {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,265 @@
{
"RED-PROD": {
"router_id": "10.2.3.6",
"peers": {
"10.1.1.169": {
"is_enabled": true,
"address_family": {
"ipv4": {
"sent_prefixes": -1,
"accepted_prefixes": -1,
"received_prefixes": 4
}
},
"uptime": -1,
"remote_as": 64862,
"description": "",
"remote_id": "10.1.1.169",
"local_as": 64861,
"is_up": true
},
"10.1.1.171": {
"is_enabled": true,
"address_family": {
"ipv4": {
"sent_prefixes": -1,
"accepted_prefixes": -1,
"received_prefixes": 4
}
},
"uptime": -1,
"remote_as": 64862,
"description": "",
"remote_id": "10.1.1.171",
"local_as": 64861,
"is_up": true
}
}
},
"BLUE": {
"router_id": "10.1.1.186",
"peers": {
"10.1.1.187": {
"is_enabled": true,
"address_family": {
"ipv4": {
"sent_prefixes": -1,
"accepted_prefixes": -1,
"received_prefixes": 0
}
},
"uptime": -1,
"remote_as": 64862,
"description": "",
"remote_id": "10.1.1.187",
"local_as": 64861,
"is_up": true
},
"10.1.1.185": {
"is_enabled": true,
"address_family": {
"ipv4": {
"sent_prefixes": -1,
"accepted_prefixes": -1,
"received_prefixes": 0
}
},
"uptime": -1,
"remote_as": 64862,
"description": "",
"remote_id": "10.1.1.185",
"local_as": 64861,
"is_up": true
}
}
},
"MGMT": {
"router_id": "10.0.0.188",
"peers": {
"10.1.1.227": {
"is_enabled": true,
"address_family": {
"ipv4": {
"sent_prefixes": -1,
"accepted_prefixes": -1,
"received_prefixes": 14
}
},
"uptime": -1,
"remote_as": 64862,
"description": "",
"remote_id": "10.1.1.227",
"local_as": 64861,
"is_up": true
},
"10.1.1.225": {
"is_enabled": true,
"address_family": {
"ipv4": {
"sent_prefixes": -1,
"accepted_prefixes": -1,
"received_prefixes": 14
}
},
"uptime": -1,
"remote_as": 64862,
"description": "",
"remote_id": "10.1.1.225",
"local_as": 64861,
"is_up": true
}
}
},
"global": {
"router_id": "10.3.1.136",
"peers": {
"10.1.1.135": {
"is_enabled": true,
"address_family": {
"l2vpn": {
"sent_prefixes": -1,
"accepted_prefixes": -1,
"received_prefixes": 7237
}
},
"uptime": -1,
"remote_as": 64861,
"description": "",
"remote_id": "10.1.1.135",
"local_as": 64861,
"is_up": true
},
"10.1.1.134": {
"is_enabled": true,
"address_family": {
"l2vpn": {
"sent_prefixes": -1,
"accepted_prefixes": -1,
"received_prefixes": 7237
}
},
"uptime": -1,
"remote_as": 64861,
"description": "",
"remote_id": "10.1.1.134",
"local_as": 64861,
"is_up": true
}
}
},
"RED-PRE-PROD": {
"router_id": "10.2.63.60",
"peers": {
"10.1.1.179": {
"is_enabled": true,
"address_family": {
"ipv4": {
"sent_prefixes": -1,
"accepted_prefixes": -1,
"received_prefixes": 13
}
},
"uptime": -1,
"remote_as": 64862,
"description": "",
"remote_id": "10.1.1.179",
"local_as": 64861,
"is_up": true
},
"10.1.1.177": {
"is_enabled": false,
"address_family": {
"ipv4": {
"sent_prefixes": -1,
"accepted_prefixes": -1,
"received_prefixes": 0
}
},
"uptime": -1,
"remote_as": 64862,
"description": "",
"remote_id": "10.1.1.177",
"local_as": 64861,
"is_up": false
}
}
},
"NON_PROD": {
"router_id": "10.1.255.188",
"peers": {
"10.1.1.161": {
"is_enabled": true,
"address_family": {
"ipv4": {
"sent_prefixes": -1,
"accepted_prefixes": -1,
"received_prefixes": 441
}
},
"uptime": -1,
"remote_as": 64862,
"description": "",
"remote_id": "10.1.1.161",
"local_as": 64861,
"is_up": true
},
"10.1.1.163": {
"is_enabled": true,
"address_family": {
"ipv4": {
"sent_prefixes": -1,
"accepted_prefixes": -1,
"received_prefixes": 441
}
},
"uptime": -1,
"remote_as": 64862,
"description": "",
"remote_id": "10.1.1.163",
"local_as": 64861,
"is_up": true
}
}
},
"PROD": {
"router_id": "10.9.2.60",
"peers": {
"10.1.1.153": {
"is_enabled": true,
"address_family": {
"ipv4": {
"sent_prefixes": -1,
"accepted_prefixes": -1,
"received_prefixes": 9
}
},
"uptime": -1,
"remote_as": 64862,
"description": "",
"remote_id": "10.1.1.153",
"local_as": 64861,
"is_up": true
},
"10.1.1.155": {
"is_enabled": true,
"address_family": {
"ipv4": {
"sent_prefixes": -1,
"accepted_prefixes": -1,
"received_prefixes": 9
}
},
"uptime": -1,
"remote_as": 64862,
"description": "",
"remote_id": "10.1.1.155",
"local_as": 64861,
"is_up": true
}
}
},
"OTV": {
"router_id": "10.3.1.228",
"peers": {}
}
}
Loading

0 comments on commit ea78527

Please sign in to comment.