Configuration
SAFplus component and application configuration can be used independently or together with the SAFplus Management add-on product. With the Management product, NETCONF and SNMP and the SAFplus CLI (Command Line Interface) "northbound" interfaces are available to access and modify configuration data.
Overview
Component and application configuration is accomplished by defining a schema that defines the required configuration data. This schema is defined in the YANG file format described in RFC6020. YANG is a simple data definition language with syntax familiar to C or Java programmers yet can be translated without loss of information into an XML format (called YIN). Definitions are organized into "modules" which can contain notifications (asynchronous messages from the server to the client), remote procedure calls, and a complex structured data feature-similar to SNMP MIB files, XML, or any other data definition language.
Status, and statistics use this same infrastructure; the only difference is that these data are not stored persistently (to disk).
Using the SAFplus Management add-on product, YANG files can be compiled into a C++ class structure. These classes represent the configuration, status, statistics, notifications and functions that were defined by the YANG information model. Application programmers can extend these classes by adding additional objects or creating derived classes to capture other related data.
These C++ objects are automatically connected to and underlying persistent database and to the northbound protocols when the application "binds" the root object of the configuration tree to a location within the YANG defined information tree. During this "bind" initialization, child C++ objects are automatically created if they exist in the persistent database.
Configuration can be defined by XML files is loaded and saved to the persistent database by OpenClovis tools. Offline, configuration can be manipulated by Python (or C) scripts and then exported as XML files or pushed into the persistent database.
This architecture allows applications to access configuration via an intuitive object-oriented interface and avoids the need for every application to handle details of northbound interfaces, configuration/XML file parsing, CLI interfaces, and configuration database access.
=== SAFplus Cluster Modelling Tool (IDE) Integration ===
OpenClovis YANG file extensions can be used to specify configuration information to be associated with instances of application components in the SAFplus IDE. The SAFplus IDE will automatically create data entry dialogs for the specified information and output the proper XML configuration files during code generation.
A "leaf" (data item) is IDE enabled with the "safplus:ide" extension for example:
This leaf would create a text entry box in the configuration dialog labelled "Maximum Time: ". Mouse-over help would display the description.