Class: OvirtSDK4::BalancesService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary collapse
-
#add(balance, opts = {}) ⇒ Balance
Add a balance module to a specified user defined scheduling policy.
-
#balance_service(id) ⇒ BalanceService
Locates the
balance
service. -
#list(opts = {}) ⇒ Array<Balance>
Returns the list of balance modules used by the scheduling policy.
-
#service(path) ⇒ Service
Locates the service corresponding to the given path.
Methods inherited from Service
Instance Method Details
#add(balance, opts = {}) ⇒ Balance
Add a balance module to a specified user defined scheduling policy.
4246 4247 4248 |
# File 'lib/ovirtsdk4/services.rb', line 4246 def add(balance, opts = {}) internal_add(balance, Balance, ADD, opts) end |
#balance_service(id) ⇒ BalanceService
Locates the balance
service.
4294 4295 4296 |
# File 'lib/ovirtsdk4/services.rb', line 4294 def balance_service(id) BalanceService.new(self, id) end |
#list(opts = {}) ⇒ Array<Balance>
Returns the list of balance modules used by the scheduling policy.
The order of the returned balance modules isn’t guaranteed.
4283 4284 4285 |
# File 'lib/ovirtsdk4/services.rb', line 4283 def list(opts = {}) internal_get(LIST, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 |
# File 'lib/ovirtsdk4/services.rb', line 4305 def service(path) if path.nil? || path == '' return self end index = path.index('/') if index.nil? return balance_service(path) end return balance_service(path[0..(index - 1)]).service(path[(index + 1)..-1]) end |