Open tcaiazza opened 8 years ago
Any updates on this? I encounter the same error at the moment.
I think there is a bug in forticonfig.py
if indent_level == 0 and self.vdom is not None: if self.vdom == 'global': pre = 'conf global\n' else: pre = 'conf vdom\n edit %s\n' % self.vdom post = 'end'
instead of "conf global", it should be "config global" since fortigate scrpit only accepts the exact command, not abbreviations.
Same applies to vdom.
Using the latest version of the pyFG, I'm trying to merge the running config on a fortigate of mine with a new snippet of code. I'm running with VDOMs enabled.
The load config looks mostly correct, but is missing the commands to move this into the correct VDOM. So when I try to commit if get an error
Now what is interesting is that if I run compare_config again, I get the correct config snippet it, VDOM and all. I'm also able to commit this just fine.
I noticed this issue when trying to use napalm and this thread started there napalm-automation/napalm-fortios#13