class Fog::Compute::Brightbox::CloudIp

Public Instance Methods

destination_id() click to toggle source
# File lib/fog/brightbox/models/compute/cloud_ip.rb, line 58
def destination_id
  server_id || load_balancer || server_group || database_server || interface_id
end
destroy() click to toggle source
# File lib/fog/brightbox/models/compute/cloud_ip.rb, line 53
def destroy
  requires :identity
  service.destroy_cloud_ip(identity)
end
map(destination) click to toggle source

Attempt to map or point the Cloud IP to the destination resource.

@param [Object] destination

# File lib/fog/brightbox/models/compute/cloud_ip.rb, line 32
def map(destination)
  requires :identity
  if destination.respond_to?(:mapping_identity)
    final_destination = destination.mapping_identity
  elsif destination.respond_to?(:identity)
    final_destination = destination.identity
  else
    final_destination = destination
  end
  service.map_cloud_ip(identity, :destination => final_destination)
end
mapped?() click to toggle source
# File lib/fog/brightbox/models/compute/cloud_ip.rb, line 44
def mapped?
  status == "mapped"
end
unmap() click to toggle source
# File lib/fog/brightbox/models/compute/cloud_ip.rb, line 48
def unmap
  requires :identity
  service.unmap_cloud_ip(identity)
end