Class: OvirtSDK4::DiskProfilesService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary collapse
-
#add(profile, opts = {}) ⇒ DiskProfile
Add a new disk profile to the system.
-
#disk_profile_service(id) ⇒ DiskProfileService
Locates the
disk_profileservice. -
#list(opts = {}) ⇒ Array<DiskProfile>
Returns the list of disk profiles of the system.
-
#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 to the system.
7460 7461 7462 |
# File 'lib/ovirtsdk4/services.rb', line 7460 def add(profile, opts = {}) internal_add(profile, DiskProfile, ADD, opts) end |
#disk_profile_service(id) ⇒ DiskProfileService
Locates the disk_profile service.
7505 7506 7507 |
# File 'lib/ovirtsdk4/services.rb', line 7505 def disk_profile_service(id) DiskProfileService.new(self, id) end |
#list(opts = {}) ⇒ Array<DiskProfile>
Returns the list of disk profiles of the system.
The order of the returned list of disk profiles isn’t guaranteed.
7494 7495 7496 |
# File 'lib/ovirtsdk4/services.rb', line 7494 def list(opts = {}) internal_get(LIST, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
7516 7517 7518 7519 7520 7521 7522 7523 7524 7525 |
# File 'lib/ovirtsdk4/services.rb', line 7516 def service(path) if path.nil? || path == '' return self end index = path.index('/') if index.nil? return disk_profile_service(path) end return disk_profile_service(path[0..(index - 1)]).service(path[(index + 1)..-1]) end |