You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using get_mac_address_table() on several comware-switches running version 7.1.070. Since two days, I'm not able to pull the mac-addresses from a single switch called SW01_A-Sued due to the netmiko error Pattern not detected: '\\[SW01_A\\-Sued\\]' in output..
The error suggest to explicitly set the pattern, which I have no influence over, or increase the read_timeout which has no effect on error.
My code is the following:
driver = get_network_driver("h3c_comware")
driver = driver(ip, USERNAME, PASSWORD, timeout=10)
driver.open()
mac = []
try:
mac = driver.get_mac_address_table()
except Exception as e:
print(f"Problems access switch: {e}")
print(mac)
Because all switches are on the same firmware version I am a little clueless. I also already tried querying the command manually, but this either didn't work.
Is there anything I can adjust about my approach?
The text was updated successfully, but these errors were encountered:
Sorry for the late reply, but it may help others with the same problem.
The reason for this problem is that napalm is waiting for "[SW01_A-Sued]" to be echoed, but it does not wait after 10 seconds.
Therefore, the recommended approach is
Check the echo settings to see if the device echoes "[SW01_A-Sued]" after executing the command.
Increase the timeout period
You can also log in to the switch manually, and after executing display mac-address, observe whether the echo contains "[SW01_A-Sued]" and how long it takes for the command to be executed until "[SW01_A-Sued]" is displayed. If the time is greater than 10s, change the timeout to include the execution time of the device.
Note, remember to execute first "screen-length disable" command to turn off split screen display
I'm using
get_mac_address_table()
on several comware-switches running version 7.1.070. Since two days, I'm not able to pull the mac-addresses from a single switch calledSW01_A-Sued
due to the netmiko errorPattern not detected: '\\[SW01_A\\-Sued\\]' in output.
.The error suggest to explicitly set the pattern, which I have no influence over, or increase the read_timeout which has no effect on error.
My code is the following:
Because all switches are on the same firmware version I am a little clueless. I also already tried querying the command manually, but this either didn't work.
Is there anything I can adjust about my approach?
The text was updated successfully, but these errors were encountered: