Class: OvirtSDK4::ExternalDiscoveredHostService
- Inherits:
-
Service
- Object
- Service
- OvirtSDK4::ExternalDiscoveredHostService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary (collapse)
-
- (ExternalDiscoveredHost) 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
- (ExternalDiscoveredHost) get(opts = {})
Returns the representation of the object managed by this service.
6970 6971 6972 6973 6974 6975 6976 6977 6978 6979 6980 6981 6982 6983 6984 6985 |
# File 'lib/ovirtsdk4/services.rb', line 6970 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 ExternalDiscoveredHostReader.read_one(reader) ensure reader.close end else check_fault(response) end end |
- (Service) service(path)
Locates the service corresponding to the given path.
6994 6995 6996 6997 6998 6999 |
# File 'lib/ovirtsdk4/services.rb', line 6994 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.
7006 7007 7008 |
# File 'lib/ovirtsdk4/services.rb', line 7006 def to_s return "#<#{ExternalDiscoveredHostService}:#{@path}>" end |