将操作模式命令和输出字段映射到 Junos XML 符号
在 SLAX 和 XSLT 操作脚本中,您可以使用 Junos XML API 中的标记元素来表示脚本中的操作模式命令和输出字段。有关 Junos XML 等效命令和输出字段,请参阅 Junos XML API 操作开发人员参考。
您还可以通过将命令中的输出定向到命令来显示操作模式命令 | display xml
输出的 Junos XML 标记元素:
user@host> command-string | display xml
例如:
user@host> show interfaces terse | display xml <rpc-reply xmlns:junos="http://xml.juniper.net/junos/10.0R1/junos"> <interface-information xmlns="http://xml.juniper.net/junos/10.0RI0/junos-interface" junos:style="terse"> <physical-interface> <name>dsc</name> <admin-status>up</admin-status> <oper-status>up</oper-status> </physical-interface> <physical-interface> <name>fxp0</name> <admin-status>up</admin-status> <oper-status>up</oper-status> <logical-interface> <name>fxp0.0</name> <admin-status>up</admin-status> <oper-status>up</oper-status> ...