Exemple #1
0
def documented_conf():
    """A root configuration with documentation."""
    return ConfigNode('documented-conf',
                      desc='''
        foo
        bar
        baz
    ''')
Exemple #2
0
def documented_setting():
    """A leaf-node configuration with documentation."""
    return ConfigNode('documented-setting',
                      VDR.V_STRING,
                      desc='''
        foo
        bar
        baz
    ''')
Exemple #3
0
def default_setting():
    """A leaf-node configuration with a default."""
    return ConfigNode('default-setting', VDR.V_STRING, default='x')
Exemple #4
0
def option_setting():
    """A leaf-node configuration with options."""
    return ConfigNode('option-setting', VDR.V_STRING, options=['a', 'b', 'c'])
Exemple #5
0
def simple_setting():
    """A leaf-node configuration."""
    return ConfigNode('simple-setting', VDR.V_STRING)
Exemple #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
Exemple #7
0
def simple_conf():
    """A root configuration."""
    return ConfigNode('simple-conf')
Exemple #8
0
def simple_section():
    """A configuration section."""
    return ConfigNode('simple-section')