Hi,
I am not able to call RPC with request_action method.
The same RPC works fine with NSO cli.
root@ncs# devices device netconfd rpc rpc-install-add install-add packagepath /harddisk: packagename abc
op-id 1
I get the following error with the python code.
Error: Python cb_action error. item has a bad/wrong type (5): /ncs:devices/device{netconfd}/rpc/rpc-install-add/install-add: bad element: packagepath.
p1=_ncs.TagValue(_ncs.XmlTag(ns.hash, ns.spirit_install_act_packagepath), _ncs.Value('/harddisk:'))
p2=_ncs.TagValue(_ncs.XmlTag(ns.hash, ns.spirit_install_act_packagename), _ncs.Value('package_name'))
path = "/ncs:devices/device{netconfd}/rpc/spirit-install-act:rpc-install-add/install-add/"
params = [p1, p2]
m = ncs.maapi.Maapi()
s = ncs.maapi.Session(m, user_name, 'telemetry_package_called_action')
t = m.start_write_trans()
result = _ncs.maapi.request_action_th(m.msock, t.th, params, path)