Class: OvirtSDK4::SnapshotCdromService
- Inherits:
-
Service
- Object
- Service
- OvirtSDK4::SnapshotCdromService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary (collapse)
-
- (Cdrom) 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
- (Cdrom) get(opts = {})
Returns the representation of the object managed by this service.
17385 17386 17387 17388 17389 17390 17391 17392 17393 17394 17395 17396 17397 17398 17399 17400 |
# File 'lib/ovirtsdk4/services.rb', line 17385 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 CdromReader.read_one(reader) ensure reader.close end else check_fault(response) end end |
- (Service) service(path)
Locates the service corresponding to the given path.
17409 17410 17411 17412 17413 17414 |
# File 'lib/ovirtsdk4/services.rb', line 17409 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.
17421 17422 17423 |
# File 'lib/ovirtsdk4/services.rb', line 17421 def to_s return "#<#{SnapshotCdromService}:#{@path}>" end |