fog/fog — pull request #1544 by smgt (2013-02-01 19:46:08+00:00)
Title: [glesys] The ip part of Glesys has some holes in it

The `Fog::Compute::Glesys::Ip` and `Fog::Compute::Glesys::Ips` models didn't work very well. When trying to fetch a ip for example no `ip` was returned, only `platform` and `datacenter`. So today I refactored most of the Glesys ip management in Fog.

## Example code

```ruby
glesys = Fog::Compute[:glesys]

glesys.ips # list all your own ips
glesys.ips.free(:datacenter => "Falkenberg", :platform => "OpenVZ", :version => 4) # list all ips in the glesys ip pool on a particular datacenter and platform
glesys.ips.get("127.0.0.1") # get a ip you own
glesys.ips.attached # list all ips attached to a server
glesys.ips.available # list all ips not attached to a server
glesys.ips.take("127.0.0.1") # Take a ip that and attach it to your glesys account
glesys.ips.release("127.0.0.1") # Release a ip, remove it from your account
glesys.ips.attach(ip, server) # Attach a ip to a server
glesys.ips.remove(ip) # Remove a ip from the server it is attached ot

server = glesys.servers.first
server.ips.attach(ip) # Attach a ip to the current server
server.ips.all # List the current ips attached to the server
server.ips.remove(ip) # Remove the ip from the server
server.ips.free # Returns a list of ips that is free from Glesys ip pool and suits the current server

ip_address = server.ips.free.sample
server.ips.take ip_address, :attach => true # Attach a random new ip to the server

ip = glesys.ips.first
ip.attached? # Is the current ip attached?
ip.release # Release the ip, remove it from your account. Will raise a error if the ip is attached to a server
ip.attach(s) # Attach the ip to a server
ip.remove # Remove a ip if it is attached to a server
ip.destroy # Remove and release a ip
```