Class: OvirtSDK4::ExternalComputeResourceService
- Inherits:
-
Service
- Object
- Service
- OvirtSDK4::ExternalComputeResourceService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary (collapse)
-
- (ExternalComputeResource) 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
- (ExternalComputeResource) get(opts = {})
Returns the representation of the object managed by this service.
6818 6819 6820 6821 6822 6823 6824 6825 6826 6827 6828 6829 6830 6831 6832 6833 |
# File 'lib/ovirtsdk4/services.rb', line 6818 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 ExternalComputeResourceReader.read_one(reader) ensure reader.close end else check_fault(response) end end |
- (Service) service(path)
Locates the service corresponding to the given path.
6842 6843 6844 6845 6846 6847 |
# File 'lib/ovirtsdk4/services.rb', line 6842 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.
6854 6855 6856 |
# File 'lib/ovirtsdk4/services.rb', line 6854 def to_s return "#<#{ExternalComputeResourceService}:#{@path}>" end |