Class: Fog::Compute::Brightbox::CloudIp

Inherits:
Model
  • Object
show all
Defined in:
lib/fog/compute/models/brightbox/cloud_ip.rb

Instance Attribute Summary

Attributes inherited from Model

#collection, #connection

Instance Method Summary collapse

Methods inherited from Model

#initialize, #inspect, #reload, #to_json, #wait_for

Methods included from Attributes::ClassMethods

#_load, #aliases, #attribute, #attributes, #identity, #ignore_attributes, #ignored_attributes

Methods included from Attributes::InstanceMethods

#_dump, #attributes, #dup, #identity, #identity=, #merge_attributes, #new_record?, #requires

Constructor Details

This class inherits a constructor from Fog::Model

Instance Method Details

#destroyObject



38
39
40
41
# File 'lib/fog/compute/models/brightbox/cloud_ip.rb', line 38

def destroy
  requires :identity
  connection.destroy_cloud_ip(identity)
end

#map(interface_to_map) ⇒ Object



24
25
26
27
# File 'lib/fog/compute/models/brightbox/cloud_ip.rb', line 24

def map(interface_to_map)
  requires :identity
  connection.map_cloud_ip(identity, :interface => interface_to_map)
end

#mapped?Boolean

Returns:

  • (Boolean)


29
30
31
# File 'lib/fog/compute/models/brightbox/cloud_ip.rb', line 29

def mapped?
  status == "mapped"
end

#unmapObject



33
34
35
36
# File 'lib/fog/compute/models/brightbox/cloud_ip.rb', line 33

def unmap
  requires :identity
  connection.unmap_cloud_ip(identity)
end