Class: Fog::Proxmox::Compute::Disk
- Inherits:
-
Model
- Object
- Model
- Fog::Proxmox::Compute::Disk
- Defined in:
- lib/fog/compute/proxmox/models/disk.rb
Overview
class Disk model
Instance Method Summary collapse
- #cdrom? ⇒ Boolean
- #controller ⇒ Object
- #controller? ⇒ Boolean
- #device ⇒ Object
- #flatten ⇒ Object
- #mount_point? ⇒ Boolean
- #rootfs? ⇒ Boolean
- #to_s ⇒ Object
Instance Method Details
#cdrom? ⇒ Boolean
50 51 52 |
# File 'lib/fog/compute/proxmox/models/disk.rb', line 50 def cdrom? id == 'ide2' && media == 'cdrom' end |
#controller ⇒ Object
42 43 44 |
# File 'lib/fog/compute/proxmox/models/disk.rb', line 42 def controller Fog::Proxmox::DiskHelper.extract_controller(id) end |
#controller? ⇒ Boolean
62 63 64 |
# File 'lib/fog/compute/proxmox/models/disk.rb', line 62 def controller? id.match(/(scsi|ide|sata|virtio)(\d+)/) end |
#device ⇒ Object
46 47 48 |
# File 'lib/fog/compute/proxmox/models/disk.rb', line 46 def device Fog::Proxmox::DiskHelper.extract_device(id) end |
#flatten ⇒ Object
66 67 68 |
# File 'lib/fog/compute/proxmox/models/disk.rb', line 66 def flatten Fog::Proxmox::DiskHelper.flatten(attributes) end |
#mount_point? ⇒ Boolean
58 59 60 |
# File 'lib/fog/compute/proxmox/models/disk.rb', line 58 def mount_point? id.match(/(mp)(\d+)/) end |
#rootfs? ⇒ Boolean
54 55 56 |
# File 'lib/fog/compute/proxmox/models/disk.rb', line 54 def rootfs? id == 'rootfs' end |