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 HTTP/1.1
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 HTTP/1.1
With a request body like this:
<quota_storage_limit>
<limit>50</limit>
<storage_domain id="000"/>
</quota_storage_limit>
19671 19672 19673 |
# File 'lib/ovirtsdk4/services.rb', line 19671 def add(limit, opts = {}) internal_add(limit, QuotaStorageLimit, ADD, opts) end |
#limit_service(id) ⇒ QuotaStorageLimitService
Locates the limit service.
19716 19717 19718 |
# File 'lib/ovirtsdk4/services.rb', line 19716 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.
19705 19706 19707 |
# File 'lib/ovirtsdk4/services.rb', line 19705 def list(opts = {}) internal_get(LIST, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
19727 19728 19729 19730 19731 19732 19733 19734 19735 19736 |
# File 'lib/ovirtsdk4/services.rb', line 19727 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 |