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.
2044 2045 2046 |
# File 'lib/ovirtsdk4/services.rb', line 2044 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.
2078 2079 2080 |
# File 'lib/ovirtsdk4/services.rb', line 2078 def list(opts = {}) internal_get(LIST, opts) end |
#profile_service(id) ⇒ AssignedCpuProfileService
Locates the profile
service.
2089 2090 2091 |
# File 'lib/ovirtsdk4/services.rb', line 2089 def profile_service(id) AssignedCpuProfileService.new(self, id) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 |
# File 'lib/ovirtsdk4/services.rb', line 2100 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 |