feature-25 #26

Manually merged
nicolas.boufideline merged 21 commits from feature-25 into main 2026-05-18 17:44:48 +00:00
2 changed files with 3 additions and 2 deletions
Showing only changes of commit 915581904c - Show all commits

f-25: code: add cfg to start vm

Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
GnomeZworc 2026-04-29 00:36:01 +02:00
Signed by: nicolas.boufideline
GPG key ID: 4406BBBF8845D632

View file

@ -66,7 +66,7 @@ func (c StartVMCommand) Execute(db *badger.DB, cfg *configuration.Config) error
case <-time.After(time.Duration(cfg.Dispatcher.PollSeconds) * time.Second):
}
}
return vm.StartVM(db, c.Name)
return vm.StartVM(db, c.Name, cfg)
}
type StopVMCommand struct {

View file

@ -3,6 +3,7 @@ package vm
import (
"fmt"
configuration "git.g3e.fr/syonad/two/internal/config/agent"
"git.g3e.fr/syonad/two/internal/iptables"
"git.g3e.fr/syonad/two/internal/metadata"
"git.g3e.fr/syonad/two/internal/netif"
@ -13,7 +14,7 @@ import (
"github.com/dgraph-io/badger/v4"
)
func StartVM(db *badger.DB, name string) error {
func StartVM(db *badger.DB, name string, cfg *configuration.Config) error {
state, err := kv.GetFromDB(db, "vm/"+name+"/state")
if err != nil {
return err