Class: OvirtSDK4::QuotaClusterLimitService
- Inherits:
-
Service
- Object
- Service
- OvirtSDK4::QuotaClusterLimitService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary (collapse)
-
- (QuotaClusterLimit) get(opts = {})
Returns the representation of the object managed by this service.
-
- (Object) remove(opts = {})
Deletes 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
- (QuotaClusterLimit) get(opts = {})
Returns the representation of the object managed by this service.
15973 15974 15975 15976 15977 15978 15979 15980 15981 15982 15983 15984 15985 15986 15987 15988 |
# File 'lib/ovirtsdk4/services.rb', line 15973 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 QuotaClusterLimitReader.read_one(reader) ensure reader.close end else check_fault(response) end end |
- (Object) remove(opts = {})
Deletes the object managed by this service.
15997 15998 15999 16000 16001 16002 16003 16004 16005 16006 16007 16008 16009 |
# File 'lib/ovirtsdk4/services.rb', line 15997 def remove(opts = {}) query = {} value = opts[:async] unless value.nil? value = Writer.render_boolean(value) query['async'] = value end request = Request.new(:method => :DELETE, :path => @path, :query => query) response = @connection.send(request) unless response.code == 200 check_fault(response) end end |
- (Service) service(path)
Locates the service corresponding to the given path.
16018 16019 16020 16021 16022 16023 |
# File 'lib/ovirtsdk4/services.rb', line 16018 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.
16030 16031 16032 |
# File 'lib/ovirtsdk4/services.rb', line 16030 def to_s return "#<#{QuotaClusterLimitService}:#{@path}>" end |