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_profile
service. -
#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.
7550 7551 7552 |
# File 'lib/ovirtsdk4/services.rb', line 7550 def add(profile, opts = {}) internal_add(profile, DiskProfile, ADD, opts) end |
#disk_profile_service(id) ⇒ DiskProfileService
Locates the disk_profile
service.
7595 7596 7597 |
# File 'lib/ovirtsdk4/services.rb', line 7595 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.
7584 7585 7586 |
# File 'lib/ovirtsdk4/services.rb', line 7584 def list(opts = {}) internal_get(LIST, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
7606 7607 7608 7609 7610 7611 7612 7613 7614 7615 |
# File 'lib/ovirtsdk4/services.rb', line 7606 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 |