Sha256: 18a407e1852a91f2b85fe722725598f49365b8a891f8eeef9033f05232a21ea9

Contents?: true

Size: 1.26 KB

Versions: 3

Compression:

Stored size: 1.26 KB

Contents

module Corona
  class Model
    def self.map sysDescr, sysObjectID
      case sysDescr
      when /Cisco Catalyst Operating System/i
        'catos'
      when /Cisco Controller/
        'aireos'
      when /IOS XR/
        'iosxr'
      when /NX-OS/
        'nxos'
      when /cisco/i, /Application Control Engine/i
        'ios'
      when /JUNOS/
        'junos'
      when /^NetScreen/, /^SSG-\d+/
        'screenos'
      when /Arista Networks EOS/
        'eos'
      when /IronWare/
        'ironware'
      when /^Summit/
        'xos'
      when /TiMOS/
        'timos'
      when /^Alcatel-Lucent \S+ [789]\./  #aos <7 is vxworks, >=7 is linux
        'aos7'
      when /^AOS-W/
        'aosw'
      when /^Alcatel-Lucent/
        'aos'
      when /^AX Series/
        'acos'
      when /ProCurve/  # ProCurve OS does not seem to have name?
        'procurve'
      when /^\d+[A-Z]\sEthernet Switch$/
        'powerconnect'
      else
        case sysObjectID
        when Regexp.new('^' + Regexp.quote('1.3.6.1.4.1.12356.'))
          'fortios' # 1.3.6.1.4.1.12356.101.1.10004
        when Regexp.new('^' + Regexp.quote('1.3.6.1.4.1.6486.'))
          'aos'     # 1.3.6.1.4.1.6486.800.1.1.2.1.11.2.2
        else
          'unsupported'
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
corona-0.0.13 lib/corona/model.rb
corona-0.0.12 lib/corona/model.rb
corona-0.0.11 lib/corona/model.rb