Class: Fog::Network::StormOnDemand::NetworkIPs

Inherits:
Collection
  • Object
show all
Defined in:
lib/fog/network/storm_on_demand/models/network_ips.rb

Instance Method Summary collapse

Instance Method Details

#add(options) ⇒ Object



7
8
9
10
# File 'lib/fog/network/storm_on_demand/models/network_ips.rb', line 7

def add(options)
  service.add_ip_to_server(options)
  true
end

#all(options = {}) ⇒ Object



17
18
19
20
# File 'lib/fog/network/storm_on_demand/models/network_ips.rb', line 17

def all(options = {})
  data = service.list_network_ips(options).body["items"]
  load(data)
end

#all_public(options = {}) ⇒ Object



26
27
28
29
# File 'lib/fog/network/storm_on_demand/models/network_ips.rb', line 26

def all_public(options = {})
  data = service.list_network_public_ips(options).body["items"]
  load(data)
end

#get(server_id, ip) ⇒ Object



12
13
14
15
# File 'lib/fog/network/storm_on_demand/models/network_ips.rb', line 12

def get(server_id, ip)
  data = service.get_ip_details(:uniq_id => server_id, :ip => ip).body
  new(data)
end

#get_public_accounts(options = {}) ⇒ Object



22
23
24
# File 'lib/fog/network/storm_on_demand/models/network_ips.rb', line 22

def get_public_accounts(options = {})
  service.list_ip_public_accounts(options).body["items"]
end

#remove(options) ⇒ Object



31
32
33
34
# File 'lib/fog/network/storm_on_demand/models/network_ips.rb', line 31

def remove(options)
  service.remove_ip_from_server(options)
  true
end

#request_new_ips(options) ⇒ Object



36
37
38
39
# File 'lib/fog/network/storm_on_demand/models/network_ips.rb', line 36

def request_new_ips(options)
  service.request_new_ips(options)
  true
end