Class: OvirtSDK4::MeasurableService
- Inherits:
-
Service
- Object
- Service
- OvirtSDK4::MeasurableService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Direct Known Subclasses
DiskService, GlusterBrickService, GlusterVolumeService, HostNicService, HostNumaNodeService, HostService, StepService, VmDiskService, VmNicService, VmService
Instance Method Summary (collapse)
-
- (Service) service(path)
Locates the service corresponding to the given path.
-
- (StatisticsService) statistics_service
Locates the
statistics
service. -
- (String) to_s
Returns an string representation of this service.
Instance Method Details
- (Service) service(path)
Locates the service corresponding to the given path.
12239 12240 12241 12242 12243 12244 12245 12246 12247 12248 12249 12250 |
# File 'lib/ovirtsdk4/services.rb', line 12239 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 |
- (StatisticsService) statistics_service
Locates the statistics
service.
12228 12229 12230 |
# File 'lib/ovirtsdk4/services.rb', line 12228 def statistics_service return StatisticsService.new(@connection, "#{@path}/statistics") end |
- (String) to_s
Returns an string representation of this service.
12257 12258 12259 |
# File 'lib/ovirtsdk4/services.rb', line 12257 def to_s return "#<#{MeasurableService}:#{@path}>" end |