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
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 for the cluster.
2626 2627 2628 |
# File 'lib/ovirtsdk4/services.rb', line 2626 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.
2660 2661 2662 |
# File 'lib/ovirtsdk4/services.rb', line 2660 def list(opts = {}) internal_get(LIST, opts) end |
#profile_service(id) ⇒ AssignedCpuProfileService
Locates the profile
service.
2671 2672 2673 |
# File 'lib/ovirtsdk4/services.rb', line 2671 def profile_service(id) AssignedCpuProfileService.new(self, id) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 |
# File 'lib/ovirtsdk4/services.rb', line 2682 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 |