fog / fog-openstack

Fog for OpenStack Platform
MIT License
67 stars 130 forks source link

Instance addresses are assumed to always be named 'public' or 'private' #39

Open plribeiro3000 opened 8 years ago

plribeiro3000 commented 8 years ago

I have a cloud where the default names of 'public' and 'private' are not used for the collection of addresses returned upon a new server's creation. Newer OpenStack deployments offer metadata along with the addresses to give a hint as to whether they are public or private, but given that with Neutron you can have arbitrary numbers of networks and IP addresses, simply assuming 'public' and 'private' here is insufficient.

Most OpenStack deployments have an extension enabled that gives you metadata called OS-EXT-IPS which gives you a hint as to whether the IP address is public or private. There is a 'type' field which can contain the following values: "fixed", "floating", where fixed is assumed private and floating is assumed public.

For more detail: https://github.com/openstack/nova/blob/master/doc/api_samples/OS-EXT-IPS/servers-detail-resp.json

Original issue opened by @devcamcar at fog/fog#2559.

plribeiro3000 commented 8 years ago

cc/ @devcamcar @geemus @krames @gdahlm @wolf31o2

zhitongLBN commented 8 years ago

@plribeiro3000 @geemus : I've the same pb with my provider(mine is called Ext-Net), please have this fixed _( ゚Д゚)ノ

plribeiro3000 commented 8 years ago

cc/ @fog/fog-openstack In case someone in here is active to take a look.

jjasghar commented 8 years ago

I'll attempt to repo asap