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.
6747 6748 6749 |
# File 'lib/ovirtsdk4/services.rb', line 6747 def add(profile, opts = {}) internal_add(profile, DiskProfile, ADD, opts) end |
#disk_profile_service(id) ⇒ DiskProfileService
Locates the disk_profile
service.
6792 6793 6794 |
# File 'lib/ovirtsdk4/services.rb', line 6792 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.
6781 6782 6783 |
# File 'lib/ovirtsdk4/services.rb', line 6781 def list(opts = {}) internal_get(LIST, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
6803 6804 6805 6806 6807 6808 6809 6810 6811 6812 |
# File 'lib/ovirtsdk4/services.rb', line 6803 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 |