Class: OvirtSDK4::VmApplicationService
- Inherits:
-
Service
- Object
- Service
- OvirtSDK4::VmApplicationService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary (collapse)
-
- (Application) 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
- (Application) get(opts = {})
Returns the representation of the object managed by this service.
24211 24212 24213 24214 24215 24216 24217 24218 24219 24220 24221 24222 24223 24224 24225 24226 24227 24228 24229 24230 24231 |
# File 'lib/ovirtsdk4/services.rb', line 24211 def get(opts = {}) query = {} value = opts[:filter] unless value.nil? value = Writer.render_boolean(value) query['filter'] = value end 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 ApplicationReader.read_one(reader) ensure reader.close end else check_fault(response) end end |
- (Service) service(path)
Locates the service corresponding to the given path.
24240 24241 24242 24243 24244 24245 |
# File 'lib/ovirtsdk4/services.rb', line 24240 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.
24252 24253 24254 |
# File 'lib/ovirtsdk4/services.rb', line 24252 def to_s return "#<#{VmApplicationService}:#{@path}>" end |