Juniper PyEZ ephemeral database send RPC

262 views Asked by At

I want to send some "raw" RPC commands

For example;

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

im a bit baffled on how to do that, any thoughts?

1

There are 1 answers

0
Nitin Kr On

Something like

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()

check this doc link for more details

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