Class: Fog::Compute::Brightbox::CloudIp
- Defined in:
- lib/fog/brightbox/models/compute/cloud_ip.rb
Instance Attribute Summary
Attributes inherited from Model
Instance Method Summary collapse
Methods inherited from Model
#initialize, #inspect, #reload, #symbolize_keys, #to_json, #wait_for
Methods included from Attributes::ClassMethods
#_load, #aliases, #attribute, #attributes, #identity, #ignore_attributes, #ignored_attributes
Methods included from Fog::Core::DeprecatedConnectionAccessors
#connection, #connection=, #prepare_service_value
Methods included from Attributes::InstanceMethods
#_dump, #attributes, #dup, #identity, #identity=, #merge_attributes, #new_record?, #persisted?, #requires, #requires_one
Constructor Details
This class inherits a constructor from Fog::Model
Instance Method Details
#destroy ⇒ Object
51 52 53 54 |
# File 'lib/fog/brightbox/models/compute/cloud_ip.rb', line 51 def destroy requires :identity service.destroy_cloud_ip(identity) end |
#map(destination) ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/fog/brightbox/models/compute/cloud_ip.rb', line 29 def map(destination) requires :identity case destination when Fog::Compute::Brightbox::Server final_destination = destination.interfaces.first["id"] when Fog::Compute::Brightbox::LoadBalancer final_destination = destination.id else final_destination = destination end service.map_cloud_ip(identity, :destination => final_destination) end |
#mapped? ⇒ Boolean
42 43 44 |
# File 'lib/fog/brightbox/models/compute/cloud_ip.rb', line 42 def mapped? status == "mapped" end |
#unmap ⇒ Object
46 47 48 49 |
# File 'lib/fog/brightbox/models/compute/cloud_ip.rb', line 46 def unmap requires :identity service.unmap_cloud_ip(identity) end |