napalm-automation-community / napalm-vyos

NAPALM Driver for the VyOS
Apache License 2.0
38 stars 27 forks source link

Errors from failed commits are not returned #47

Open yzguy opened 1 year ago

yzguy commented 1 year ago

When applying a commit that ultimately fails the errors are not shown to the user, looking at Netmiko it does capture these errors and passes it back when a ValueError exception is raised https://github.com/ktbyers/netmiko/blob/5f9eaa9e54401a758375574c656655e44bee3746/netmiko/vyos/vyos_ssh.py#L94-L95

napalm-vyos just catches the ValueError and raises a CommitError with it's own message.

TASK [Apply Configuration] **********************************************
fatal: [dev]: FAILED! => changed=false 
  msg: 'cannot install config: Failed to commit config on the device'