We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
It would be great to keep the JunOS feature like commit confirm to avoid an outage if something wrong with config.
junos internal/junos/netconf.go ...
junos:
provider "junos" { ... commitconfirm = 5 # minutes }
internal/junos/netconf.go:
// netconfCommit commits the configuration. func (sess *Session) netconfCommit(logMessage string, confirmCommit *int) (_warn []error, _err error) { if confirmCommit != nil { confirmReply, confirmErr := sess.netconf.Exec(netconf.RawMethod(fmt.Sprintf(rpcCommitConfirm, confirmCommit, logMessage))) if confirmErr != nil { return []error{}, fmt.Errorf("executing netconf confirm commit: %w", confirmErr) } // If there are errors in the confirm commit, return now. if confirmReply.Errors != nil { warnings := make([]error, 0) for _, m := range confirmReply.Errors { if m.Severity == errorSeverity { return warnings, errors.New(m.Error()) } warnings = append(warnings, errors.New(m.Error())) } return warnings, nil } delay := *confirmCommit - 1 if delay < 0 { delay = 0 } // Wait for confirmCommit - 1 minutes before committing. time.Sleep(time.Duration(delay) * time.Minute) } ...
https://www.juniper.net/documentation/us/en/software/junos/junos-xml-protocol/topics/ref/tag/junos-xml-protocol-commit-configuration.html
The text was updated successfully, but these errors were encountered:
Hi 👋
After a few tests, the feature is feasible. I'll take care of adding it.
Sorry, something went wrong.
provider: add commit_confirmed argument
4a3cf16
and commit_confirmed_wait_percent Fix #585
commit_confirmed
confirmed
9d73d94
179acc4
a9075ce
716894e
jeremmfr
Successfully merging a pull request may close this issue.
Description
It would be great to keep the JunOS feature like commit confirm to avoid an outage if something wrong with config.
New or Affected Resource(s)
junos
internal/junos/netconf.go
...
Potential Terraform Configuration
junos:
internal/junos/netconf.go:
References
https://www.juniper.net/documentation/us/en/software/junos/junos-xml-protocol/topics/ref/tag/junos-xml-protocol-commit-configuration.html
The text was updated successfully, but these errors were encountered: