2

I want to get wia RPC info like this:

> show route output interface ae40.4181 | display xml rpc 
<rpc-reply xmlns:junos="http://xml.juniper.net/junos/17.4R2/junos">
    <rpc>
        <get-route-information>
            <output>
                        <interface>ae40.4181</interface>
                    </output>
            </get-route-information>
        </rpc>
        <cli>
            <banner></banner>
        </cli>
    </rpc-reply>

How shloud I pass these parameters to dev.rpc.get_route_information?

Which are other possible ways to get this info?

4

1 回答 1

2

尝试在这种情况下使用 dev.execute

例如

rpc = '''<get-route-information>
            <output><interface>ae40.4181</interface>
                    </output>
            </get-route-information>'''
dev.execute(rpc)

如果您遇到任何问题,请告诉我

于 2019-12-23T11:29:13.490 回答