libioc.Config.Prototype module

Prototype of a Jail configuration.

class libioc.Config.Prototype.Prototype(file=None, logger=None)[source]

Bases: object

Prototype of a JailConfig.

property exists

Return True when the configuration file exists on the filesystem.

Return type

bool

property file

Return the relative path to the config file.

Return type

str

map_input(data)[source]

Map input data (for reading from the configuration).

Implementing classes may provide individual mappings.

Return type

Data

map_output(data)[source]

Map output data (for writing to the configuration).

Implementing classes may provide individual mappings.

Return type

Union[str, Dict[str, Union[int, str, dict, list, None]]]

read()[source]

Read from the configuration file.

This method may be overriden by non file-based implementations.

Return type

Data

write(data)[source]

Write changes to the config file.

This method may be overriden by non file-based implementations.

Return type

None