Skip to content

Commit

Permalink
Merge pull request #6 from janog-netcon/fix/create_user
Browse files Browse the repository at this point in the history
fix creating janoger user when node start
  • Loading branch information
proelbtn authored Dec 29, 2023
2 parents ca69041 + 8c428e3 commit 8ad22a9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
6 changes: 6 additions & 0 deletions nodes/sonic/sonic.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,11 @@ func (s *sonic) PostDeploy(ctx context.Context, _ *nodes.PostDeployParams) error
return fmt.Errorf("failed post-deploy node %q: %w", s.Cfg.ShortName, err)
}

cmd, _ = exec.NewExecCmdFromString("service ssh start")
err = s.RunExecNotWait(ctx, cmd)
if err != nil {
return fmt.Errorf("failed post-deploy node %q: %w", s.Cfg.ShortName, err)
}

return nil
}
4 changes: 4 additions & 0 deletions nodes/srl/srl.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ set / system snmp community public
set / system snmp network-instance mgmt
set / system snmp network-instance mgmt admin-state enable
set / system lldp admin-state enable
set / system configuration role network-admin rule / action write
set / system aaa authorization role network-admin services [ cli ]
set / system aaa authentication user janoger password netcon!
set / system aaa authentication user janoger role [ network-admin ]
set / system aaa authentication idle-timeout 7200
{{- /* if e.g. node is run with none mgmt networking but a macvlan interface is attached as mgmt0, we need to adjust the mtu */}}
{{- if ne .MgmtMTU 0 }}
Expand Down
3 changes: 2 additions & 1 deletion nodes/vr_n9kv/vr-n9kv.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ import (

var (
kindnames = []string{"cisco_n9kv", "vr-n9kv", "vr-cisco_n9kv"}
defaultCredentials = nodes.NewCredentials("admin", "admin")
//defaultCredentials = nodes.NewCredentials("admin", "admin")
defaultCredentials = nodes.NewCredentials("janoger", "netcon!")
)

const (
Expand Down

0 comments on commit 8ad22a9

Please sign in to comment.