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



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

def all
  load(service.list_subnets.body)
end

#get(id) ⇒ Object



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

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