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
limitservice. -
#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>
18553 18554 18555 |
# File 'lib/ovirtsdk4/services.rb', line 18553 def add(limit, opts = {}) internal_add(limit, QuotaStorageLimit, ADD, opts) end |
#limit_service(id) ⇒ QuotaStorageLimitService
Locates the limit service.
18598 18599 18600 |
# File 'lib/ovirtsdk4/services.rb', line 18598 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.
18587 18588 18589 |
# File 'lib/ovirtsdk4/services.rb', line 18587 def list(opts = {}) internal_get(LIST, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
18609 18610 18611 18612 18613 18614 18615 18616 18617 18618 |
# File 'lib/ovirtsdk4/services.rb', line 18609 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 |