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
balanceservice. -
#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.
4241 4242 4243 |
# File 'lib/ovirtsdk4/services.rb', line 4241 def add(balance, opts = {}) internal_add(balance, Balance, ADD, opts) end |
#balance_service(id) ⇒ BalanceService
Locates the balance service.
4289 4290 4291 |
# File 'lib/ovirtsdk4/services.rb', line 4289 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.
4278 4279 4280 |
# File 'lib/ovirtsdk4/services.rb', line 4278 def list(opts = {}) internal_get(LIST, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 |
# File 'lib/ovirtsdk4/services.rb', line 4300 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 |