Model to store the hardware profile applied to an instance together with any instance-specific overrides
# 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
# File lib/deltacloud/models/instance_address.rb, line 52 def is_hostname? address_type == :hostname end
# File lib/deltacloud/models/instance_address.rb, line 44 def is_ipv4? address_type == :ipv4 end
# File lib/deltacloud/models/instance_address.rb, line 48 def is_ipv6? address_type == :ipv6 end
# File lib/deltacloud/models/instance_address.rb, line 40 def is_mac? address_type == :mac end
# File lib/deltacloud/models/instance_address.rb, line 56 def is_vnc? address_type == :vnc end
# File lib/deltacloud/models/instance_address.rb, line 35 def to_s return ['VNC', address, port].join(':') if is_vnc? address end