Class: Fog::Compute::ProfitBricks::Interfaces

Inherits:
Fog::Collection
  • Object
show all
Defined in:
lib/fog/profitbricks/models/compute/interfaces.rb

Instance Method Summary collapse

Instance Method Details

#allObject



10
11
12
# File 'lib/fog/profitbricks/models/compute/interfaces.rb', line 10

def all
    load(service.get_all_nic.body['getAllNicResponse'])
end

#get(id) ⇒ Object



14
15
16
17
18
19
20
# File 'lib/fog/profitbricks/models/compute/interfaces.rb', line 14

def get(id)
    interface = service.get_nic(id).body['getNicResponse']
    Excon::Errors
    new(interface)
rescue Excon::Errors::NotFound
    nil
end