eucalyptus / calyptos

Tool for Managing Eucalyptus
BSD 2-Clause "Simplified" License
5 stars 14 forks source link

Move all list types to hashes/dicts #106

Open nephomaniac opened 8 years ago

nephomaniac commented 8 years ago

It seems that list merging and iteration is cleaner when using hashes/dictionaries vs lists (mainly for Ruby/Chef). Suggest that Calyptos yaml avoids lists wherever possible and replace these with basic key-value dict mappings. I believe this is safer, and allows for flexibility in the future. For example: This list...

hosts:
-1.1.1.1
-1.1.1.2
-1.1.1.3

Would be something like this...

hosts:
  1.1.1.1: true
  1.1.1.2: true
  1.1.1.3: true

Or...

hosts:
  1.1.1.1:
    bridge: br0
    bridge_interface: eth1
  1.1.1.2:
    bridge: br0
    bridge_interface: em1
  1.1.1.3:
    bridge: br0
    bridge_interface: bond1