class Fog::Compute::Ecloud::IpAddress

Public Instance Methods

id() click to toggle source
# File lib/fog/compute/ecloud/models/ip_address.rb, line 19
def id
  href.match(/((\d+{1,3}\.){3}(\d+{1,3}))$/)[1]
end
network() click to toggle source
# File lib/fog/compute/ecloud/models/ip_address.rb, line 31
def network
  reload if other_links.nil?
  network_href = other_links.find { |l| l[:type] == "application/vnd.tmrk.cloud.network" }[:href]
  network      = self.service.networks.get(network_href)
end
reload() click to toggle source
Calls superclass method Fog::Ecloud::Model#reload
# File lib/fog/compute/ecloud/models/ip_address.rb, line 37
def reload
  @server = nil
  super
end
server() click to toggle source
# File lib/fog/compute/ecloud/models/ip_address.rb, line 23
def server
  @server ||= begin
                reload unless other_links
                server_link = other_links.find{|l| l[:type] == "application/vnd.tmrk.cloud.virtualMachine"}
                self.service.servers.get(server_link[:href])
              end
end
status() click to toggle source
# File lib/fog/compute/ecloud/models/ip_address.rb, line 15
def status
  (detected_on || host) ? "Assigned" : "Available"
end