Class: OvirtSDK4::VmSessionService
- Inherits:
-
Service
- Object
- Service
- OvirtSDK4::VmSessionService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary (collapse)
-
- (Session) 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
- (Session) get(opts = {})
Returns the representation of the object managed by this service.
26287 26288 26289 26290 26291 26292 26293 26294 26295 26296 26297 26298 26299 26300 26301 26302 |
# File 'lib/ovirtsdk4/services.rb', line 26287 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 SessionReader.read_one(reader) ensure reader.close end else check_fault(response) end end |
- (Service) service(path)
Locates the service corresponding to the given path.
26311 26312 26313 26314 26315 26316 |
# File 'lib/ovirtsdk4/services.rb', line 26311 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.
26323 26324 26325 |
# File 'lib/ovirtsdk4/services.rb', line 26323 def to_s return "#<#{VmSessionService}:#{@path}>" end |