napalm-automation-community/napalm-s350

get_config does not work - "% Unrecognized command"

Closed this issue · 3 comments

Environment

Python version ('python3 --version'): 3.8.5

  • Napalm version ('pip show napalm') : 3.2.0
  • Napalm-s350 version ('pip show napalm-s350': 0.3.0
  • Cisco SMB switch model (for example 'SG500-28-K9' or 'SG350X-48P-K9': SG350X-24P
  • Napalm diagnostic output ('napalm --vendor s350 --user USER --debug HOSTNAME':
    paste full output here
    '''
    2020-11-19 13:05:14,862 - napalm - DEBUG - Starting napalm's debugging tool
    2020-11-19 13:05:14,863 - napalm - DEBUG - Gathering napalm packages
    2020-11-19 13:05:14,863 - napalm - DEBUG - napalm-s350==0.3.0
    2020-11-19 13:05:14,863 - napalm - DEBUG - napalm==3.2.0
    2020-11-19 13:05:14,863 - napalm - DEBUG - get_network_driver - Calling with args: ('s350',), {}
    2020-11-19 13:05:14,865 - napalm - DEBUG - get_network_driver - Successful
    2020-11-19 13:05:14,865 - napalm - DEBUG - init - Calling with args: (<class 'napalm_s350.s350.S350Driver'>, '10.40.0.30', 'napalm'), {'password': '*******', 'timeout': 60, 'optional_args': {}}
    2020-11-19 13:05:14,866 - napalm - DEBUG - init - Successful
    2020-11-19 13:05:14,866 - napalm - DEBUG - pre_connection_tests - Calling with args: (<napalm_s350.s350.S350Driver object at 0x7f0c78965b50>,), {}
    2020-11-19 13:05:14,866 - napalm - DEBUG - open - Calling with args: (<napalm_s350.s350.S350Driver object at 0x7f0c78965b50>,), {}
    2020-11-19 13:05:21,148 - napalm - DEBUG - open - Successful
    2020-11-19 13:05:21,148 - napalm - DEBUG - connection_tests - Calling with args: (<napalm_s350.s350.S350Driver object at 0x7f0c78965b50>,), {}
    2020-11-19 13:05:21,148 - napalm - DEBUG - get_facts - Calling with args: (<napalm_s350.s350.S350Driver object at 0x7f0c78965b50>,), {}
    2020-11-19 13:05:29,543 - napalm - DEBUG - Gathered facts:
    {
    "fqdn": "XXX",
    "hostname": "XXX",
    "interface_list": [
    "gi1/0/1",
    "gi1/0/2",
    "gi1/0/3",
    "gi1/0/4",
    "gi1/0/5",
    "gi1/0/6",
    "gi1/0/7",
    "gi1/0/8",
    "gi1/0/9",
    "gi1/0/10",
    "gi1/0/11",
    "gi1/0/12",
    "gi1/0/13",
    "gi1/0/14",
    "gi1/0/15",
    "gi1/0/16",
    "gi1/0/17",
    "gi1/0/18",
    "gi1/0/19",
    "gi1/0/20",
    "gi1/0/21",
    "gi1/0/22",
    "gi1/0/23",
    "gi1/0/24",
    "te1/0/1",
    "te1/0/2",
    "te1/0/3",
    "te1/0/4",
    "Po1",
    "Po2",
    "Po3",
    "Po4",
    "Po5",
    "Po6",
    "Po7",
    "Po8"
    ],
    "model": "SG350X-24P-K9",
    "os_version": "2.5.5.47",
    "serial_number": "XXX",
    "uptime": 446460,
    "vendor": "Cisco"
    }
    {
    "fqdn": "XXX",
    "hostname": "XXX",
    "interface_list": [
    "gi1/0/1",
    "gi1/0/2",
    "gi1/0/3",
    "gi1/0/4",
    "gi1/0/5",
    "gi1/0/6",
    "gi1/0/7",
    "gi1/0/8",
    "gi1/0/9",
    "gi1/0/10",
    "gi1/0/11",
    "gi1/0/12",
    "gi1/0/13",
    "gi1/0/14",
    "gi1/0/15",
    "gi1/0/16",
    "gi1/0/17",
    "gi1/0/18",
    "gi1/0/19",
    "gi1/0/20",
    "gi1/0/21",
    "gi1/0/22",
    "gi1/0/23",
    "gi1/0/24",
    "te1/0/1",
    "te1/0/2",
    "te1/0/3",
    "te1/0/4",
    "Po1",
    "Po2",
    "Po3",
    "Po4",
    "Po5",
    "Po6",
    "Po7",
    "Po8"
    ],
    "model": "SG350X-24P-K9",
    "os_version": "2.5.5.47",
    "serial_number": "XXX",
    "uptime": 446460,
    "vendor": "Cisco"
    }
    2020-11-19 13:05:29,548 - napalm - DEBUG - get_facts - Successful
    2020-11-19 13:05:29,548 - napalm - DEBUG - close - Calling with args: (<napalm_s350.s350.S350Driver object at 0x7f0c78965b50>,), {}
    2020-11-19 13:05:33,754 - napalm - DEBUG - close - Successful
    2020-11-19 13:05:33,755 - napalm - DEBUG - post_connection_tests - Calling with args: (<napalm_s350.s350.S350Driver object at 0x7f0c78965b50>,), {}
    '''

Steps to Reproduce

  1. napalm --user napalm --vendor s350 --debug 10.40.0.30 call get_config

Expected Behavior

2020-11-19 13:09:44,003 - napalm - DEBUG - get_facts - Successful
2020-11-19 13:09:44,003 - napalm - DEBUG - method - Calling with args: (<napalm_s350.s350.S350Driver object at 0x7fc28d01da30>, 'get_config'), {}
2020-11-19 13:09:44,004 - napalm - DEBUG - get_config - Attempting to resolve method
2020-11-19 13:09:44,004 - napalm - DEBUG - get_config - Attempting to call method with kwargs: {}
2020-11-19 13:09:47,084 - napalm - DEBUG - get_config - Response
{
"startup": "% Unrecognized command",
"running": "% Unrecognized command",
"candidate": ""
}
2020-11-19 13:09:47,085 - napalm - DEBUG - method - Successful
2020-11-19 13:09:47,085 - napalm - DEBUG - close - Calling with args: (<napalm_s350.s350.S350Driver object at 0x7fc28d01da30>,), {}
2020-11-19 13:09:51,291 - napalm - DEBUG - close - Successful
2020-11-19 13:09:51,292 - napalm - DEBUG - post_connection_tests - Calling with args: (<napalm_s350.s350.S350Driver object at 0x7fc28d01da30>,), {}

qaxi commented

Hi,
can you login to the switch and try run those commands
terminal datadump
show startup-config
show running-config
show running-config detailed

Do you get your configuration?

If not, does your user have sufficient priviledges?

thanks for the hint!
at the sg350 series you can not modify the privilege modes e.g. adding possibility to run "show startup-config". on the calalyst switches you can...
so you must set the privilege level for the napalm user to 15 (admin rights...). not nice but i dont found an other way...

qaxi commented

I sopouse it solved the problem, am I right?