Class: OvirtSDK4::SystemOptionsService

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

#option_service(id) ⇒ SystemOptionService

Returns a reference to the service that provides values of specific configuration option.

Parameters:

  • id (String)

    The identifier of the option.

Returns:


26028
26029
26030
# File 'lib/ovirtsdk4/services.rb', line 26028

def option_service(id)
  SystemOptionService.new(self, id)
end

#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.


26039
26040
26041
26042
26043
26044
26045
26046
26047
26048
# File 'lib/ovirtsdk4/services.rb', line 26039

def service(path)
  if path.nil? || path == ''
    return self
  end
  index = path.index('/')
  if index.nil?
    return option_service(path)
  end
  return option_service(path[0..(index - 1)]).service(path[(index + 1)..-1])
end