Juniper / junos-terraform

Apache License 2.0
70 stars 25 forks source link

JTAF processYang panics on Pyang invocation error #34

Closed davedotdev closed 2 years ago

davedotdev commented 2 years ago

https://github.com/Juniper/junos-terraform/blob/master/Internal/processYang/processYang.go#L173

When the processYang code cannot invoke Pyang, it panics. This needs to be a cleaner error.

This error is normally thrown due to:

  1. The venv not being setup
  2. The venv is in the wrong directory
  3. Pyang is not installed
  4. Pyang has found an error (common with YANG code)

The error handler should yield the above errors.