Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
viktor245
New Contributor

YAML config with multiple VDOMs

Hi everyone,

 

I was struggling to get FortiOS config in YAML format into Python.

 

Thanks to this post I found out it's a bug - 976722.

System configuration export in YAML seems invalid - Fortinet Community

 

Fortinet fixed the bug in 7.4.8. I updated a device to 7.4.8 and downloaded the config in YAML format.

 

I can now load the config into Python, but I'm facing a new challenge. The object that is created from the file is a Python dictionary with two keys: 'global' and 'vdom'. This is expected. When I select key 'vdom' and load it into its own object, its data type is list. This is where the problem is. The list contains only one of two VDOMs I have in my config. The YAML file contains both VDOMs.

 

Did anyone encounter the same issue? Any idea how to proceed?

1 REPLY 1
xshkurti
Staff
Staff

For questions related to scripting and programming, you can reach out to Fortinet Developer Network.

You can find multiple answers that might also help you with your task.

Announcements
Check out our Community Chatter Blog! Click here to get involved
Labels
Top Kudoed Authors