Parent

Class/Module Index [+]

Quicksearch

InstanceAddress

Model to store the hardware profile applied to an instance together with any instance-specific overrides

Attributes

address[RW]
address_type[RW]
port[RW]

Public Class Methods

new(address, opts={}) click to toggle source
# File lib/deltacloud/models/instance_address.rb, line 24
def initialize(address, opts={})
  self.address = address
  self.port = opts[:port] if opts[:port]
  self.address_type = opts[:type] || :ipv4
  self
end

Public Instance Methods

is_hostname?() click to toggle source
# File lib/deltacloud/models/instance_address.rb, line 48
def is_hostname?
  address_type == :hostname
end
is_ipv4?() click to toggle source
# File lib/deltacloud/models/instance_address.rb, line 44
def is_ipv4?
  address_type == :ipv4
end
is_mac?() click to toggle source
# File lib/deltacloud/models/instance_address.rb, line 40
def is_mac?
  address_type == :mac
end
is_vnc?() click to toggle source
# File lib/deltacloud/models/instance_address.rb, line 52
def is_vnc?
  address_type == :vnc
end
to_s() click to toggle source
# File lib/deltacloud/models/instance_address.rb, line 35
def to_s
  return ['VNC', address, port].join(':') if is_vnc?
  address
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.