This folder contains SAI stub implementation.
Compilation is done by :
- ./autogen.sh
- ./configure --enable-debug --prefix=/usr
- make
- make install
The output result is SAI library, called libsai User applications can then link with this library, in order to use the SAI stub implementation.
The implementation contains most of the attributes, as where in master branch of github on May 26, except :
- few new attributes are missing for switch API
- only few attributes are implemented for host interface
- acl and qos are not implemented at all
The output is written to syslog USER facility Verbose output is written for every implemented attribute
Most of the get attributes calls return default values On create objects, an increasing static counter per object is used to return increasing object IDs. Next hop group contains an almost full implementation in memory
Extensive parameter checking is done. It includes :
- Checking the attribute is valid for the feature API
- Checking the operation is valid for the attribute (for example, doesn't allow set for RO attribute)
- Checking all mandatory attributes are passed to create
- Checking an attribute doesn't appear twice in attribute list
- Checking the value of attributes of type list is not NULL
- Additional specific checks per function
All the stub sources are under Apache license
Future enhancments :
- Use SAI schema for parameter checking (developed by MS)
- Have a storage layer to store the created object. Right now, the attributes of an object is not store. The GET/SET calls are either noop or return predefined values.