OHAI-542 defined cloud plugin interface object #251

Closed
wants to merge 1 commit into
from

Projects

None yet

2 participants

@caryp
Contributor
caryp commented Dec 23, 2013

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']
@caryp
Contributor
caryp commented Dec 23, 2013

This is a potential fix for https://tickets.opscode.com/browse/OHAI-542

@adamedx
Contributor
adamedx commented Jan 8, 2014

@paulrossman, do you have any thoughts on the gce aspects of this PR? It's not clear this would coexist with you recent PR.

@adamedx
Contributor
adamedx commented Jan 8, 2014

@chirag, this pr removes some attributes from the Azure plug-in -- what is the impact? Do we need to change the Azure plug-in if we take this request, or are the attributes essentially unused currently?

@caryp
Contributor
caryp commented Jan 8, 2014

@adamedx: all the Azure attributes will still exist as-is under the node['azure'] hash just not under the generic node['cloud'] hash -- since no other clouds currently support those things.

@caryp
Contributor
caryp commented Jan 8, 2014

Thank you for the review and effort!!

@caryp
Contributor
caryp commented Feb 27, 2014

Closing based on mailing list thread about namespacing options: http://lists.opscode.com/sympa/arc/chef/2014-01/msg00377.html

@caryp caryp closed this Feb 27, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment