Class: OvirtSDK4::VmReportedDeviceService
- Inherits:
-
Service
- Object
- Service
- OvirtSDK4::VmReportedDeviceService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary (collapse)
-
- (ReportedDevice) 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
- (ReportedDevice) get(opts = {})
Returns the representation of the object managed by this service.
26135 26136 26137 26138 26139 26140 26141 26142 26143 26144 26145 26146 26147 26148 26149 26150 |
# File 'lib/ovirtsdk4/services.rb', line 26135 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 ReportedDeviceReader.read_one(reader) ensure reader.close end else check_fault(response) end end |
- (Service) service(path)
Locates the service corresponding to the given path.
26159 26160 26161 26162 26163 26164 |
# File 'lib/ovirtsdk4/services.rb', line 26159 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.
26171 26172 26173 |
# File 'lib/ovirtsdk4/services.rb', line 26171 def to_s return "#<#{VmReportedDeviceService}:#{@path}>" end |