06-24-2019 12:28 PM - edited 06-24-2019 12:29 PM
Using Postman to test API calls to NSO.
http://nso-server:8080/restconf/data/tailf-ncs:devices/device=leaf1/config/tailf-ned-cisco-ios-xr:interface/"TenGigE=0/0/0/6"
Returns
{
"tailf-ned-cisco-ios-xr:TenGigE": {
"id": "0/0/0/6",
"description": "<<Ignore - WiP >>",
"shutdown": [
null
]
}
}I would like to update the interface description and no-shut the interface in a single call. Tried with this but no success:
{
"description": "<<Ignore - WiP >>",
"shutdown": "true"
}Also tried without the xml payload with the below after reading that a delete operation is what's needed, but I must have missed something
http://nso:8080/restconf/data/tailf-ncs:devices/device=leaf1/config/tailf-ned-cisco-ios-xr:interface/"TenGigE=0/0/0/6"/shutdown/tags="delete"/
{
"errors": {
"error": [
{
"error-message": "uri keypath not found",
"error-tag": "invalid-value",
"error-type": "application"
}
]
}
}
Anyone have any ideas on how I can accomplish this? Thank you in advance.
Solved! Go to Solution.
06-25-2019 06:03 AM
Have you tried using YANG Patch, it supports different CRUD operations in the same payload.
06-26-2019 01:04 AM
Hi,
+1, YANG PATCH is the way to solve this issue. Nothing needed to be added.
For references/examples, check: https://tools.ietf.org/html/rfc8072
Roque
06-25-2019 06:03 AM
Have you tried using YANG Patch, it supports different CRUD operations in the same payload.
06-25-2019 08:43 AM
Hi Perander,
Is this something I need to add to my installation of NSO 5.10? Can you provide more info please.
thanks
Richard
06-26-2019 01:04 AM
Hi,
+1, YANG PATCH is the way to solve this issue. Nothing needed to be added.
For references/examples, check: https://tools.ietf.org/html/rfc8072
Roque
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide