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.
19167 19168 19169 |
# File 'lib/ovirtsdk4/services.rb', line 19167 def balances_service @balances_service ||= BalancesService.new(self, 'balances') end |
#filters_service ⇒ FiltersService
Locates the filters
service.
19176 19177 19178 |
# File 'lib/ovirtsdk4/services.rb', line 19176 def filters_service @filters_service ||= FiltersService.new(self, 'filters') end |
#get(opts = {}) ⇒ SchedulingPolicy
Returns the representation of the object managed by this service.
19104 19105 19106 |
# File 'lib/ovirtsdk4/services.rb', line 19104 def get(opts = {}) internal_get(GET, opts) end |
#remove(opts = {}) ⇒ Object
Deletes the object managed by this service.
19129 19130 19131 |
# File 'lib/ovirtsdk4/services.rb', line 19129 def remove(opts = {}) internal_remove(REMOVE, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
19196 19197 19198 19199 19200 19201 19202 19203 19204 19205 19206 19207 19208 19209 19210 19211 19212 19213 19214 19215 19216 19217 19218 19219 |
# File 'lib/ovirtsdk4/services.rb', line 19196 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.
19158 19159 19160 |
# File 'lib/ovirtsdk4/services.rb', line 19158 def update(policy, opts = {}) internal_update(policy, SchedulingPolicy, UPDATE, opts) end |
#weights_service ⇒ WeightsService
Locates the weights
service.
19185 19186 19187 |
# File 'lib/ovirtsdk4/services.rb', line 19185 def weights_service @weights_service ||= WeightsService.new(self, 'weights') end |