Class: Fog::Proxmox::Compute::Disks

Inherits:
Collection
  • Object
show all
Defined in:
lib/fog/proxmox/compute/models/disks.rb

Overview

class Disks Collection of disk

Instance Method Summary collapse

Instance Method Details

#allObject



29
30
31
# File 'lib/fog/proxmox/compute/models/disks.rb', line 29

def all
  self
end

#cdromObject



41
42
43
# File 'lib/fog/proxmox/compute/models/disks.rb', line 41

def cdrom
  find(&:cdrom?)
end

#cloudinitObject



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

#rootfsObject



45
46
47
# File 'lib/fog/proxmox/compute/models/disks.rb', line 45

def rootfs
  find(&:rootfs?)
end