cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2154
Views
0
Helpful
2
Replies

Saving Config via RESTCONF on NXOS

techvisionuhd
Level 1
Level 1
Hi, 
 
A bit new to network programmability. I have a question regarding RESTCONF on NXOS 9.3.3. I'm trying to do what seems to me should be a simple task of saving the running config to the startup config, but I've been unable to figure this out via RESTCONF.
 
I've looked at the CIsco-NX-OS-device.yang model, and I see under the rpcs container that there's an item for copy_running_config_src, and I see the same reference for this in https://developer.cisco.com/docs/cisco-nexus-3000-and-9000-series-nx-api-rest-sdk-user-guide-and-api-reference-release-9-3x.
# NETCONF payload
<copy_running_config_src xmlns="http://cisco.com/ns/yang/cisco-nx-os-device">
     <startup-config/>
</copy_running_config_src>
However, trying to interact with these rpcs like the System container isn't working. I've been able to execute this via NETCONF, but am unable to do so for RESTCONF.
 
Questions I have are: 
  • Does RESTCONF in NXOS implement the RPCs defined in the module?
  • If so, could someone let me know to what URI I should be sending my requests to? With IOS XE, there's a separate URI for the RPCs (HOST/restconf/operations), so wondering if this is also the case with NXOS
2 Replies 2

Thanks Alex. However, those resources were useful for the RESTCONF cisco-nx-os-device module and the openconfig modules. However, the copy_running_config_src rpc doesn't seem to follow the same URI scheme that I use to interact with other components of those two modules. 

 

Strangely, I can't find any documentation online regarding using the copy_running_config_src action via RESTCONF, and the only references I see are for Netconf. I'm hoping if you could confirm whether this feature just isn't supported in RESTCONF on NX-OS?

 

And if it isn't supported, what is the suggested way to save the configuration on NX-OS via RESTCONF?