class Fog::Network::StormOnDemand::PrivateIps

Public Instance Methods

all() click to toggle source
# File lib/fog/network/storm_on_demand/models/private_ips.rb, line 7
def all
  data = service.list_private_ips.body["networks"]
  load(data)
end
attach(server_id) click to toggle source
# File lib/fog/network/storm_on_demand/models/private_ips.rb, line 16
def attach(server_id)
  res = service.attach_server_to_private_ip(:uniq_id => server_id).body
  res["attached"].to_i == 1 ? true : false
end
attached?(server_id) click to toggle source
# File lib/fog/network/storm_on_demand/models/private_ips.rb, line 26
def attached?(server_id)
  r = service.check_server_attached(:uniq_id => server_id).body
  r["is_attached"].to_i == 1 ? true : false
end
detach(server_id) click to toggle source
# File lib/fog/network/storm_on_demand/models/private_ips.rb, line 21
def detach(server_id)
  r = service.detach_server_from_private_ip(:uniq_id => server_id).body
  r["detached"].to_i == 1 ? true : false
end
get(server_id) click to toggle source
# File lib/fog/network/storm_on_demand/models/private_ips.rb, line 12
def get(server_id)
  service.get_private_ip(:uniq_id => server_id).body["ip"]
end