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.
2774 2775 2776 |
# File 'lib/ovirtsdk4/services.rb', line 2774 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.
2808 2809 2810 |
# File 'lib/ovirtsdk4/services.rb', line 2808 def list(opts = {}) internal_get(LIST, opts) end |
#profile_service(id) ⇒ AssignedDiskProfileService
Locates the profile
service.
2819 2820 2821 |
# File 'lib/ovirtsdk4/services.rb', line 2819 def profile_service(id) AssignedDiskProfileService.new(self, id) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 |
# File 'lib/ovirtsdk4/services.rb', line 2830 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 |