Class: OvirtSDK4::DomainUserService
- Inherits:
-
Service
- Object
- Service
- OvirtSDK4::DomainUserService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary (collapse)
-
- (User) 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
- (User) get(opts = {})
Returns the representation of the object managed by this service.
6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 |
# File 'lib/ovirtsdk4/services.rb', line 6320 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 UserReader.read_one(reader) ensure reader.close end else check_fault(response) end end |
- (Service) service(path)
Locates the service corresponding to the given path.
6344 6345 6346 6347 6348 6349 |
# File 'lib/ovirtsdk4/services.rb', line 6344 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.
6356 6357 6358 |
# File 'lib/ovirtsdk4/services.rb', line 6356 def to_s return "#<#{DomainUserService}:#{@path}>" end |