Closed marumer closed 7 years ago
Hi Marco,
Is crud.delete(provider, vrf_prefix)
working for you?
Just edited your post, Marco, to better format it
Thank you you your comment Xiaoqin. You are right, I have tested that I need to pass part of the object to achieve selected delete. It is a logical construct to be selective operation="delete" placement but is it any documentation describing it? Apologies if I have missed it but I am sure it would be useful for others.
Thank you again, Regards, Marco
Closing after confirming solution to pass just the prefix object as crud.delete(provider, vrf_prefix).
Sorry, the documentation seems out-dated, and I think you're right, we should add documentation for this.
Hi All,
I am trying using the crud.delete method to delete a specific static route but the outcome is that all static routes are getting deleted. The YDK originated XML debug seems adding the operation="delete" in the wrong location of the XML payload.
This is the YDK RPC trace, with the operation="delete" added to the router-static xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ip-static-cfg name space that based on my testing delete all static routes in the router:
Apologies for the poor formatting below but the best i can do is to format the RPC as code, you should be able to see a better format when you update the message.
This is a separate XML with the xc:operation="delete" added to the vrf-prefix that properly delete only the specified route in the XML payload. If you move the operation="delete" to the "router-static xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ip-static-cfg" you are going to get the same behaviour experienced with YDK. I have tested this pushing the XML with ncclient.
I am adding here a snip of the configuration used to delete the route in YDK (that generates the RPC described at the beginning of this email).
Regards, Marco