Skip to content

Commit

Permalink
add sonic deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
karimra committed Jun 22, 2021
1 parent b8b4e18 commit 1a811c5
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions nodes/sonic/sonic.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,16 @@ func (s *sonic) Init(cfg *types.NodeConfig, opts ...nodes.NodeOption) error {
return nil
}
func (s *sonic) Config() *types.NodeConfig { return s.cfg }

func (s *sonic) PreDeploy(configName, labCADir, labCARoot string) error {
utils.CreateDirectory(s.cfg.LabDir, 0777)

return nil
}
func (s *sonic) Deploy(ctx context.Context, r runtime.ContainerRuntime) error { return nil }
func (s *sonic) Deploy(ctx context.Context, r runtime.ContainerRuntime) error {
return r.CreateContainer(ctx, s.cfg)
}

func (s *sonic) PostDeploy(ctx context.Context, r runtime.ContainerRuntime, ns map[string]nodes.Node) error {
log.Debugf("Running postdeploy actions for sonic-vs '%s' node", s.cfg.ShortName)
// TODO: change this calls to c.ExecNotWait
Expand All @@ -62,5 +66,5 @@ func (s *sonic) PostDeploy(ctx context.Context, r runtime.ContainerRuntime, ns m
}
return nil
}
func (s *sonic) Destroy(ctx context.Context, r runtime.ContainerRuntime) error { return nil }
func (s *sonic) WithMgmtNet(*types.MgmtNet) {}

func (s *sonic) WithMgmtNet(*types.MgmtNet) {}

0 comments on commit 1a811c5

Please sign in to comment.