poolcontrolpy.poolcontrolpy
Module Contents
Classes
Controller class representing one nodejs-poolController |
|
Handler class to manage http requests to the controller |
Attributes
- poolcontrolpy.poolcontrolpy._LOGGER
- poolcontrolpy.poolcontrolpy.RES_CONF = /config
- class poolcontrolpy.poolcontrolpy.Controller(session: aiohttp.ClientSession, host: str, port: int)[source]
Controller class representing one nodejs-poolController
- property type(self)
Controller type
- property model(self)
Controller model
- property version(self)
Controller software version
- class poolcontrolpy.poolcontrolpy._RequestsHandler(session: aiohttp.ClientSession, host: str, port)[source]
Handler class to manage http requests to the controller
- async get(self, resource: str) str[source]
Method to get resource from Pool Controller API
- Parameters
resource (str) – Resource to get with leading ‘/’
- Returns
String representing resource body
- Return type
str
- Raises
ResourceTypeError – Error raised when ContentType is not application/json
HostError – Error raised when Host refuses connection
ResourceError – Error raised when Resource return status code >= 400