Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.6.0.3
Box Services

Box Services provides the ability to determine the health of the system by monitoring key elements in the system like power supplies, fans, temperature sensors, and port location. It also provides support to get the details of the connected SFP modules.

Box Services OpEN API

This document provides a brief description of the Box Services OpEN API. The Box Services OpEN API allows processes outside of the ICOS main process (switchdrvr) access to Box Services. It provides the following services:

Example C Application boxs_example

Initialization

In the main function, the sample application initializes the OpEN API RPC service by calling openapiClientRegister() and waits for the RPC service in switchdrvr to start. A Client Handle is returned by openapiClientRegister() which is used while invoking the OpEN APIs. The application then exercises the associated OpEN APIs and logs informational and/or error messages on the console. The example application runs to its completion and exits.

boxs_example

boxs_example.c is a sample application that demonstrates the use of the Box services OpEN API. boxs_example is started from the command line. It then exercises all the Box services OpEN APIs one by one with appropriate arguments to manage the Box services in the ICOS main process (switchdrvr).

Box Services CLI/API Cross Reference

CLI Command | OpEN API Reference
---------— | ----------—
(Priv-User Mode)#show environment | openapiBoxsFanDutyCycleGet()
openapiBoxsFanSpeedGet()
openapiBoxsFanStateGet()
openapiBoxsFanTypeGet()
openapiBoxsNumOfFansGet()
openapiBoxsNumOfPowSuppliesGet()
openapiBoxsNumOfTempSensorsGet()
openapiBoxsPowSupplyStateGet()
openapiBoxsPowSupplyTypeGet()
openapiBoxsTempGet()
openapiBoxsTempSensorDescripGet()
openapiBoxsTempSensorStatusGet()
(Priv-User Mode)#show fiber-ports optical-transceiver-info {<interface>|all} | openapiBoxsSfpComplianceGet()
openapiBoxsSfpLinkLength50umGet()
openapiBoxsSfpLinkLength62_5umGet()
openapiBoxsSfpNominalSignalRate()
openapiBoxsSfpPartNumberGet()
openapiBoxsSfpSerialNumberGet()
openapiBoxsSfpTypeGet()
openapiBoxsSfpVendorNameGet()
openapiBoxsSfpVendorRevisionGet()
(Config)#port-locator disable | openapiPortLocatorGlobalDisable()
(Interface-Config Mode)#port-locator disable | openapiPortLocatorInterfaceEnable()
(Interface-Config Mode)#port-locator enable | openapiPortLocatorInterfaceEnable()
(Priv-User Mode)#show hardware | openapiBoxsHwVersionGet()
(Config)#
led {port | system} {on | off} | openapiBoxsPortLedsModeSet()
openapiBoxsPortLedsModeGet()
openapiBoxsSystemLedModeGet()
openapiBoxsSystemLedModeSet()
(Priv-User Mode)#show led control | openapiBoxsPortLedsModeGet()
openapiBoxsSystemLedModeGet()