Skip to content

Commit

Permalink
use nc save without echo param
Browse files Browse the repository at this point in the history
  • Loading branch information
hellt committed Jun 28, 2021
1 parent 088e59d commit 7311207
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion nodes/vr_sros/vr-sros.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func (s *vrSROS) SaveConfig(ctx context.Context, r runtime.ContainerRuntime) err
err := utils.SaveCfgViaNetconf(s.cfg.LongName,
nodes.DefaultCredentials[s.cfg.Kind][0],
nodes.DefaultCredentials[s.cfg.Kind][0],
false)
)

if err != nil {
return err
Expand Down
3 changes: 1 addition & 2 deletions utils/netconf.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,13 @@ import (
// SaveCfgViaNetconf saves the running config to the startup by means
// of invoking a netconf rpc <copy-config>
// this method is used on the network elements that can't perform a save of config via other means
func SaveCfgViaNetconf(addr, username, password string, echo bool) error {
func SaveCfgViaNetconf(addr, username, password string) error {
d, err := netconf.NewNetconfDriver(
addr,
base.WithAuthStrictKey(false),
base.WithAuthUsername(username),
base.WithAuthPassword(password),
base.WithTransportType(transport.StandardTransportName),
base.WithNetconfServerEcho(echo),
)
if err != nil {
return fmt.Errorf("Could not create netconf driver for %s: %+v\n", addr, err)
Expand Down

0 comments on commit 7311207

Please sign in to comment.