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

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

Instance Method Summary collapse

Instance Method Details

#add(options) ⇒ Object



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

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

#all(options = {}) ⇒ Object



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

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

#all_public(options = {}) ⇒ Object



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

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

#get(server_id, ip) ⇒ Object



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

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



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

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

#remove(options) ⇒ Object



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

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

#request_new_ips(options) ⇒ Object



39
40
41
42
# File 'lib/fog/storm_on_demand/models/network/network_ips.rb', line 39

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