Class: Fog::Compute::XenServer::PifsMetrics

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

Instance Method Summary collapse

Instance Method Details

#all(options = {}) ⇒ Object



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

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

#get(pif_metrics_ref) ⇒ Object



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

def get( pif_metrics_ref )
  if pif_metrics_ref && pif_metrics = service.get_record( pif_metrics_ref, 'PIF_metrics' )
    new(pif_metrics)
  else
    nil
  end
end