Module: ProxmoxComputeControllersHelper

Defined in:
app/helpers/proxmox_compute_controllers_helper.rb

Overview

You should have received a copy of the GNU General Public License along with ForemanFogProxmox. If not, see http://www.gnu.org/licenses/.

Constant Summary collapse

CONTROLLER_LIMITS =
{ 'ide' => 3, 'sata' => 5, 'scsi' => 30, 'virtio' => 15 }.freeze

Instance Method Summary collapse

Instance Method Details

#proxmox_controllers_cloudinit_mapObject



28
29
30
31
32
# File 'app/helpers/proxmox_compute_controllers_helper.rb', line 28

def proxmox_controllers_cloudinit_map
  [ForemanFogProxmox::OptionsSelect.new(id: 'ide', name: 'IDE', range: CONTROLLER_LIMITS['ide']),
   ForemanFogProxmox::OptionsSelect.new(id: 'sata', name: 'SATA', range: CONTROLLER_LIMITS['sata']),
   ForemanFogProxmox::OptionsSelect.new(id: 'scsi', name: 'SCSI', range: CONTROLLER_LIMITS['scsi'])]
end

#proxmox_controllers_mapObject



23
24
25
26
# File 'app/helpers/proxmox_compute_controllers_helper.rb', line 23

def proxmox_controllers_map
  proxmox_controllers_cloudinit_map << ForemanFogProxmox::OptionsSelect.new(name: 'VirtIO Block', id: 'virtio',
    range: CONTROLLER_LIMITS['virtio'])
end

#proxmox_scsi_controllers_mapObject



34
35
36
37
38
39
40
41
# File 'app/helpers/proxmox_compute_controllers_helper.rb', line 34

def proxmox_scsi_controllers_map
  [OpenStruct.new(id: 'lsi', name: 'LSI 53C895A (Default)'),
   OpenStruct.new(id: 'lsi53c810', name: 'LSI 53C810'),
   OpenStruct.new(id: 'virtio-scsi-pci', name: 'VirtIO SCSI'),
   OpenStruct.new(id: 'virtio-scsi-single', name: 'VirtIO SCSI Single'),
   OpenStruct.new(id: 'megasas', name: 'MegaRAID SAS 8708EM2'),
   OpenStruct.new(id: 'pvscsi', name: 'VMware PVSCSI')]
end