Module: ForemanFogProxmox::ProxmoxOperatingSystems
- Included in:
- Proxmox
- Defined in:
- app/models/foreman_fog_proxmox/proxmox_operating_systems.rb
Instance Method Summary collapse
- #available_linux_operating_systems ⇒ Object
- #available_operating_systems ⇒ Object
- #available_windows_operating_systems ⇒ Object
- #compute_os_types(host) ⇒ Object
- #os_linux_types_mapping(host) ⇒ Object
- #os_windows_types_mapping(host) ⇒ Object
Instance Method Details
#available_linux_operating_systems ⇒ Object
33 34 35 |
# File 'app/models/foreman_fog_proxmox/proxmox_operating_systems.rb', line 33 def ['l24', 'l26', 'debian', 'ubuntu', 'centos', 'fedora', 'opensuse', 'archlinux', 'gentoo', 'alpine'] end |
#available_operating_systems ⇒ Object
26 27 28 29 30 31 |
# File 'app/models/foreman_fog_proxmox/proxmox_operating_systems.rb', line 26 def = ['other', 'solaris'] += += end |
#available_windows_operating_systems ⇒ Object
37 38 39 |
# File 'app/models/foreman_fog_proxmox/proxmox_operating_systems.rb', line 37 def ['wxp', 'w2k', 'w2k3', 'w2k8', 'wvista', 'win7', 'win8', 'win10'] end |
#compute_os_types(host) ⇒ Object
22 23 24 |
# File 'app/models/foreman_fog_proxmox/proxmox_operating_systems.rb', line 22 def compute_os_types(host) os_linux_types_mapping(host).empty? ? os_windows_types_mapping(host) : os_linux_types_mapping(host) end |
#os_linux_types_mapping(host) ⇒ Object
41 42 43 44 45 46 47 48 |
# File 'app/models/foreman_fog_proxmox/proxmox_operating_systems.rb', line 41 def os_linux_types_mapping(host) if ['Debian', 'Redhat', 'Suse', 'Altlinux', 'Archlinux', 'Coreos', 'Rancheros', 'Gentoo'].include?(host..type) else [] end end |
#os_windows_types_mapping(host) ⇒ Object
50 51 52 |
# File 'app/models/foreman_fog_proxmox/proxmox_operating_systems.rb', line 50 def os_windows_types_mapping(host) ['Windows'].include?(host..type) ? : [] end |