Class: OvirtSDK4::CpuProfilesService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary collapse
-
#add(profile, opts = {}) ⇒ CpuProfile
Add a new cpu profile to the system.
-
#list(opts = {}) ⇒ Array<CpuProfile>
Returns the list of CPU profiles of the system.
-
#profile_service(id) ⇒ CpuProfileService
Locates the
profile
service. -
#service(path) ⇒ Service
Locates the service corresponding to the given path.
Methods inherited from Service
Instance Method Details
#add(profile, opts = {}) ⇒ CpuProfile
Add a new cpu profile to the system.
5516 5517 5518 |
# File 'lib/ovirtsdk4/services.rb', line 5516 def add(profile, opts = {}) internal_add(profile, CpuProfile, ADD, opts) end |
#list(opts = {}) ⇒ Array<CpuProfile>
Returns the list of CPU profiles of the system.
The order of the returned list of CPU profiles isn’t guranteed.
5550 5551 5552 |
# File 'lib/ovirtsdk4/services.rb', line 5550 def list(opts = {}) internal_get(LIST, opts) end |
#profile_service(id) ⇒ CpuProfileService
Locates the profile
service.
5561 5562 5563 |
# File 'lib/ovirtsdk4/services.rb', line 5561 def profile_service(id) CpuProfileService.new(self, id) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 |
# File 'lib/ovirtsdk4/services.rb', line 5572 def service(path) if path.nil? || path == '' return self end index = path.index('/') if index.nil? return profile_service(path) end return profile_service(path[0..(index - 1)]).service(path[(index +1)..-1]) end |