Class: OvirtSDK4::HostHookService
- Inherits:
-
Service
- Object
- Service
- OvirtSDK4::HostHookService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary (collapse)
-
- (Hook) 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
- (Hook) get(opts = {})
Returns the representation of the object managed by this service.
9653 9654 9655 9656 9657 9658 9659 9660 9661 9662 9663 9664 9665 9666 9667 9668 |
# File 'lib/ovirtsdk4/services.rb', line 9653 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 HookReader.read_one(reader) ensure reader.close end else check_fault(response) end end |
- (Service) service(path)
Locates the service corresponding to the given path.
9677 9678 9679 9680 9681 9682 |
# File 'lib/ovirtsdk4/services.rb', line 9677 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.
9689 9690 9691 |
# File 'lib/ovirtsdk4/services.rb', line 9689 def to_s return "#<#{HostHookService}:#{@path}>" end |