napalm-automation / napalm-ios

Apache License 2.0
31 stars 40 forks source link

get_mac_table issue #158

Closed itdependsnetworks closed 7 years ago

itdependsnetworks commented 7 years ago

Description of Issue/Question

When there is multiple mac addresses to a given mac, it can by multi-lined, which seems to trip up the parser.

Did you follow the steps from https://github.com/napalm-automation/napalm#faq

Just leaving a placeholder to get back to this issue.

Setup

napalm-ios version

(Paste verbatim output from pip freeze | grep napalm-ios between quotes below)

IOS version

(Paste verbatim output from show version between quotes below)

Steps to Reproduce the Issue

Error Traceback

(Paste the complete traceback of the exception between quotes below)

Sample Data:

Legend: * - primary entry
        age - seconds since last seen
        n/a - not available

  vlan   mac address     type    learn     age              ports
------+----------------+--------+-----+----------+--------------------------
   197  b4ff.1785.088f    static  Yes          -   Gi1/46
   118  60ff.69f5.0cf3    static  Yes          -   Gi4/17
   197  10ff.ae63.9eee    static  Yes          -   Gi6/38
   197  d4ff.56b2.9567    static  Yes          -   Gi4/13
*   19  00ff.9ab4.03ad   dynamic  Yes         25   Te7/1
   118  3cff.0eda.d3e0    static  Yes          -   Gi2/15
   197  c0ff.bc1f.70df    static  Yes          -   Gi4/5
   197  b4ff.1785.94d3    static  Yes          -   Gi4/33
*  118  e0ff.b91c.a405   dynamic  Yes          5   Gi3/37
*   19  00ff.9ab0.0f0d   dynamic  Yes         15   Te7/1
*  197  00ff.04c1.0800   dynamic  Yes          0   Te7/1
   118  54ff.7584.7402    static  Yes          -   Gi9/9
   197  c0ff.bc1f.72f2    static  Yes          -   Gi4/28
   197  10ff.ae63.7a9e    static  Yes          -   Gi1/14
   197  d4ff.56b2.9527    static  Yes          -   Gi2/1
*  100  1cff.0fc9.1180    static  No           -   Router
*  ---  00ff.0000.0000    static  No           -   Router
   118  50ff.9dcc.182b    static  Yes          -   Gi2/16
   118  50ff.9dcc.1667    static  Yes          -   Gi3/29
   197  10ff.ae63.9ffe    static  Yes          -   Gi4/18
*  197  3333.0000.00ff    static  Yes          -   Gi1/1,Gi1/2,Gi1/3,Gi1/4
                                                   Gi1/6,Gi1/7,Gi1/8,Gi1/9
                                                   Gi1/10,Gi1/11,Gi1/12,Gi1/13
                                                   Gi1/14,Gi1/15,Gi1/16,Gi1/18
                                                   Gi1/19,Gi1/20,Gi1/22,Gi1/24
                                                   Gi1/25,Gi1/26,Gi1/27,Gi1/29
                                                   Gi1/30,Gi1/31,Gi1/33,Gi1/34
                                                   Gi1/35,Gi1/38,Gi1/39,Gi1/41
                                                   Gi1/43,Gi1/44,Gi1/46,Gi1/47
                                                   Gi1/48,Gi2/1,Gi2/3,Gi2/4
                                                   Gi2/5,Gi2/6,Gi2/7,Gi2/9
                                                   Gi2/11,Gi2/12,Gi2/13,Gi2/14
                                                   Gi2/15,Gi2/16,Gi2/20,Gi2/22
                                                   Gi2/24,Gi2/25,Gi2/26,Gi2/28
                                                   Gi2/29,Gi2/30,Gi2/31,Gi2/32
                                                   Gi2/33,Gi2/35,Gi2/36,Gi2/41
                                                   Gi2/42,Gi2/43,Gi2/48,Gi3/2
                                                   Gi3/3,Gi3/6,Gi3/15,Gi3/16
                                                   Gi3/17,Gi3/18,Gi3/19,Gi3/21
                                                   Gi3/22,Gi3/23,Gi3/24,Gi3/26
                                                   Gi3/29,Gi3/34,Gi3/37,Gi3/38
                                                   Gi3/40,Gi3/41,Gi3/43,Gi3/44
                                                   Gi4/3,Gi4/4,Gi4/5,Gi4/6
                                                   Gi4/7,Gi4/8,Gi4/9,Gi4/10
                                                   Gi4/11,Gi4/12,Gi4/13,Gi4/14
                                                   Gi4/15,Gi4/16,Gi4/17,Gi4/18
                                                   Gi4/19,Gi4/20,Gi4/21,Gi4/22
                                                   Gi4/23,Gi4/26,Gi4/27,Gi4/28
                                                   Gi4/29,Gi4/31,Gi4/33,Gi4/35
                                                   Gi4/36,Gi4/37,Gi4/39,Gi4/40
                                                   Gi4/41,Gi4/42,Gi4/43,Gi4/45
                                                   Gi4/46,Gi4/47,Gi5/2,Gi5/3
                                                   Gi5/4,Gi5/5,Gi5/6,Gi5/7
                                                   Gi5/8,Gi5/9,Gi5/10,Gi5/12
                                                   Gi5/14,Gi5/15,Gi5/17,Gi5/18
                                                   Gi5/19,Gi5/21,Gi5/22,Gi5/26
                                                   Gi5/29,Gi5/31,Gi5/32,Gi5/33
                                                   Gi5/35,Gi5/36,Gi5/37,Gi5/39
                                                   Gi5/40,Gi5/41,Gi5/42,Gi5/46
                                                   Gi5/47,Gi6/1,Gi6/2,Gi6/3
                                                   Gi6/4,Gi6/5,Gi6/6,Gi6/7
                                                   Gi6/8,Gi6/9,Gi6/10,Gi6/11
                                                   Gi6/12,Gi6/13,Gi6/14,Gi6/15
                                                   Gi6/16,Gi6/17,Gi6/19,Gi6/20
                                                   Gi6/22,Gi6/23,Gi6/24,Gi6/27
                                                   Gi6/28,Gi6/29,Gi6/30,Gi6/31
                                                   Gi6/32,Gi6/33,Gi6/34,Gi6/35
                                                   Gi6/36,Gi6/37,Gi6/38,Gi6/40
                                                   Gi6/41,Gi6/42,Gi6/43,Gi6/44
                                                   Gi6/45,Gi6/47,Te7/1,Te8/2
                                                   Gi9/1,Gi9/3,Gi9/4,Gi9/5
                                                   Gi9/6,Gi9/9,Gi9/11,Gi9/15
                                                   Gi9/31,Gi9/33,Gi9/34,Gi9/36
                                                   Gi9/37,Gi9/39,Gi9/41,Gi9/43
                                                   Gi10/41,Gi10/42,Gi10/43
                                                   Gi10/44,Gi10/45,Gi10/46
                                                   Gi10/48,Router,Switch,Stby-Switch
   197  c0ff.bc1f.71b7    static  Yes          -   Gi5/8
   118  3cff.0ed0.0f7b    static  Yes          -   Gi4/16
   197  24ff.213d.50c8    static  Yes          -   Gi6/15
   118  c8ff.7679.562d    static  Yes          -   Gi2/26
mirceaulinic commented 7 years ago

Thanks for submitting this @itdependsnetworks. As you have already the environment to test this, would you be able to submit a fix?

itdependsnetworks commented 7 years ago

Yes, I'll try and submit a PR for this and the issue 148.

ktbyers commented 7 years ago

@itdependsnetworks What is the model, IOS version that this is from?