Parent

Class/Module Index [+]

Quicksearch

Fog::Compute::IBM::Address

Constants

STATES

Public Class Methods

new(new_attributes={}) click to toggle source
# File lib/fog/ibm/models/compute/address.rb, line 32
def initialize(new_attributes={})
  super(new_attributes)
  self.offering_id ||= '20001223'
  self.location ||= '82'
end

Public Instance Methods

destroy() click to toggle source
# File lib/fog/ibm/models/compute/address.rb, line 55
def destroy
  requires :id
  service.delete_address(id).body['success']
end
ready?() click to toggle source
# File lib/fog/ibm/models/compute/address.rb, line 51
def ready?
  state == 'Free' || state == 'Released'
end
save() click to toggle source
# File lib/fog/ibm/models/compute/address.rb, line 38
def save
  requires :offering_id, :location
  data = service.create_address(location, offering_id,
                                   :vlan_id => vlan_id,
                                   :ip => ip)
  merge_attributes(data.body)
  true
end
state() click to toggle source
# File lib/fog/ibm/models/compute/address.rb, line 47
def state
  STATES[attributes[:state]]
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.