paradrop.lib package¶
Subpackages¶
- paradrop.lib.api package
- paradrop.lib.config package
- Submodules
- paradrop.lib.config.configservice module
- paradrop.lib.config.devices module
- paradrop.lib.config.dhcp module
- paradrop.lib.config.dockerconfig module
- paradrop.lib.config.firewall module
- paradrop.lib.config.network module
- paradrop.lib.config.osconfig module
- paradrop.lib.config.pool module
- paradrop.lib.config.uciutils module
- paradrop.lib.config.wifi module
- Module contents
- paradrop.lib.utils package
Submodules¶
paradrop.lib.chute module¶
-
class
Chute
(descriptor, strip=None)[source]¶ Bases:
object
Wrapper class for Chute objects.
-
appendCache
(key, val)[source]¶ Finds the key they requested and appends the val into it, this function assumes the cache object is of list type, if the key hasn’t been defined yet then it will set it to an empty list.
-
dumpCache
()[source]¶ Return a string of the contents of this chute’s cache. In case of catastrophic failure dump all cache content so we can debug.
-
fullDump
()[source]¶ Return a dump of EVERYTHING in this chute including all API data and all internal cache data.
-
paradrop.lib.settings module¶
This file contains any settings required by ANY and ALL modules of the paradrop system. They are defaulted to some particular value and can be called by any module in the paradrop system with the following code:
from paradrop import settings print(settings.STUFF)
These settings can be overriden by a file defined which contains the following syntax:
# This changes a string default setting EXACT_SETTING_NAME0 “new string setting”
# This changes a int default setting EXACT_SETTING_NAME1 int0
If settings need to be changed, they should be done so by the initialization code (such as pdfcd, pdapi_server, pdfc_config, etc...)
- This is done by calling the following function:
- settings.updateSettings(filepath)
-
addSetting
(key, value)[source]¶ Adds a new setting to this module so other modules can see it.
Parameters: - key (string.) – the setting name.
- value (variable.) – the value of the setting.
Returns: None