IoticAgent.IOT.Config module¶
Wrapper object for the Client Configuration file
-
class
IoticAgent.IOT.Config.
Config
(fn=None, string=None)¶ Bases:
object
-
get
(section, val)¶ Get a setting or the default
Returns The current value of the setting val or the default, or None if not found
section (string) the section name in the config E.g. “agent”
val (string) the section name in the config E.g. “host”
-
save
(filename=None)¶ Write config to file.
-
set
(section, val, data)¶ Add a setting to the config
section (string) the section name in the config E.g. “agent”
val (string) the section name in the config E.g. “host”
data the new value for the val
-
setup_logging
()¶ Setup logging module based on known modules in the config file
-
update
(section, val, data)¶ Add a setting to the config, but if same as default or None then no action. This saves the .save writing the defaults
section (string) the section name in the config E.g. “agent”
val (string) the section name in the config E.g. “host”
data the new value for the val
-
-
IoticAgent.IOT.Config.
dict_to_cp
(dic)¶
-
IoticAgent.IOT.Config.
str_to_logging
(level)¶