Normalized models¶
clijson.parse(..., normalize=True) fills in result.normalized for commands that map to one of the
models below. Each record has exactly these keys, in this order, on every vendor. A value is None
when the device doesn't report it.
Every model is a TypedDict in clijson.models (for editors and type checkers) and has a
JSON Schema (draft 2020-12) in schemas/. Print one with
clijson schema <model> or clijson.models.json_schema(model). Check output with
clijson schema <model> --check out.json or clijson.models.validate(model, data).
Values are standardised:
- statuses become
up/down/admin-down - MAC addresses become
aa:bb:cc:dd:ee:ff - uptimes are given as text and also in seconds where the schema has
*_seconds - ages, dead timers and hold times are integer seconds
- the protocol in
routesis always lower case (bgp,ospf,isis,static,connected,local, …) vrfisdefaultfor the global table
system.version¶
Device identity and software release. Python type: clijson.models.SystemVersion (one object).
| field | type | description |
|---|---|---|
hostname |
string | null | Configured hostname |
vendor |
string | cisco |
os |
string | iosxr |
version |
string | Software release, e.g. 7.9.2, 23.4R1.9, V800R021C10SPC600 |
model |
string | null | Chassis / platform model |
serial_number |
string | null | Chassis serial number |
uptime |
string | null | Uptime as printed by the device |
uptime_seconds |
integer | null | Uptime in seconds |
Produced by:
- iosxr:
show version - junos:
show version - vrp:
display version
interfaces.brief¶
One row per interface. Python type: clijson.models.Interface (a list of records).
| field | type | description |
|---|---|---|
name |
string | Interface name as the device prints it |
admin_status |
string | up |
oper_status |
string | up |
ip_address |
string | null | Primary IPv4 address, with /len when shown |
vrf |
string | null | VRF / routing instance, if not the default |
description |
string | null | Interface description |
Produced by:
- iosxr:
show - iosxr:
show ipv4 interface brief summary - iosxr:
show interfaces brief - iosxr:
show interface brief - iosxr:
show interfaces summary brief - junos:
show interfaces - junos:
show interfaces terse - junos:
show interfaces terse routing-instance - vrp:
display interface brief - vrp:
display interface <type> brief - vrp:
display ip interface brief
interfaces.detail¶
Per-interface state, addressing and counters. Python type: clijson.models.InterfaceDetail (a list of records).
| field | type | description |
|---|---|---|
name |
string | |
admin_status |
string | up |
oper_status |
string | up |
description |
string | null | |
mac_address |
string | null | MAC address, lowercase colon-separated (aa |
mtu |
integer | null | MTU in bytes |
bandwidth_kbps |
integer | null | Configured / negotiated bandwidth in kbit/s |
ipv4_addresses |
array of string | IPv4 addresses with prefix length |
input_rate_bps |
integer | null | Input rate in bit/s |
output_rate_bps |
integer | null | Output rate in bit/s |
input_packets |
integer | null | |
output_packets |
integer | null | |
input_errors |
integer | null | |
output_errors |
integer | null |
Produced by:
- iosxr:
show interfaces - iosxr:
show interface - junos:
show interfaces - vrp:
display interface - vrp:
display interface <type> <number>
interfaces.description¶
Interface descriptions with state. Python type: clijson.models.InterfaceDescription (a list of records).
| field | type | description |
|---|---|---|
name |
string | |
admin_status |
string | up |
oper_status |
string | up |
description |
string | null |
Produced by:
- iosxr:
show interfaces description - iosxr:
show interface description - junos:
show interfaces descriptions - vrp:
display interface description
bgp.summary¶
One row per BGP peer (and address family, where the device splits them). Python type: clijson.models.BgpNeighbor (a list of records).
| field | type | description |
|---|---|---|
neighbor |
string | Peer address |
remote_as |
integer | string | Peer AS; asdot notation (65000.1) stays a string |
state |
string | Established, Idle, Active, Connect, OpenSent, OpenConfirm, ... |
established |
boolean | True when the session is Established |
uptime |
string | Up/down time as printed by the device |
uptime_seconds |
integer | null | Up/down time in seconds |
prefixes_received |
integer | null | Accepted prefixes (when established) |
vrf |
string | VRF / routing instance (default for the global table) |
address_family |
string | null | e.g. ipv4 unicast, vpnv4 unicast |
Produced by:
- iosxr:
show bgp - iosxr:
show ip bgp - iosxr:
show bgp summary - junos:
show bgp summary - vrp:
display bgp - vrp:
display bgp vpnv4 vpn-instance <vrf> peer - vrp:
display bgp instance <instance> peer
ospf.neighbors¶
OSPF adjacencies. Python type: clijson.models.OspfNeighbor (a list of records).
| field | type | description |
|---|---|---|
neighbor_id |
string | Neighbor router ID |
priority |
integer | null | |
state |
string | full, 2way, init, exstart, ... (lowercase, without /DR suffix) |
address |
string | null | Neighbor interface address |
interface |
string | |
dead_time |
integer | null | Seconds until the dead timer expires |
Produced by:
- iosxr:
show - iosxr:
show ospf - junos:
show - vrp:
display ospf - vrp:
display ospfv3
isis.adjacency¶
IS-IS adjacencies. Python type: clijson.models.IsisAdjacency (a list of records).
| field | type | description |
|---|---|---|
system_id |
string | Neighbor system ID or hostname |
interface |
string | |
state |
string | |
level |
string | L1, L2 or L1L2 |
hold_time |
integer | null | Seconds of hold time left |
snpa |
string | null | Subnetwork point of attachment (MAC) |
Produced by:
- iosxr:
show isis - junos:
show isis adjacency - vrp:
display isis - vrp:
display isis peer
lldp.neighbors¶
LLDP neighbors. Python type: clijson.models.LldpNeighbor (a list of records).
| field | type | description |
|---|---|---|
local_interface |
string | |
neighbor |
string | Neighbor system name |
neighbor_interface |
string | Neighbor port ID |
chassis_id |
string | null | |
capabilities |
array of string | null | Enabled capabilities, e.g. ["router", "bridge"] |
ttl |
integer | null | Hold time in seconds |
Produced by:
- iosxr:
show lldp neighbors - iosxr:
show lldp entry <entry> - iosxr:
show cdp neighbors - junos:
show lldp neighbors - junos:
show lldp neighbors interface <interface> - junos:
show lldp neighbors detail - vrp:
display lldp neighbor brief - vrp:
display lldp neighbor - vrp:
display lldp neighbor <interface>
arp¶
IPv4 ARP entries. Python type: clijson.models.Arp (a list of records).
| field | type | description |
|---|---|---|
ip_address |
string | |
mac_address |
string | MAC address, lowercase colon-separated (aa |
interface |
string | |
age |
integer | null | Seconds since learned (or remaining lifetime when that is all the device shows) |
type |
string | dynamic, static, interface, ... (vendor word) |
Produced by:
- iosxr:
show arp - junos:
show arp - junos:
show arp no-resolve - vrp:
display arp - vrp:
display arp all
ipv6.neighbors¶
IPv6 neighbor discovery cache. Python type: clijson.models.Ipv6Neighbor (a list of records).
| field | type | description |
|---|---|---|
ip_address |
string | |
mac_address |
string | null | MAC address, lowercase colon-separated (aa |
interface |
string | null | |
state |
string | null | reach, stale, delay, probe, ... (lowercase) |
age |
integer | null | Seconds since last reachability confirmation (or remaining lifetime) |
Produced by:
- iosxr:
show ipv6 neighbors - junos:
show ipv6 neighbors - vrp:
display ipv6 neighbors
routes¶
Routing table entries. Python type: clijson.models.Route (a list of records).
| field | type | description |
|---|---|---|
prefix |
string | Destination prefix with length |
protocol |
string | connected, static, ospf, isis, bgp, local, ... (lowercase) |
next_hops |
array of NextHop | |
distance |
integer | null | Administrative distance / preference |
metric |
integer | null | |
vrf |
string | VRF / routing table (default for the global table) |
age |
string | null | Route age as printed by the device |
NextHop: One next hop of a route.
| field | type | description |
|---|---|---|
next_hop |
string | null | Next-hop address (None for connected / discard routes) |
interface |
string | null | Outgoing interface |
Produced by:
- iosxr:
show route - iosxr:
show - junos:
show route - vrp:
display ip routing-table - vrp:
display ipv6 routing-table
ldp.neighbors¶
LDP sessions. Python type: clijson.models.LdpNeighbor (a list of records).
| field | type | description |
|---|---|---|
neighbor |
string | Peer LDP ID or address |
state |
string | |
uptime |
string | null | |
discovery_sources |
array of string | null | Interfaces / targeted sources the peer was discovered on |
Produced by:
- iosxr:
show mpls ldp - junos:
show ldp neighbor - junos:
show ldp session - vrp:
display mpls ldp session
bfd.sessions¶
BFD sessions. Python type: clijson.models.BfdSession (a list of records).
| field | type | description |
|---|---|---|
neighbor |
string | |
interface |
string | null | |
state |
string | up, down, init, admindown (lowercase) |
local_discriminator |
integer | null | |
remote_discriminator |
integer | null | |
detect_time_ms |
integer | null | Detection time in milliseconds |
Produced by:
- iosxr:
show bfd - junos:
show bfd session - vrp:
display bfd session
inventory¶
Hardware components. Python type: clijson.models.Inventory (a list of records).
| field | type | description |
|---|---|---|
name |
string | |
description |
string | null | |
part_number |
string | null | |
serial_number |
string | null | |
version |
string | null | Hardware revision |
Produced by:
- iosxr:
show inventory - iosxr:
admin show inventory - junos:
show chassis hardware
cpu¶
CPU utilisation per location, in percent. Python type: clijson.models.Cpu (a list of records).
| field | type | description |
|---|---|---|
location |
string | null | Node / slot / routing engine |
one_minute |
integer | null | |
five_minute |
integer | null | |
five_second |
integer | null |
Produced by:
- iosxr:
show processes cpu - junos:
show chassis routing-engine - vrp:
display cpu-usage - vrp:
display cpu
vrfs¶
VRFs / routing instances. Python type: clijson.models.Vrf (a list of records).
| field | type | description |
|---|---|---|
name |
string | |
rd |
string | null | Route distinguisher |
interfaces |
array of string | null |
Produced by:
- iosxr:
show vrf - junos:
show route instance - vrp:
display ip vpn-instance
mac.table¶
MAC address table entries. Python type: clijson.models.MacEntry (a list of records).
| field | type | description |
|---|---|---|
mac_address |
string | MAC address, lowercase colon-separated (aa |
vlan |
integer | string | null | VLAN ID, or VLAN / bridge-domain name where the device shows one |
interface |
string | |
type |
string | dynamic, static, ... (vendor word) |
Produced by:
- iosxr:
show l2vpn forwarding bridge-domain - junos:
show ethernet-switching table - junos:
show ethernet-switching table vlan-id <vlan> - vrp:
display mac-address
lag¶
Link aggregation groups. Python type: clijson.models.Lag (a list of records).
| field | type | description |
|---|---|---|
name |
string | |
status |
string | |
members |
array of string | Member interfaces |
Produced by:
- iosxr:
show lacp - iosxr:
show bundle - iosxr:
show bundle <bundle> - junos:
show lacp interfaces - vrp:
display eth-trunk
l2vpn.pseudowires¶
L2VPN pseudowires (VPLS/VSI peers, bridge-domain PWs, xconnects, l2circuits) with redundancy role. Python type: clijson.models.Pseudowire (a list of records).
| field | type | description |
|---|---|---|
service |
string | null | VSI, bridge-domain, xconnect or attachment-circuit name the PW belongs to |
neighbor |
string | Remote PE address |
pw_id |
integer | null | PW / VC ID |
state |
string | up, down or standby (vendor word lowercased if unrecognised) |
role |
string | null | primary or backup, when PW redundancy is configured |
active |
boolean | null | True when the PW is forwarding, False when standby / inactive |
vc_type |
string | null | PW type, e.g. ethernet, ethernet-vlan |
mtu |
integer | null | Negotiated / local PW MTU |
local_label |
integer | null | |
remote_label |
integer | null |
Produced by:
- iosxr:
show l2vpn bridge-domain - iosxr:
show l2vpn xconnect - junos:
show l2circuit connections - junos:
show vpls connections - vrp:
display vsi - vrp:
display vsi verbose - vrp:
display mpls l2vc