Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.6.0.3
Time Ranges APIs

The Time ranges component is an infrastructure component that provides a notion of time to other FASTPATH components. It can be used by other components to allow the network administrators to apply and remove configuration based on time of the day. To do so, a time range is created that defines specific times of the day and week. The time range is identified by a name and then referenced by some other configuration parameters (For example, an ACL rule), so that those time restrictions are imposed on them.

Time Ranges OpEN API

This document provides a brief description of the Time Ranges OpEN APIs. It provides the following services:

All 'Set' operations affect the Switch behavior and configuration.

Example C Application timeranges_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.

timeranges_example

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

TIMERANGES CLI/API Cross Reference

CLI Command OpEN API Reference
(Config)#
[no] time-range <name>
openapiTimeRangeNameAdd()
openapiTimeRangeDelete()
openapiTimeRangeNameFirstGet()
openapiTimeRangeNameNextGet()
(TimeRange-Config Mode)#
periodic {days-of-the-week <time>} to {[days-of-the-week] <time>}
openapiTimeRangePeriodicEntryStartDateAndTimeSet()
openapiTimeRangePeriodicEntryStartDateAndTimeGet()
openapiTimeRangePeriodicEntryEndDateAndTimeSet()
openapiTimeRangePeriodicEntryEndDateAndTimeGet()
(TimeRange-Config Mode)#
periodic {frequency}
openapiTimeRangePeriodicEntryStartDateAndTimeSet()
openapiTimeRangePeriodicEntryStartDateAndTimeGet()
openapiTimeRangePeriodicEntryEndDateAndTimeSet()
openapiTimeRangePeriodicEntryEndDateAndTimeGet()
(TimeRange-Config Mode)#
periodic start {start time date}
openapiTimeRangePeriodicEntryStartDateAndTimeSet()
openapiTimeRangePeriodicEntryStartDateAndTimeGet()
openapiTimeRangePeriodicEntryEndDateAndTimeSet()
openapiTimeRangePeriodicEntryEndDateAndTimeGet()
(TimeRange-Config Mode)#
periodic end {end time date}
openapiTimeRangePeriodicEntryStartDateAndTimeSet()
openapiTimeRangePeriodicEntryStartDateAndTimeGet()
openapiTimeRangePeriodicEntryEndDateAndTimeSet()
openapiTimeRangePeriodicEntryEndDateAndTimeGet()
(Priv-User Mode)#
show time-range <name>
openapiTimeRangeAdminModeGet()
openapiTimeRangeCurrNumGet()
openapiTimeRangeMaxNumGet()
openapiTimeRangeNameFirstGet()
openapiTimeRangeNameNextGet()
openapiTimeRangeStatusGet()
openapiTimeRangeNumEntriesGet()
openapiTimeRangeAbsoluteEntryNumGet()
openapiTimeRangeAbsoluteEntryStartDateAndTimeGet()
openapiTimeRangeAbsoluteEntryEndDateAndTimeGet()
openapiTimeRangePeriodicEntryStartDateAndTimeGet()
openapiTimeRangePeriodicEntryEndDateAndTimeGet()