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>
19800 19801 19802 |
# File 'lib/ovirtsdk4/services.rb', line 19800 def add(limit, opts = {}) internal_add(limit, QuotaStorageLimit, ADD, opts) end |
#limit_service(id) ⇒ QuotaStorageLimitService
Locates the limit
service.
19845 19846 19847 |
# File 'lib/ovirtsdk4/services.rb', line 19845 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.
19834 19835 19836 |
# File 'lib/ovirtsdk4/services.rb', line 19834 def list(opts = {}) internal_get(LIST, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
19856 19857 19858 19859 19860 19861 19862 19863 19864 19865 |
# File 'lib/ovirtsdk4/services.rb', line 19856 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 |