Power distribution units (PDUs) - Outlets

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.

Coding a new PDU type

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:

class outlets.OutletTemplate.OutletTemplate(name, outletConfigDict={}, outletParams={})[source]

Template for an outlet object that all other outlets extend

Variables:data – Holds a dict of the data from the outlet
_setOutletState(state)[source]

To be implemented by the child, sets the outlet’s state

Parameters:state (bool) – The state to set
_getOutletState()[source]

To be implemented by the child, sets the outlet’s state

Returns:The current outlet state
updateData()[source]

To be Implemented in the child, updates the self.data variable

Example Dummy Outlet

Here is an example dummy outlet implementation

Example for an outlet INI Template File

Here is an INI template file from the Raritan PDU, located at src/config/conf_outlets/Raritan.ini:

Project Versions

Table Of Contents

Previous topic

Server Objects and Object Generators

Next topic

Controllers - Controls

This Page