cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
315
Views
1
Helpful
2
Replies

Cisco IOS XE Network Operations using API

ginger2021
Level 1
Level 1

Hi,

Is there a yang module for RESTCONF that can be used to carry out cli commands, like ping and certificate imports. 

There is a yang module for icmp, but that appears to be configuring icmp rather than actually carrying out a ping. For certificate management the crypto yang modules in reference appear to be depreciated, is the only alternative to use the gRPC/gNMI (which doesn't appear to be available on all devices).

2 Replies 2

@ginger2021 i would be happy to be wrong, from what i recall there is not a standardised YANG module for directly executing CLI commands such as ping or managing certificates over RESTCONF. The YANG modules for ICMP, crypto, and certificate management are more focused on configuration rather than direct execution, as you noted.

 

Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io

Jesus Illescas
Cisco Employee
Cisco Employee

I would check gNOI (gRPC Network Operations Interface) since is an interface specifically for network operations. From the documentation:


The gNMI service defines operations for configuration management, operational state retrieval, and bulk data collection through streaming telemetry. gNOI only allows the adoption of services that a device supports. gNOI supports the OS installation service.

https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/prog/configuration/1715/b_1715_programmability_cg/m_1715_prog_gnoi_protocol.html

See the table at the end to check where is supported.

For pings, I don't think you will get ICMP, but the question is what's your end goal? if you want to test connectivity, or reachability, you can try to use something more API native, like checking the capabilities of a device.