Class: OvirtSDK4::ExternalHostGroupService
- Inherits:
-
Service
- Object
- Service
- OvirtSDK4::ExternalHostGroupService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary (collapse)
-
- (ExternalHostGroup) 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
- (ExternalHostGroup) get(opts = {})
Returns the representation of the object managed by this service.
7187 7188 7189 7190 7191 7192 7193 7194 7195 7196 7197 7198 7199 7200 7201 7202 |
# File 'lib/ovirtsdk4/services.rb', line 7187 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 ExternalHostGroupReader.read_one(reader) ensure reader.close end else check_fault(response) end end |
- (Service) service(path)
Locates the service corresponding to the given path.
7211 7212 7213 7214 7215 7216 |
# File 'lib/ovirtsdk4/services.rb', line 7211 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.
7223 7224 7225 |
# File 'lib/ovirtsdk4/services.rb', line 7223 def to_s return "#<#{ExternalHostGroupService}:#{@path}>" end |