Class: Fog::Compute::XenServer::ServerAppliances

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

Instance Method Summary collapse

Instance Method Details

#all(options = {}) ⇒ Object



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

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

#get(server_appliance_ref) ⇒ Object



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

def get( server_appliance_ref )
  if server_appliance_ref && server_appliance = service.get_record( server_appliance_ref, 'VM_appliance' )
    new(server_appliance)
  else
    nil
  end
end