Skip to content
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

Confirm napalm context manager bugfix #30

Open
Mierdin opened this issue Aug 18, 2017 · 0 comments
Open

Confirm napalm context manager bugfix #30

Mierdin opened this issue Aug 18, 2017 · 0 comments

Comments

@Mierdin
Copy link
Contributor

Mierdin commented Aug 18, 2017

We're currently using the with statement in the NAPALM actions to automatically open a connection to the device before doing anything with it. However, this appears to not have the desired effect, because when there's a connection problem, it still runs the next line (which errors because it is not set correctly):

vagrant@st2vagrant:~$ st2 run napalm.get_config hostname=vsrx01
.
id: 599740dfc4da5f04e42e6cda
status: failed
parameters:
  hostname: vsrx01
result:
  exit_code: 0
  result: '''bool'' object has no attribute ''get_config'''
  stderr: 'st2.actions.python.NapalmGetConfig: ERROR    ''bool'' object has no attribute ''get_config''

    '
  stdout: 'NAPALM didn''t catch this exception. Please, fill a bugfix on https://github.com/napalm-automation/napalm/issues

    Don''t forget to include this traceback.

Turns out this is a bug in napalm_base which has been fixed and will be included in the next release of NAPALM.

So we should circle back and confirm this behavior is fixed once the next release comes out.

@Mierdin Mierdin changed the title Make connection error logging better Confirm napalm context manager bugfix Aug 24, 2017
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

No branches or pull requests

1 participant