apply_changes in the running mode gives "User callback failed"
Salah3beed opened this issue · 0 comments
Salah3beed commented
My simple code:
import sysrepo
conn= sysrepo.SysrepoConnection()
sess= conn.start_session("running")
enabledL=sess.get_items("/ietf-interfaces:interfaces/ietf-interfaces:interface/ietf-interfaces:enabled")
print(list(enabledL))
sess.set_item("/ietf-interfaces:interfaces/ietf-interfaces:interface[name='RT0']/ietf-interfaces:enabled", False)
sess.apply_changes()
enabledL=sess.get_items("/ietf-interfaces:interfaces/ietf-interfaces:interface/ietf-interfaces:enabled")
print(list(enabledL))
When I try to apply changes I get the following error
Traceback (most recent call last):
File "./test1.py", line 33, in <module>
sess.apply_changes()
File "/home/pi/.local/lib/python3.7/site-packages/sysrepo/session.py", line 1226, in apply_changes
check_call(lib.sr_apply_changes, self.cdata, timeout_ms)
File "/home/pi/.local/lib/python3.7/site-packages/sysrepo/errors.py", line 176, in check_call
raise SysrepoError.new(msg, ret)
sysrepo.errors.SysrepoCallbackFailedError: User callback failed, User callback failed.: User callback failed
I am using sysrepo v2.2.72 (SO v7.14.31)