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.
7510 7511 7512 |
# File 'lib/ovirtsdk4/services.rb', line 7510 def add(profile, opts = {}) internal_add(profile, DiskProfile, ADD, opts) end |
#disk_profile_service(id) ⇒ DiskProfileService
Locates the disk_profile
service.
7555 7556 7557 |
# File 'lib/ovirtsdk4/services.rb', line 7555 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.
7544 7545 7546 |
# File 'lib/ovirtsdk4/services.rb', line 7544 def list(opts = {}) internal_get(LIST, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
7566 7567 7568 7569 7570 7571 7572 7573 7574 7575 |
# File 'lib/ovirtsdk4/services.rb', line 7566 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 |