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.
5554 5555 5556 |
# File 'lib/ovirtsdk4/services.rb', line 5554 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.
5588 5589 5590 |
# File 'lib/ovirtsdk4/services.rb', line 5588 def list(opts = {}) internal_get(LIST, opts) end |
#profile_service(id) ⇒ CpuProfileService
Locates the profile
service.
5599 5600 5601 |
# File 'lib/ovirtsdk4/services.rb', line 5599 def profile_service(id) CpuProfileService.new(self, id) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 |
# File 'lib/ovirtsdk4/services.rb', line 5610 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 |