0
A few weeks ago, I was working with the NX-API currently found on Cisco’s Nexus 9000 series switches, and ran into some peculiar behavior.
NX-API returns all information in terms of Tables and Rows. For a specific example, let’s look at what NX-API returns when I ask the switch for running OSPF processes:
There’s actually a lot more information in this snippet that pertains to the OSPF process itself, but I have omitted it for brevity. This specific example focuses on the section that describes the areas in this OSPF process.
{
"ins_api": {
"sid": "eoc",
"type": "cli_show",
"version": "0.1",
"outputs": {
"output": {
"code": "200",
"msg": "Success",
"input": "show ip ospf",
"body": {
"TABLE_ctx": {
"ROW_ctx": {
### OSPF process information omitted for brevity ###
"TABLE_area": {
"ROW_area": {
"age": "P15DT15H27M6S",
"loopback_intf": "1",
"passive_intf": "0",
"last_spf_run_time": "PT0S",
"spf_runs": "9",
"lsa_cnt": "5",
"no_summary": "false",
"backbone_active": "true",
"stub": "false",
"aname": "0.0.0.0",
"total_intf": "2",
"auth_type": "none",
"act_intf": "2",
"nssa": "false",
"lsa_crc": "0x18d91"
}
}
}
}
}
}
}
}
}
NXAPI uses a special tag that starts with TABLE, and within that, tag(s) that start with ROW, whenever it needs to describe something that would normally be Continue reading