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
profileservice. -
#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.
6166 6167 6168 |
# File 'lib/ovirtsdk4/services.rb', line 6166 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 is random.
6200 6201 6202 |
# File 'lib/ovirtsdk4/services.rb', line 6200 def list(opts = {}) internal_get(LIST, opts) end |
#profile_service(id) ⇒ CpuProfileService
Locates the profile service.
6211 6212 6213 |
# File 'lib/ovirtsdk4/services.rb', line 6211 def profile_service(id) CpuProfileService.new(self, id) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 |
# File 'lib/ovirtsdk4/services.rb', line 6222 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 |