napalm-automation-community / napalm-s350

NAPALM driver for Cisco SMB switches (SF3xx, SF5xx, SG3xx, SG5xx).
Apache License 2.0
16 stars 13 forks source link

wrong model parsing #41

Closed qaxi closed 3 years ago

qaxi commented 3 years ago

we are curently returning marketing name of device : "SG350X-48P 48-Port Gigabit PoE Stackable Managed Switch" instead of model: "SG350X-48P-K9"

If I look at napalm IOS tests https://github.com/napalm-automation/napalm/blob/develop/test/ios/mocked_data/test_get_facts/normal/expected_result.json then model should be PID from Inventory ...

afected part of code is here napalm-s350/s350.py def get_facts() ... elif line.startswith('System Description:'): _, model = line.split('System Description:') model = model.strip() continue ....