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.
3682 3683 3684 |
# File 'lib/ovirtsdk4/services.rb', line 3682 def add(balance, opts = {}) internal_add(balance, Balance, ADD, opts) end |
#balance_service(id) ⇒ BalanceService
Locates the balance
service.
3730 3731 3732 |
# File 'lib/ovirtsdk4/services.rb', line 3730 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.
3719 3720 3721 |
# File 'lib/ovirtsdk4/services.rb', line 3719 def list(opts = {}) internal_get(LIST, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 |
# File 'lib/ovirtsdk4/services.rb', line 3741 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 |