Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

预定义的 Junos PyEZ 操作表(结构化输出)

总结 使用预定义的 Junos PyEZ 表和视图从 RPC XML 输出中选择特定项目,从 Junos 设备提取操作信息。

用于结构化输出的 Junos PyEZ 操作 (op) 表提供了一种从 RPC 的 XML 输出中提取信息的简单而有效的方法。Junos PyEZ jnpr.junos.op 模块为与一些常见操作命令对应的 RPC 提供预定义的表和视图定义。 表 1 列出了每个模块、该模块中定义的表名称以及每个表的常规 RPC 和相应的 CLI 命令。有关提供给 RPC 的命令选项、每个项目的键以及相应视图选择的字段的信息,请查看该模块的 .yml 文件中的表和视图定义。

有关表和视图定义的最新列表,请参阅 https://github.com/Juniper/py-junos-eznc/ 上的 Junos PyEZ GitHub 存储库。您还可以创建自己的自定义表和视图定义。

表 1:jnpr.junos.op 模块

模块

Rpc

CLI 命令

arp

ArpTable

get-arp-table-information

show arp

bfd

BfdSessionTable

get-bfd-session-information

show bfd session extensive

bgp

bgpTable

get-bgp-neighbor-information

show bgp neighbor

ccc

CCCTable

get-ccc-information

show connections

elsethernetswitchingtable

ElsEthernetSwitchingTable

get-ethernet-switching-table-information

show ethernet-switching table

ethernetswitchingtable

EthernetSwitchingTable

get-ethernet-switching-table-information

show ethernet-switching table

ethport

EthPortTable

get-interface-information

(针对以太网接口过滤)

show interfaces media

fpc

FpcHwTable

FpcMiReHwTable

get-chassis-inventory

show chassis hardware

FpcInfoTable

FpcMiReInfoTable

get-fpc-information

show chassis fpc

idpattacks

IDPAttackTable

get-idp-attack-table-information

show security idp attack table

intopticdiag

PhyPortDiagTable

get-interface-optics-diagnostics-information

show interfaces diagnostics optics

inventory

ModuleTable

get-chassis-inventory

show chassis hardware

isis

IsisAdjacencyTable

get-isis-adjacency-information

show isis adjacency

l2circuit

L2CircuitConnectionTable

get-l2ckt-connection-information

show l2circuit connections

lacp

LacpPortTable

get-lacp-interface-information

show lacp interfaces

ldp

LdpNeighborTable

get-ldp-neighbor-information

show ldp neighbor extensive

lldp

LLDPNeighborTable

get-lldp-neighbors-information

show lldp neighbors

nd

NdTable

get-ipv6-nd-information

show ipv6 neighbors

ospf

OspfNeighborTable

get-ospf-neighbor-information

show ospf neighbor

OspfInterfaceTable

get-ospf-interface-information

show ospf interface

ospfTable

get-ospf-overview-information

show ospf overview

OspfRoutesTable

get-ospf-route-information

show ospf route

phyport

PhyPortTable

get-interface-information

(针对以太网接口过滤)

show interfaces

PhyPortStatsTable

get-interface-information

(针对以太网接口过滤)

show interfaces extensive

PhyPortErrorTable

get-interface-information

(针对以太网接口过滤)

show interfaces extensive

routes

RouteTable

get-route-information

show route

RouteSummaryTable

get-route-summary-information

show route summary

securityzone

SecurityZoneTable

get-zones-information

show security zones

teddb

TedTable

TedSummaryTable

get-ted-database-information

show ted database

vlan

VlanTable

get-vlan-information

show vlans

xcvr

XcvrTable

get-chassis-inventory

show chassis hardware

以下视频演示如何使用该 RouteTable 表。