Class: Fog::Network::Softlayer::Subnets

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

Instance Method Summary collapse

Instance Method Details

#allObject



18
19
20
# File 'lib/fog/softlayer/models/network/subnets.rb', line 18

def all
  load(service.list_subnets.body)
end

#get(id) ⇒ Object



22
23
24
25
26
27
28
# File 'lib/fog/softlayer/models/network/subnets.rb', line 22

def get(id)
  if subnet = service.get_subnet(id).body
    new(subnet)
  end
rescue Fog::Network::Softlayer::NotFound
  nil
end