Skip to main content
viktor245
Explorer II
May 29, 2025
Question

YAML config with multiple VDOMs

  • May 29, 2025
  • 1 reply
  • 504 views

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

xshkurti
Staff
Staff
May 30, 2025

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.