Class: OvirtSDK4::MeasurableService

Inherits:
Service
  • Object
show all
Defined in:
lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb

Instance Method Summary collapse

Methods inherited from Service

#inspect, #to_s

Instance Method Details

#service(path) ⇒ Service

Locates the service corresponding to the given path.

Parameters:

  • path (String)

    The path of the service.

Returns:

  • (Service)

    A reference to the service.

Raises:



14384
14385
14386
14387
14388
14389
14390
14391
14392
14393
14394
14395
# File 'lib/ovirtsdk4/services.rb', line 14384

def service(path)
  if path.nil? || path == ''
    return self
  end
  if path == 'statistics'
    return statistics_service
  end
  if path.start_with?('statistics/')
    return statistics_service.service(path[11..-1])
  end
  raise Error.new("The path \"#{path}\" doesn't correspond to any service")
end

#statistics_serviceStatisticsService

Locates the statistics service.

Returns:



14373
14374
14375
# File 'lib/ovirtsdk4/services.rb', line 14373

def statistics_service
  @statistics_service ||= StatisticsService.new(self, 'statistics')
end