PDUs are object generators that create outlets for a server. Outlets represent a physical power socket that that can switch the server’s power on or off. Outlet also have a data field that gets logged in the PluginLogger.
When creating a new one you should extend the class outlets.OutletTemplate.OutletTemplate .
The python file containing the class should be placed in the src/outlets package.
Here are the methods you should implement when writing a new PDU class:
Template for an outlet object that all other outlets extend
Variables: | data – Holds a dict of the data from the outlet |
---|
To be implemented by the child, sets the outlet’s state
Parameters: | state (bool) – The state to set |
---|
Here is an example dummy outlet implementation
Here is an INI template file from the Raritan PDU, located at src/config/conf_outlets/Raritan.ini: