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.
2792 2793 2794 |
# File 'lib/ovirtsdk4/services.rb', line 2792 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.
2826 2827 2828 |
# File 'lib/ovirtsdk4/services.rb', line 2826 def list(opts = {}) internal_get(LIST, opts) end |
#profile_service(id) ⇒ AssignedDiskProfileService
Locates the profile
service.
2837 2838 2839 |
# File 'lib/ovirtsdk4/services.rb', line 2837 def profile_service(id) AssignedDiskProfileService.new(self, id) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 |
# File 'lib/ovirtsdk4/services.rb', line 2848 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 |