def is_ostype_token?(token, bhg_version)
      BeakerHostGenerator::Data.get_platforms(bhg_version).each do |platform|
        ostype = platform.split('-')[0]
        if ostype == token
          return true
        end
      end
      return false
    end
def is_ostype_token?(token, bhg_version)
      BeakerHostGenerator::Data.get_platforms(bhg_version).each do |platform|
        ostype = platform.split('-')[0]
        if ostype == token
          return true
        end
      end
      return false
    end
Tests if a string token represents an OS platform (i.e. "centos6" or
 "debian8") and not another part of the host specification like the
 architecture bit (i.e. "32" or "64").

 This is used when parsing the host generator input string to determine
 if we're introducing a host for a new platform or if we're adding another
 host for a current platform.

 @param [String] token A piece of the host generator input that might refer
                 to an OS platform. For example `"centos6"` or `"debian8"`.

 @param [Integer] bhg_version The version of OS info to use when testing
                  for whether the token represent an OS platform.