Class: OvirtSDK4::AssignedDiskProfilesService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary collapse
-
#add(profile, opts = {}) ⇒ DiskProfile
Add a new disk profile for the storage domain.
-
#list(opts = {}) ⇒ Array<DiskProfile>
Returns the list of disk profiles assigned to the storage domain.
-
#profile_service(id) ⇒ AssignedDiskProfileService
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 = {}) ⇒ DiskProfile
Add a new disk profile for the storage domain.
2213 2214 2215 |
# File 'lib/ovirtsdk4/services.rb', line 2213 def add(profile, opts = {}) internal_add(profile, DiskProfile, ADD, opts) end |
#list(opts = {}) ⇒ Array<DiskProfile>
Returns the list of disk profiles assigned to the storage domain.
The order of the returned disk profiles isn’t guaranteed.
2247 2248 2249 |
# File 'lib/ovirtsdk4/services.rb', line 2247 def list(opts = {}) internal_get(LIST, opts) end |
#profile_service(id) ⇒ AssignedDiskProfileService
Locates the profile
service.
2258 2259 2260 |
# File 'lib/ovirtsdk4/services.rb', line 2258 def profile_service(id) AssignedDiskProfileService.new(self, id) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 |
# File 'lib/ovirtsdk4/services.rb', line 2269 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 |