0

我想发送一些“原始”的 RPC 命令

例如;

<rpc>
<open-configuration>
<ephemeral-instance>eph1</ephemeral-instance>
</open-configuration>
</rpc>
]]>]]>

我对如何做到这一点有点困惑,有什么想法吗?

4

1 回答 1

0

就像是

with Config(dev, mode='ephemeral', ephemeral_instance='eph1') as cu:  
    cu.load('set protocols mpls label-switched-path to-hastings to 192.0.2.1', format='set')
    cu.commit()

检查此文档链接以获取更多详细信息

https://www.juniper.net/documentation/en_US/junos-pyez/topics/reference/general/junos-pyez-configuration-process-and-data-formats.html

于 2020-12-03T13:28:59.807 回答