Skip to content

Commit

Permalink
Merge pull request #101 from hellt/sendconfig-failed
Browse files Browse the repository at this point in the history
propagate multiresponse failed status to the combined response of SendConfig
  • Loading branch information
carlmontanari authored Oct 4, 2022
2 parents 0474d2d + 9a24639 commit 93d22ca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions assets/platforms/nokia_srl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ default:
default-desired-privilege-level: "exec"
failed-when-contains:
- "Error:"
- "error:" # wildcard catch for errors like `Validation error:`, `Parsing error:`
textfsm-platform: "" # ignored in go because no ntc-templates
network-on-open:
- operation: "acquire-priv" # targets default desired priv by default
Expand Down
1 change: 1 addition & 0 deletions driver/network/sendconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ func (d *Driver) SendConfig(config string, opts ...util.Option) (*response.Respo
r.EndTime = time.Now()
r.ElapsedTime = r.EndTime.Sub(r.StartTime).Seconds()
r.Result = strings.Join(rOutputs, "\n")
r.Failed = m.Failed

return r, nil
}

0 comments on commit 93d22ca

Please sign in to comment.