Class: OvirtSDK4::KatelloErrataService
- Inherits:
-
Service
- Object
- Service
- OvirtSDK4::KatelloErrataService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Direct Known Subclasses
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.
11874 11875 11876 |
# File 'lib/ovirtsdk4/services.rb', line 11874 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.
11845 11846 11847 11848 11849 11850 11851 11852 11853 11854 11855 11856 11857 11858 11859 11860 11861 11862 11863 11864 11865 |
# File 'lib/ovirtsdk4/services.rb', line 11845 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.
11885 11886 11887 11888 11889 11890 11891 11892 11893 11894 |
# File 'lib/ovirtsdk4/services.rb', line 11885 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.
11901 11902 11903 |
# File 'lib/ovirtsdk4/services.rb', line 11901 def to_s return "#<#{KatelloErrataService}:#{@path}>" end |