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.
6785 6786 6787 |
# File 'lib/ovirtsdk4/services.rb', line 6785 def add(profile, opts = {}) internal_add(profile, DiskProfile, ADD, opts) end |
#disk_profile_service(id) ⇒ DiskProfileService
Locates the disk_profile
service.
6830 6831 6832 |
# File 'lib/ovirtsdk4/services.rb', line 6830 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.
6819 6820 6821 |
# File 'lib/ovirtsdk4/services.rb', line 6819 def list(opts = {}) internal_get(LIST, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
6841 6842 6843 6844 6845 6846 6847 6848 6849 6850 |
# File 'lib/ovirtsdk4/services.rb', line 6841 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 |