Class: OvirtSDK4::SnapshotNicService
- Inherits:
-
Service
- Object
- Service
- OvirtSDK4::SnapshotNicService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary (collapse)
-
- (Nic) 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
- (Nic) get(opts = {})
Returns the representation of the object managed by this service.
17689 17690 17691 17692 17693 17694 17695 17696 17697 17698 17699 17700 17701 17702 17703 17704 |
# File 'lib/ovirtsdk4/services.rb', line 17689 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 NicReader.read_one(reader) ensure reader.close end else check_fault(response) end end |
- (Service) service(path)
Locates the service corresponding to the given path.
17713 17714 17715 17716 17717 17718 |
# File 'lib/ovirtsdk4/services.rb', line 17713 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.
17725 17726 17727 |
# File 'lib/ovirtsdk4/services.rb', line 17725 def to_s return "#<#{SnapshotNicService}:#{@path}>" end |