Package ganeti :: Module objects :: Class SerializableConfigParser
[hide private]
[frames] | no frames]

Class SerializableConfigParser

source code


Simple wrapper over ConfigParse that allows serialization.

This class is basically ConfigParser.SafeConfigParser with two additional methods that allow it to serialize/unserialize to/from a buffer.

Instance Methods [hide private]
 
Dumps(self)
Dump this instance and return the string representation.
source code
 
get(self, section, option, **kwargs)
Get an option value for a given section.
source code

Inherited from ConfigParser.SafeConfigParser: set

Inherited from ConfigParser.SafeConfigParser (private): _interpolate, _interpolate_some

Inherited from ConfigParser.ConfigParser: items

Inherited from ConfigParser.ConfigParser (private): _interpolation_replace

Inherited from ConfigParser.RawConfigParser: __init__, add_section, defaults, getboolean, getfloat, getint, has_option, has_section, options, optionxform, read, readfp, remove_option, remove_section, sections, write

Inherited from ConfigParser.RawConfigParser (private): _get, _read

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Methods [hide private]
 
Loads(cls, data)
Load data from a string.
source code
Class Variables [hide private]

Inherited from ConfigParser.SafeConfigParser (private): _interpvar_re

Inherited from ConfigParser.ConfigParser (private): _KEYCRE

Inherited from ConfigParser.RawConfigParser: OPTCRE, OPTCRE_NV, SECTCRE

Inherited from ConfigParser.RawConfigParser (private): _boolean_states

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

get(self, section, option, **kwargs)

source code 

Get an option value for a given section.

If `vars' is provided, it must be a dictionary. The option is looked up in `vars' (if provided), `section', and in `defaults' in that order.

All % interpolations are expanded in the return values, unless the optional argument `raw' is true. Values for interpolation keys are looked up in the same manner as the option.

The section DEFAULT is special.

Overrides: ConfigParser.RawConfigParser.get