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
profileservice. -
#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.
2784 2785 2786 |
# File 'lib/ovirtsdk4/services.rb', line 2784 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.
2818 2819 2820 |
# File 'lib/ovirtsdk4/services.rb', line 2818 def list(opts = {}) internal_get(LIST, opts) end |
#profile_service(id) ⇒ AssignedDiskProfileService
Locates the profile service.
2829 2830 2831 |
# File 'lib/ovirtsdk4/services.rb', line 2829 def profile_service(id) AssignedDiskProfileService.new(self, id) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 |
# File 'lib/ovirtsdk4/services.rb', line 2840 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 |