Skip to content

Commit

Permalink
adding config mount for vmx
Browse files Browse the repository at this point in the history
  • Loading branch information
hellt committed Jun 7, 2022
1 parent c500e9f commit d2db2ec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions nodes/vr_vmx/vr-vmx.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ func (s *vrVMX) Init(cfg *types.NodeConfig, opts ...nodes.NodeOption) error {
}
s.cfg.Env = utils.MergeStringMaps(defEnv, s.cfg.Env)

// mount config dir to support startup-config functionality
s.cfg.Binds = append(s.cfg.Binds, fmt.Sprint(path.Join(s.cfg.LabDir, configDirName), ":/config"))

s.cfg.Cmd = fmt.Sprintf("--username %s --password %s --hostname %s --connection-mode %s --trace",
s.cfg.Env["USERNAME"], s.cfg.Env["PASSWORD"], s.cfg.ShortName, s.cfg.Env["CONNECTION_MODE"])

Expand Down
1 change: 1 addition & 0 deletions nodes/vr_vqfx/vr-vqfx.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ func (s *vrVQFX) Init(cfg *types.NodeConfig, opts ...nodes.NodeOption) error {
}
s.cfg.Env = utils.MergeStringMaps(defEnv, s.cfg.Env)

// mount config dir to support startup-config functionality
s.cfg.Binds = append(s.cfg.Binds, fmt.Sprint(path.Join(s.cfg.LabDir, configDirName), ":/config"))

if s.cfg.Env["CONNECTION_MODE"] == "macvtap" {
Expand Down

0 comments on commit d2db2ec

Please sign in to comment.