Closed apathak1990 closed 2 years ago
Hello @apathak1990 ,
Thanks a lot for a question. Per gNMI specification, for protobuf Delete()
message you shall provide only a path, which in case of pygnmi
is provided as a string: https://github.com/openconfig/gnmi/blob/c69a5df04b5329d70e3e76afa773669527cfad9b/proto/gnmi/gnmi.proto#L344
Hence, I'd suggest to rebuild a script in a way you specify that as a sting, rather than a dictionary, sir.
Let me know if that works for you.
Best, Anton
Thanks @akarneliuk Let me try that out and create a script to do this
Hello @apathak1990 ,
hop you are doing well. Did you have a chance to review that?
Thanks, Anton
hi @akarneliuk , I am planning to do this week.
Hello @apathak1990 ,
How was your results, sir?
Best, Anton
Hi @akarneliuk
i tried i am getting below error. I may need to format it more properly
pls give me one more week to knock it off
Exception: <_InactiveRpcError of RPC that terminated with:
status = StatusCode.ABORTED
details = "gNMI: set-request delete: unknown-element: Request is not wellformed: invalid character 'i' after object key"
debug_error_string = "{"created":"@1633191198.184499000","description":"Error received from peer ipv4:10.127.60.177:57400","file":"src/core/lib/surface/call.cc","file_line":1056,"grpc_message":"gNMI: set-request delete: unknown-element: Request is not wellformed: invalid character 'i' after object key","grpc_status":10}"
>
In [44]:
In [44]: f_list
Out[44]: ['Cisco-IOS-XR-ifmgr-cfg:interface-configurations/{"interface-configuration": [{"active": "act", "interface-name": "Optics0/2/0/0"}]}']
@apathak1990 , if you have somewhere in lab ios xr, which we could connect to for gnni tests, we could help, probably. Unfortunately, we don't have it in lab.
Hey @apathak1990 , please, open a new ticket if you still have an issue. Best, Anton
Hi @akarneliuk , I am trying to generate config for delete operation using pyangbind but some how I am not able to do it getting exception as Exception: Conversion of gNMI paths to the Protobuf format failed do you have a working example of delete operation via pygNMI which is working with pyangbind ? pls suggest