Class: OvirtSDK4::QuotaStorageLimitsService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary collapse
-
#add(limit, opts = {}) ⇒ QuotaStorageLimit
Adds a storage limit to a specified quota.
-
#limit_service(id) ⇒ QuotaStorageLimitService
Locates the
limit
service. -
#list(opts = {}) ⇒ Array<QuotaStorageLimit>
Returns the list of storage limits configured for the quota.
-
#service(path) ⇒ Service
Locates the service corresponding to the given path.
Methods inherited from Service
Instance Method Details
#add(limit, opts = {}) ⇒ QuotaStorageLimit
Adds a storage limit to a specified quota.
To create a 100GiB storage limit for all storage domains in a data center, send a request like this:
POST /ovirt-engine/api/datacenters/123/quotas/456/quotastoragelimits
With a request body like this:
<quota_storage_limit>
<limit>100</limit>
</quota_storage_limit>
To create a 50GiB storage limit for a storage domain with the ID 000
, send a request like this:
POST /ovirt-engine/api/datacenters/123/quotas/456/quotastoragelimits
With a request body like this:
<quota_storage_limit>
<limit>50</limit>
<storage_domain id="000"/>
</quota_storage_limit>
19936 19937 19938 |
# File 'lib/ovirtsdk4/services.rb', line 19936 def add(limit, opts = {}) internal_add(limit, QuotaStorageLimit, ADD, opts) end |
#limit_service(id) ⇒ QuotaStorageLimitService
Locates the limit
service.
19981 19982 19983 |
# File 'lib/ovirtsdk4/services.rb', line 19981 def limit_service(id) QuotaStorageLimitService.new(self, id) end |
#list(opts = {}) ⇒ Array<QuotaStorageLimit>
Returns the list of storage limits configured for the quota.
The order of the returned list of storage limits is not guaranteed.
19970 19971 19972 |
# File 'lib/ovirtsdk4/services.rb', line 19970 def list(opts = {}) internal_get(LIST, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
19992 19993 19994 19995 19996 19997 19998 19999 20000 20001 |
# File 'lib/ovirtsdk4/services.rb', line 19992 def service(path) if path.nil? || path == '' return self end index = path.index('/') if index.nil? return limit_service(path) end return limit_service(path[0..(index - 1)]).service(path[(index + 1)..-1]) end |