OpenNebula config format question

Hi, I have a question:
Which specific config format is OpenNebula use?

This format is uses everywhere begin from oned.conf file and end for VM and VNET templates.


ANIMAL = "dog"
  ANOTHER_VAR = "foo",
  NUM = "0",
  VAR1 = "abcabc",
  VAR2 = "dcedce" ]
BAR = "1234"
COLOR = "green"

I’ve tried to find some parser for that, but I was not succeed. The main problem that this fromat is not documented anywhere, the most suitable is “TOML” but still it is a bit different.

This is not looks like “JSON” or “YAML” and this is not “TOML”, so how can I parse it?

Good question, related to

I think it’s a simple ruby file, with variables and arrays used as configuration

Are you sure?

Is there some oneline script for parse configs like this one?

For example:

  • How to get ARRAY["VAR1"] value?
  • How to remove ARRAY["VAR2"] secton from this config?
  • Or how to convert this config to json format, for make what ever I want with jq and convert it from json back

The example code should work with multidimensional array and handle any newlines (like opennebula do)