netdevops / hier_config

Hierarchical Configuration
MIT License
126 stars 24 forks source link

fast/simple method of loading a deep series of children #25

Closed aedwardstx closed 3 years ago

aedwardstx commented 6 years ago

We need a fast/simple method of loading a deep series of children e.g.

deepest_child = config.add_children_deep([
    'router ospf 123',
    'area 0',
    'interface bundle-e1',
    'cost 100'])

deepest_child.text
> 'cost 100'
router ospf 123
  area 0
    interface bundle-e1
      cost 100

This would be handy for setting up tests.