Esempio n. 1
0
def documented_conf():
    """A root configuration with documentation."""
    return ConfigNode('documented-conf',
                      desc='''
        foo
        bar
        baz
    ''')
Esempio n. 2
0
def documented_setting():
    """A leaf-node configuration with documentation."""
    return ConfigNode('documented-setting',
                      VDR.V_STRING,
                      desc='''
        foo
        bar
        baz
    ''')
Esempio n. 3
0
def default_setting():
    """A leaf-node configuration with a default."""
    return ConfigNode('default-setting', VDR.V_STRING, default='x')
Esempio n. 4
0
def option_setting():
    """A leaf-node configuration with options."""
    return ConfigNode('option-setting', VDR.V_STRING, options=['a', 'b', 'c'])
Esempio n. 5
0
def simple_setting():
    """A leaf-node configuration."""
    return ConfigNode('simple-setting', VDR.V_STRING)
Esempio n. 6
0
def documented_spec():
    """A configuration tree with documentation."""
    with ConfigNode('documented-conf', desc='a\nb\nc') as spec:
        with ConfigNode('documented-section', desc='d\ne'):
            ConfigNode('documented-setting', VDR.V_STRING, desc='f\ng')
    return spec
Esempio n. 7
0
def simple_conf():
    """A root configuration."""
    return ConfigNode('simple-conf')
Esempio n. 8
0
def simple_section():
    """A configuration section."""
    return ConfigNode('simple-section')