Skip to content

Correctly handle onboarding exception when no device type is guessed #135

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 18, 2021

Conversation

mzbroch
Copy link
Contributor

@mzbroch mzbroch commented Mar 18, 2021

This PR improves error handling for situations where occasionally Netmiko library does return None object for well-known device types.

Copy link
Contributor

@glennmatthews glennmatthews left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

FYI the one Travis failure appears to be due to Poetry's parallel installation feature - you may wish to disable that, as in nautobot/nautobot#52.

@@ -178,7 +176,12 @@ def guess_netmiko_device_type(self):
logger.error("ERROR: %s", str(err))
raise OnboardException(reason="fail-general", message=f"ERROR: {str(err)}")

logger.info("INFO device type is: %s", guessed_device_type)
else:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the else: is needed here per se, but it's probably harmless.

@mzbroch mzbroch merged commit 2eca893 into develop Mar 18, 2021
@mzbroch mzbroch deleted the mzb-guessed-device-none branch March 18, 2021 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants