napalm-automation / napalm-ios

Apache License 2.0
32 stars 40 forks source link

Fix issue #179 : Regex to find the network interface #180

Closed nicolaskarp closed 6 years ago

nicolaskarp commented 6 years ago

Fix issue #179.

Interface pseudowire was not matched :

pseudowire100006 is up
    MTU 1500 bytes, BW 10000000 Kbit
    Encapsulation mpls
    Peer IP x.x.x.x, VC ID xx
    RX
      34216908 packets 6774108588 bytes 0 drops
    TX
      79234824 packets 23633885654 bytes 0 drops

Nick

ktbyers commented 6 years ago

@nicolaskarp This change breaks the unit tests...so will need to be correct.

test/unit/test_getters.py::TestGetter::test_get_interfaces[normal] 
<- .tox/py27/lib/python2.7/site-packages/napalm_base/test/getters.py 
Resulting JSON object was: {"GigabitEthernet3": {"speed": 1000, "mac_address": 
"08:00:27:82:51:6B", "is_up": false, "last_flapped": -1.0, "description": "", "is_enabled": true}, 
"GigabitEthernet2": {"speed": 1000, "mac_address": "08:00:27:79:E8:96", "is_up": true, 
"last_flapped": -1.0, "description": "blah bleh", "is_enabled": true}, 
"GigabitEthernet1": {"speed": 1000, "mac_address": "08:00:27:F8:E8:42", "is_up": true, 
"last_flapped": -1.0, "description": "", "is_enabled": true}}
FAILED

Also linter failure will need fixed.

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-0.02%) to 70.723% when pulling 06c0116c0e1de5acea912baba2b415d303c0aec1 on nicolaskarp:develop into 83673534da1dcd89a13ae06d956bb40c63505b11 on napalm-automation:develop.

nicolaskarp commented 6 years ago

@ktbyers I think I resolved the issue with the interface status.

Can you please review ?

Thank you.

Nick

ktbyers commented 6 years ago

Yes, let me review...I see the unit tests are passing now.

ktbyers commented 6 years ago

Closing as should be fixed by other referenced PR.