opscode/ohai — pull request #251 by caryp (2013-12-23 23:37:34+00:00)
Title: OHAI-542 defined cloud plugin interface object

Added a class to help enforce the interface exposed to `node[:cloud]`. Here is the cloud plugin interface:

`cloud[:provider]` - (String) the cloud provider the VM is running on.

`cloud[:public_hostname]` - (String) a fully qualified hostname
`cloud[:local_hostname]` - (String) a hostname resolvable on the internal (private) network

`cloud[:public_ipv4_addrs]` - (Array) a list of all publicly accessible IPv4 addresses
`cloud[:local_ipv4_addrs]` - (Array) a list of all private IPv4 addresses
`cloud[:public_ipv4]` - (String) the first public IPv4 address detected
`cloud[:local_ipv4]` - (String) the first private IPv4 address detected

`cloud[:public_ipv6_addrs]` - (Array) a list of all publicly accessible IPv6 addresses
`cloud[:local_ipv6_addrs]` - (Array) a list of all private IPv6 addresses
`cloud[:public_ipv6]` - (String) the first public IPv6 address detected
`cloud[:local_ipv6]` - (String) the first private IPv6 address detected

The following keys are now deprecated in favor of the new ipv4 specific key names:

* cloud[:public_ips] - (Array) use `node[:cloud][:public_ipv4_addrs]` instead
* cloud[:private_ips] - (Array) use `node[:cloud][:local_ipv4_addrs]` instead

Breaking changes
* On GCE
* `cloud[:public_ipv4]` and `cloud[:local_ipv4]` are arrays. These will now be strings that represent a single IP address -- as on other clouds.
* On Azure
* the cloud specific key `:vm_name`, `:public_fqdn`, `:public_ssh_port`, and `:public_winrm_port` have been removed.
* for `:public_fqdn`, use `node['cloud']['public_hostname']` instead.
* the other cloud specific key/values should still be accessible via `node['azure']`