Class: OvirtSDK4::SchedulingPolicyService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary collapse
-
#balances_service ⇒ BalancesService
Locates the
balancesservice. -
#filters_service ⇒ FiltersService
Locates the
filtersservice. -
#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
weightsservice.
Methods inherited from Service
Instance Method Details
#balances_service ⇒ BalancesService
Locates the balances service.
19220 19221 19222 |
# File 'lib/ovirtsdk4/services.rb', line 19220 def balances_service @balances_service ||= BalancesService.new(self, 'balances') end |
#filters_service ⇒ FiltersService
Locates the filters service.
19229 19230 19231 |
# File 'lib/ovirtsdk4/services.rb', line 19229 def filters_service @filters_service ||= FiltersService.new(self, 'filters') end |
#get(opts = {}) ⇒ SchedulingPolicy
Returns the representation of the object managed by this service.
19157 19158 19159 |
# File 'lib/ovirtsdk4/services.rb', line 19157 def get(opts = {}) internal_get(GET, opts) end |
#remove(opts = {}) ⇒ Object
Deletes the object managed by this service.
19182 19183 19184 |
# File 'lib/ovirtsdk4/services.rb', line 19182 def remove(opts = {}) internal_remove(REMOVE, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
19249 19250 19251 19252 19253 19254 19255 19256 19257 19258 19259 19260 19261 19262 19263 19264 19265 19266 19267 19268 19269 19270 19271 19272 |
# File 'lib/ovirtsdk4/services.rb', line 19249 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.
19211 19212 19213 |
# File 'lib/ovirtsdk4/services.rb', line 19211 def update(policy, opts = {}) internal_update(policy, SchedulingPolicy, UPDATE, opts) end |
#weights_service ⇒ WeightsService
Locates the weights service.
19238 19239 19240 |
# File 'lib/ovirtsdk4/services.rb', line 19238 def weights_service @weights_service ||= WeightsService.new(self, 'weights') end |