Class: OvirtSDK4::OperatingSystemService
- Inherits:
-
Service
- Object
- Service
- OvirtSDK4::OperatingSystemService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary (collapse)
-
- (OperatingSystemInfo) get(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
- (OperatingSystemInfo) get(opts = {})
Returns the representation of the object managed by this service.
15134 15135 15136 15137 15138 15139 15140 15141 15142 15143 15144 15145 15146 15147 15148 15149 |
# File 'lib/ovirtsdk4/services.rb', line 15134 def get(opts = {}) query = {} 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 OperatingSystemInfoReader.read_one(reader) ensure reader.close end else check_fault(response) end end |
- (Service) service(path)
Locates the service corresponding to the given path.
15158 15159 15160 15161 15162 15163 |
# File 'lib/ovirtsdk4/services.rb', line 15158 def service(path) if path.nil? || path == '' return self end raise Error.new("The path \"#{path}\" doesn't correspond to any service") end |
- (String) to_s
Returns an string representation of this service.
15170 15171 15172 |
# File 'lib/ovirtsdk4/services.rb', line 15170 def to_s return "#<#{OperatingSystemService}:#{@path}>" end |