Class: OvirtSDK4::EngineKatelloErrataService
- Inherits:
-
KatelloErrataService
- Object
- Service
- KatelloErrataService
- OvirtSDK4::EngineKatelloErrataService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary (collapse)
-
- (KatelloErratumService) katello_erratum_service(id)
Locates the
katello_erratum
service. -
- (Array<KatelloErratum>) list(opts = {})
Returns the representation of the object managed by this service.
-
- (Service) service(path)
Locates the service corresponding to the given path.
-
- (String) to_s
Returns an string representation of this service.
Instance Method Details
- (KatelloErratumService) katello_erratum_service(id)
Locates the katello_erratum
service.
27664 27665 27666 |
# File 'lib/ovirtsdk4/services.rb', line 27664 def katello_erratum_service(id) return KatelloErratumService.new(@connection, "#{@path}/#{id}") end |
- (Array<KatelloErratum>) list(opts = {})
Returns the representation of the object managed by this service.
27635 27636 27637 27638 27639 27640 27641 27642 27643 27644 27645 27646 27647 27648 27649 27650 27651 27652 27653 27654 27655 |
# File 'lib/ovirtsdk4/services.rb', line 27635 def list(opts = {}) query = {} value = opts[:max] unless value.nil? value = Writer.render_integer(value) query['max'] = value end request = Request.new(:method => :GET, :path => @path, :query => query) response = @connection.send(request) case response.code when 200 begin reader = XmlReader.new(response.body) return KatelloErratumReader.read_many(reader) ensure reader.close end else check_fault(response) end end |
- (Service) service(path)
Locates the service corresponding to the given path.
27675 27676 27677 27678 27679 27680 27681 27682 27683 27684 |
# File 'lib/ovirtsdk4/services.rb', line 27675 def service(path) if path.nil? || path == '' return self end index = path.index('/') if index.nil? return katello_erratum_service(path) end return katello_erratum_service(path[0..(index - 1)]).service(path[(index +1)..-1]) end |
- (String) to_s
Returns an string representation of this service.
27691 27692 27693 |
# File 'lib/ovirtsdk4/services.rb', line 27691 def to_s return "#<#{EngineKatelloErrataService}:#{@path}>" end |