import-conf-mode-commands in vyos-1x/scripts fails to create an xml in some scenarios.
That happens when a directory type "node" doesn't contains a node.def
For example:
./vyos-1x/scripts/import-conf-mode-commands vyatta-netflow/templates-cfg/system
Creating a node from vyatta-netflow/templates-cfg/system/flow-accounting
Creating a leaf node from vyatta-netflow/templates-cfg/system/flow-accounting/buffer-size
Creating a leaf node from vyatta-netflow/templates-cfg/system/flow-accounting/interface
Creating a leaf node from vyatta-netflow/templates-cfg/system/flow-accounting/disable-imt
Creating a leaf node from vyatta-netflow/templates-cfg/system/flow-accounting/syslog-facility
Creating a node from vyatta-netflow/templates-cfg/system/flow-accounting/sflow
Creating a node from vyatta-netflow/templates-cfg/system/flow-accounting/sflow/server
Creating a node from vyatta-netflow/templates-cfg/system/flow-accounting/sflow/server/node.tag
Traceback (most recent call last):
File "./vyos-1x/scripts/import-conf-mode-commands", line 233, in <module>
walk(children, base_path, c)
File "./vyos-1x/scripts/import-conf-mode-commands", line 211, in walk
walk(children, next_level, d)
File "./vyos-1x/scripts/import-conf-mode-commands", line 211, in walk
walk(children, next_level, d)
File "./vyos-1x/scripts/import-conf-mode-commands", line 211, in walk
walk(children, next_level, d)
File "./vyos-1x/scripts/import-conf-mode-commands", line 91, in walk
with open(os.path.join(path, 'node.def'), 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'vyatta-netflow/templates-cfg/system/flow-accounting/sflow/server/node.tag/node.def'