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.
5513 5514 5515 |
# File 'lib/ovirtsdk4/services.rb', line 5513 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.
5547 5548 5549 |
# File 'lib/ovirtsdk4/services.rb', line 5547 def list(opts = {}) internal_get(LIST, opts) end |
#profile_service(id) ⇒ CpuProfileService
Locates the profile
service.
5558 5559 5560 |
# File 'lib/ovirtsdk4/services.rb', line 5558 def profile_service(id) CpuProfileService.new(self, id) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 |
# File 'lib/ovirtsdk4/services.rb', line 5569 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 |