Class: Fog::Compute::XenServer::Vifs

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

Instance Method Summary collapse

Instance Method Details

#all(options = {}) ⇒ Object



10
11
12
13
# File 'lib/fog/xenserver/models/compute/vifs.rb', line 10

def all(options = {})
  data = service.get_records 'VIF'
  load(data)
end

#get(ref) ⇒ Object



15
16
17
18
19
20
21
# File 'lib/fog/xenserver/models/compute/vifs.rb', line 15

def get( ref )
  if ref && obj = service.get_record( ref, 'VIF' )
    new(obj)
  end
rescue Fog::XenServer::NotFound
  nil
end