You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
with Device(host='router1.lab', user=username, password=password) as dev:
with Config(dev, mode='exclusive') as cu:
cu.load('set interfaces ae1 unit 11000 vlan-id 4000', format='set')
cu.pdiff()
cu.commit()
with Device(host=router,user=username, password=password) as dev:
with Config(dev, mode='exclusive') as cu:
rescue = cu.rescue(action="reload")
if rescue is False:
print ("No existing rescue configuration.")
else:
cu.pdiff()
cu.commit()
In both cases (router1 and router2) the pdiff show:
I'm playing with pyez to restore configuration from rescue but it is not working as expected with the JunOS 19.4R3.11 (also tried with JunOS 20.3R1).
The scenario is:
The code I am using is very simple:
The
pdiff
just shows the following:To rollback to the rescue, the code is:
In both cases (router1 and router2) the
pdiff
show:The strange behaviour is that in router1 (19.4R3.11) some "ghost" configuration is left:
Shows nothing as expected in both routers. But in router1 the command:
Shows unit interface related info (just in router1):
Furthermore, should you call
cu.rollback(1)
instead ofcu.rescue
, thepdiff
shows the same as with rescue:But in this case, the "ghost" configuration isn't left (as expected):
Is there something that I'm missing on using the
cu.rescue
?The text was updated successfully, but these errors were encountered: