Class: OvirtSDK4::AssignedCpuProfilesService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary collapse
-
#add(profile, opts = {}) ⇒ CpuProfile
Add a new cpu profile for the cluster.
-
#list(opts = {}) ⇒ Array<CpuProfile>
List the CPU profiles assigned to the cluster.
-
#profile_service(id) ⇒ AssignedCpuProfileService
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 for the cluster.
2618 2619 2620 |
# File 'lib/ovirtsdk4/services.rb', line 2618 def add(profile, opts = {}) internal_add(profile, CpuProfile, ADD, opts) end |
#list(opts = {}) ⇒ Array<CpuProfile>
List the CPU profiles assigned to the cluster.
The order of the returned CPU profiles isn’t guaranteed.
2652 2653 2654 |
# File 'lib/ovirtsdk4/services.rb', line 2652 def list(opts = {}) internal_get(LIST, opts) end |
#profile_service(id) ⇒ AssignedCpuProfileService
Locates the profile service.
2663 2664 2665 |
# File 'lib/ovirtsdk4/services.rb', line 2663 def profile_service(id) AssignedCpuProfileService.new(self, id) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 |
# File 'lib/ovirtsdk4/services.rb', line 2674 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 |