class Fog::Compute::Packet::Ip
Ip
Model
Public Class Methods
new(attributes = {})
click to toggle source
Calls superclass method
# File lib/fog/compute/packet/models/ip.rb, line 26 def initialize(attributes = {}) super end
Public Instance Methods
assign(device_id)
click to toggle source
# File lib/fog/compute/packet/models/ip.rb, line 42 def assign(device_id) requires :address, :manageable options = {} options[:address] = address options[:manageable] = manageable response = service.assign_ip(device_id, options) true if response.status == 201 end
save()
click to toggle source
# File lib/fog/compute/packet/models/ip.rb, line 30 def save requires :project_id, :facility, :type, :quantity options = {} options[:quantity] = quantity options[:type] = type options[:facility] = facility response = service.reserve_ip(project_id, options) merge_attributes(response.body) end
unassign()
click to toggle source
# File lib/fog/compute/packet/models/ip.rb, line 53 def unassign response = service.unassign_ip(id) true if response.status == 204 end