Method: VirtualBox::Vm::Board.os_types

Defined in:
lib/virtual_box/vm/board.rb

.os_typesHash<Symbol|String, String|Symbol>

The OS types supported by the VirtualBox installation.

Returns:

  • (Hash<Symbol|String, String|Symbol>)

    mapping from programmer-friendly symbols (e.g. :linux26) to proper VirtualBox OS IDs, and from VirtualBox IDs and description strings to programmer-friendly symbols



256
257
258
259
260
261
262
263
264
265
266
267
268
# File 'lib/virtual_box/vm/board.rb', line 256

def self.os_types
  return @os_types if @os_types
  
  @os_types = {}
  list_os_types.each do |key, value|
    os_id = key.downcase.to_sym
    @os_types[key] = os_id
    @os_types[key.downcase] = os_id
    @os_types[value] = os_id
    @os_types[os_id] = key
  end
  @os_types
end