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>
18631 18632 18633 |
# File 'lib/ovirtsdk4/services.rb', line 18631 def add(limit, opts = {}) internal_add(limit, QuotaStorageLimit, ADD, opts) end |
#limit_service(id) ⇒ QuotaStorageLimitService
Locates the limit
service.
18676 18677 18678 |
# File 'lib/ovirtsdk4/services.rb', line 18676 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.
18665 18666 18667 |
# File 'lib/ovirtsdk4/services.rb', line 18665 def list(opts = {}) internal_get(LIST, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
18687 18688 18689 18690 18691 18692 18693 18694 18695 18696 |
# File 'lib/ovirtsdk4/services.rb', line 18687 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 |