Class: Fog::Proxmox::Compute::Disks
- Inherits:
-
Collection
- Object
- Collection
- Fog::Proxmox::Compute::Disks
- Defined in:
- lib/fog/proxmox/compute/models/disks.rb
Overview
class Disks Collection of disk
Instance Method Summary collapse
- #all ⇒ Object
- #cdrom ⇒ Object
- #cloudinit ⇒ Object
- #get(id) ⇒ Object
- #next_device(controller) ⇒ Object
- #rootfs ⇒ Object
Instance Method Details
#all ⇒ Object
29 30 31 |
# File 'lib/fog/proxmox/compute/models/disks.rb', line 29 def all self end |
#cdrom ⇒ Object
41 42 43 |
# File 'lib/fog/proxmox/compute/models/disks.rb', line 41 def cdrom find(&:cdrom?) end |
#cloudinit ⇒ Object
49 50 51 |
# File 'lib/fog/proxmox/compute/models/disks.rb', line 49 def cloudinit find(&:cloud_init?) end |
#get(id) ⇒ Object
33 34 35 |
# File 'lib/fog/proxmox/compute/models/disks.rb', line 33 def get(id) all.find { |disk| disk.identity == id } end |
#next_device(controller) ⇒ Object
37 38 39 |
# File 'lib/fog/proxmox/compute/models/disks.rb', line 37 def next_device(controller) Fog::Proxmox::ControllerHelper.last_index(controller, self) + 1 end |
#rootfs ⇒ Object
45 46 47 |
# File 'lib/fog/proxmox/compute/models/disks.rb', line 45 def rootfs find(&:rootfs?) end |