3 log.getLogger().setLevel(log.DEBUG)
8 return conf.ConfigExpression([s], s)
10 root = conf.ConfigTree()
13 root.lookup('a.v%d'%i).add_operation('SET', None, cs('A%d'%i))
14 b = root.lookup('b.v%d'%i)
15 b.add_operation('APPEND', None, cs(' <FOO>'))
16 b.add_operation('SET', None, conf.ConfigExpression([root.lookup('a.v%d'%i)], '{a.v%d}'%i))
17 b.add_operation('APPEND', None, cs(' <BAR>'))
19 b.add_operation('APPEND', [], conf.ConfigExpression([' [', root.lookup('b.v%d'%(i+1)), ']'], ' [{b.v%d}]'%(i+1)))
20 print '\n'.join(root.dump())
22 b0 = root.lookup('b.v0')
23 b0.remove_operation(1)
24 b0.add_operation('SET', None, cs('NEW-B0'))
25 root.lookup('b.v2').add_operation('APPEND', None, cs(' <NEW-B3>'))
26 root.lookup('a.v1').add_operation('APPEND', None, cs(' <NEW-A1>'))
27 print '\n'.join(root.dump())
29 root.lookup('a.v0').add_operation('SET', [], cs('<OVERRIDE-A0>'))
30 print '\n'.join(root.dump())
31 print 'maxdepth: %d'%conf.debug_maxdepth