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.
2210 2211 2212 |
# File 'lib/ovirtsdk4/services.rb', line 2210 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.
2244 2245 2246 |
# File 'lib/ovirtsdk4/services.rb', line 2244 def list(opts = {}) internal_get(LIST, opts) end |
#profile_service(id) ⇒ AssignedDiskProfileService
Locates the profile
service.
2255 2256 2257 |
# File 'lib/ovirtsdk4/services.rb', line 2255 def profile_service(id) AssignedDiskProfileService.new(self, id) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 |
# File 'lib/ovirtsdk4/services.rb', line 2266 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 |