Class: OvirtSDK4::StorageDomainDisksService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary collapse
-
#add(disk, opts = {}) ⇒ Disk
Adds or registers a disk.
-
#disk_service(id) ⇒ StorageDomainDiskService
A reference to the service that manages a specific disk.
-
#list(opts = {}) ⇒ Array<Disk>
Retrieves the list of disks that are available in the storage domain.
-
#service(path) ⇒ Service
Locates the service corresponding to the given path.
Methods inherited from Service
Instance Method Details
#add(disk, opts = {}) ⇒ Disk
Adds or registers a disk.
Important
|
Since version 4.2 of the engine-name this operation is deprecated, and preserved only for backwards compatibility. It will be removed in the future. To add a new disk use the add operation of the service that manages the disks of the system. To register an unregistered disk use the register operation of the service that manages that disk. |
23283 23284 23285 |
# File 'lib/ovirtsdk4/services.rb', line 23283 def add(disk, opts = {}) internal_add(disk, Disk, ADD, opts) end |
#disk_service(id) ⇒ StorageDomainDiskService
A reference to the service that manages a specific disk.
23340 23341 23342 |
# File 'lib/ovirtsdk4/services.rb', line 23340 def disk_service(id) StorageDomainDiskService.new(self, id) end |
#list(opts = {}) ⇒ Array<Disk>
Retrieves the list of disks that are available in the storage domain.
The order of the returned list of disks is not guaranteed.
23329 23330 23331 |
# File 'lib/ovirtsdk4/services.rb', line 23329 def list(opts = {}) internal_get(LIST, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
23351 23352 23353 23354 23355 23356 23357 23358 23359 23360 |
# File 'lib/ovirtsdk4/services.rb', line 23351 def service(path) if path.nil? || path == '' return self end index = path.index('/') if index.nil? return disk_service(path) end return disk_service(path[0..(index - 1)]).service(path[(index + 1)..-1]) end |