Class: Fog::Compute::XenServer::StorageRepositories

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

Instance Method Summary collapse

Instance Method Details

#allObject



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

def all
  data = service.get_records 'SR'
  #data.delete_if {|sr| sr[:shared].eql?(false)}
  #data.delete_if {|sr| sr[:content_type].eql?('iso')}
  load(data)
end

#get(sr_ref) ⇒ Object



17
18
19
20
21
22
23
# File 'lib/fog/xenserver/models/compute/storage_repositories.rb', line 17

def get( sr_ref )
  if sr_ref && sr = service.get_record( sr_ref, 'SR' )
    new(sr)
  else
    nil
  end
end