• Kirk Webb's avatar
    Extend the horrible "non-modular" hack in the Cisco snmpit module. · 0981023d
    Kirk Webb authored
    First, a "bug fix": By coincidence the snmpit Cisco module was able to
    build up the mod/port-to-ifindex mapping on newer switches where
    interface descriptions include a submodule ID (e.g.
    "GigabitEthernet1/0/1" vs. "GigabitEthernet1/1"). However, it was
    actually just grabbing the submodule ID in place of the module ID.  This
    is OK (in some loose sense) for non-modular switches where everything is
    effectivley on the same module. Not good for IOS/NX-OS switches with
    actual modules and submodule identifiers. Things would not have worked
    for these.  As a fix that retains backward compatibility, the Cisco
    snmpit module now correctly extracts the module ID, but subtracts '1'
    from it.  This allows existing installations that have zero-based module
    numbering in their database for non-modular IOS/NX-OS switches with
    submodule IDs to continue to work as is.
    
    The above nonsense is not what I set out to do, however, and the commit
    just gets worse. I extended the hack for non-modular switches with a mix
    of gigabit and ten gigabit to bump any ten gigabit interface port's
    module ID to "1". The existing hack already did this for non-modular
    switches with a mix of fast Ethernet and gigabit.  Absolutely horrific.
    I need a shower.
    0981023d
snmpit_cisco.pm 74.8 KB