Class: OvirtSDK4::QuotaStorageLimitService
- Inherits:
-
Service
- Object
- Service
- OvirtSDK4::QuotaStorageLimitService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary (collapse)
-
- (QuotaStorageLimit) 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
- (QuotaStorageLimit) get(opts = {})
Returns the representation of the object managed by this service.
16179 16180 16181 16182 16183 16184 16185 16186 16187 16188 16189 16190 16191 16192 16193 16194 |
# File 'lib/ovirtsdk4/services.rb', line 16179 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 QuotaStorageLimitReader.read_one(reader) ensure reader.close end else check_fault(response) end end |
- (Object) remove(opts = {})
Deletes the object managed by this service.
16203 16204 16205 16206 16207 16208 16209 16210 16211 16212 16213 16214 16215 |
# File 'lib/ovirtsdk4/services.rb', line 16203 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.
16224 16225 16226 16227 16228 16229 |
# File 'lib/ovirtsdk4/services.rb', line 16224 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.
16236 16237 16238 |
# File 'lib/ovirtsdk4/services.rb', line 16236 def to_s return "#<#{QuotaStorageLimitService}:#{@path}>" end |