rcbops-cookbooks/nova-network — pull request #44 by DavidWittman (2013-07-04 04:52:10+00:00)
Title: Convert provider_networks attribute from Hash to Array

With `node['quantum']['ovs']['provider_networks']` defaulting to a Hash, it is impossible to remove the configuration for **ph-eth1**. It can only be overridden. For example, setting the following override results in both **ph-eth1** and **ph-eth0** showing up in the `provider_networks` Hashspace, and consequently in the OVS plugin config file.

```javascript
"override_attributes": {
"quantum": {
"ovs": {
"provider_networks": {
"ph-eth0": {
"bridge": "br-eth0",
"vlans": "1001:1024"
}
}
}
}
}
```

This commit changes the syntax for defining the provider networks a bit; they are now defined as flat Hashes in an Array of provider networks. Ex:

```javascript
[
{
"interface" => "ph-eth1",
"bridge" => "br-eth1",
"vlans" => "1:1000"
}
]
```

This way, the default value for `provider_networks` -- now an Array -- can be overridden, allowing us to easily remove the default configuration for **ph-eth1**.