Functions and Use cases of RBFS REST APIs
CtrlD API
The CtrlD performs various functions in the lifecycle of an RBFS container. Zero-Touch Provisioning installs the RBFS software on the hardware devices with minimal human intervention. It is the responsibility of the CtrlD to initiate, discover and download the startup configuration files as part of zero-touch provisioning (ZTP) process. The CtrlD retrieves the base URL and executes the startup configuration on the device, that is pre-installed with ONL, the host operating system.
CtrlD API acts as a proxy endpoint that defines the way the API proxy interacts with the backend services. CtrlD is a go-between, which sits in the middle, for requests from clients and the API. As the API proxy, CtrlD, resides in front of the API, enforcing policies that dictate the usage of the API.
CtrlD API can be used to reboot the switch with or without a software upgrade. As a proxy endpoint, users can access the following APIs through CtrlD:
-
RESTCONF API
-
Operational State API
-
Prometheus API
For more information about CtrlD API use case and examples, see section 5.1. CtrlD API: Use Case and Example'.
You can see the CtrlD OpenAPI Specification at CTRLD API Reference.
RESTCONF API
RESTCONF is an HTTP-based REST API protocol for network management and automation. It provides a programmatic interface for accessing data defined in YANG. The YANG model describes the configuration syntax. In RBFS, the RESTCONF API provides the configuration data.
Users can use RESTCONF API to execute various configurations in RBFS. RESTCONF API can be used for the following tasks:
-
Read configurations
-
Replace configurations
-
Partial configuration update
-
Remove configurations
For more information about RESTCONF API use case and examples, see section 5.2. RESTCONF API: Use Case and Example.
You can see the RESTCONF OpenAPI Specification at RESTCONF API Reference
Operational State API
The Operational State API (opsd
) provides the system state information. The ospd
is backward compatible and supports running older and newer versions of applications together in the network. The Backward compatibility feature is useful whenever newer RBFS releases are rolled out.
The Operational State API was implemented using the Python language that provides a collaborative system to all stakeholders including integration partners, customers, professional services and engineering to collaborate on the API endpoints.
You can locate the Operational State OpenAPI Specification at Operational State API Reference.
For more information about Operational State API use case and examples, see section 5.3. Operational State API: Use Case and Example.
Guidelines and Limitations
When you execute configurations through management APIs, and then with the Command Line Interface at the same time, it results in conflicts when you commit the configuration through the CLI. The reason is that CtrlD directly interacts with the backend applications and these changes are not synced with the CLI.