Class: OvirtSDK4::SchedulingPolicyService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary collapse
-
#balances_service ⇒ BalancesService
Locates the
balances
service. -
#filters_service ⇒ FiltersService
Locates the
filters
service. -
#get(opts = {}) ⇒ SchedulingPolicy
Returns the representation of the object managed by this service.
-
#remove(opts = {}) ⇒ Object
Deletes the object managed by this service.
-
#service(path) ⇒ Service
Locates the service corresponding to the given path.
-
#update(policy, opts = {}) ⇒ SchedulingPolicy
Update the specified user defined scheduling policy in the system.
-
#weights_service ⇒ WeightsService
Locates the
weights
service.
Methods inherited from Service
Instance Method Details
#balances_service ⇒ BalancesService
Locates the balances
service.
19298 19299 19300 |
# File 'lib/ovirtsdk4/services.rb', line 19298 def balances_service @balances_service ||= BalancesService.new(self, 'balances') end |
#filters_service ⇒ FiltersService
Locates the filters
service.
19307 19308 19309 |
# File 'lib/ovirtsdk4/services.rb', line 19307 def filters_service @filters_service ||= FiltersService.new(self, 'filters') end |
#get(opts = {}) ⇒ SchedulingPolicy
Returns the representation of the object managed by this service.
19235 19236 19237 |
# File 'lib/ovirtsdk4/services.rb', line 19235 def get(opts = {}) internal_get(GET, opts) end |
#remove(opts = {}) ⇒ Object
Deletes the object managed by this service.
19260 19261 19262 |
# File 'lib/ovirtsdk4/services.rb', line 19260 def remove(opts = {}) internal_remove(REMOVE, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
19327 19328 19329 19330 19331 19332 19333 19334 19335 19336 19337 19338 19339 19340 19341 19342 19343 19344 19345 19346 19347 19348 19349 19350 |
# File 'lib/ovirtsdk4/services.rb', line 19327 def service(path) if path.nil? || path == '' return self end if path == 'balances' return balances_service end if path.start_with?('balances/') return balances_service.service(path[9..-1]) end if path == 'filters' return filters_service end if path.start_with?('filters/') return filters_service.service(path[8..-1]) end if path == 'weights' return weights_service end if path.start_with?('weights/') return weights_service.service(path[8..-1]) end raise Error.new("The path \"#{path}\" doesn't correspond to any service") end |
#update(policy, opts = {}) ⇒ SchedulingPolicy
Update the specified user defined scheduling policy in the system.
19289 19290 19291 |
# File 'lib/ovirtsdk4/services.rb', line 19289 def update(policy, opts = {}) internal_update(policy, SchedulingPolicy, UPDATE, opts) end |
#weights_service ⇒ WeightsService
Locates the weights
service.
19316 19317 19318 |
# File 'lib/ovirtsdk4/services.rb', line 19316 def weights_service @weights_service ||= WeightsService.new(self, 'weights') end |