cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1782
Views
0
Helpful
3
Replies

RESTCONF DELETE to remove VLAN on NX-OS

Hi,

I was able to create a VLAN on NX-OS using RESTCONF:

POST http://<ip>/restconf/data/Cisco-NX-OS-device:System/bd-items/bd-items/BD-list with name,fabEncap,accEncap attributes - but how do I DELETE it?


According to the Yang model, the key is 'fabEncap' ( e.g. "vlan-1234" ) but none of the obvious combinations like

DELETE http://<ip>/restconf/data/Cisco-NX-OS-device:System/bd-items/bd-items/BD-list/vlan-1234

work ( error: missing required input list key )


Regards,

Jeroen

3 Replies 3

NX-OS documentation says it supports draft-ietf-netconf-restconf-10 - RESTCONF Protocol but an example like

DELETE /restconf/data/example-jukebox:jukebox/

  library/artist=Foo%20Fighters/album=Wasting%20Light HTTP/1.1

  Host: example.com

i.e. using 'key=value' as part of the URL doesn't seem to work

otswplfc
Level 1
Level 1

Did you ever get an answer to this problem?  I have run into the same issue with NETCONF. Can create VLANs but can't delete them.

yijin2
Cisco Employee
Cisco Employee

curl -X DELETE -H "Accept: application/yang.data+xml" -u admin:cisco!123 "https://x.x.x.x/restconf/data/Cisco-NX-OS-device:System/bd-items/bd-items/BD-list=vlan-11" -k -i

try this, it works

 

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: