f-21: code: swap from interface only to full conf
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
parent
9ec6e64327
commit
8a68d3818f
4 changed files with 16 additions and 13 deletions
|
|
@ -1,6 +1,7 @@
|
|||
package dispatcher
|
||||
|
||||
import (
|
||||
configuration "git.g3e.fr/syonad/two/internal/config/agent"
|
||||
"git.g3e.fr/syonad/two/internal/vpc"
|
||||
"git.g3e.fr/syonad/two/pkg/db/kv"
|
||||
"github.com/dgraph-io/badger/v4"
|
||||
|
|
@ -10,7 +11,7 @@ type CreateVPCCommand struct {
|
|||
Name string
|
||||
}
|
||||
|
||||
func (c CreateVPCCommand) Execute(db *badger.DB, _ map[string]string) error {
|
||||
func (c CreateVPCCommand) Execute(db *badger.DB, _ *configuration.Config) error {
|
||||
kv.AddInDB(db, "vpc/"+c.Name+"/state", "creating")
|
||||
return vpc.CreateVPC(db, c.Name)
|
||||
}
|
||||
|
|
@ -19,7 +20,7 @@ type DeleteVPCCommand struct {
|
|||
Name string
|
||||
}
|
||||
|
||||
func (c DeleteVPCCommand) Execute(db *badger.DB, _ map[string]string) error {
|
||||
func (c DeleteVPCCommand) Execute(db *badger.DB, _ *configuration.Config) error {
|
||||
kv.AddInDB(db, "vpc/"+c.Name+"/state", "deleting")
|
||||
if err := vpc.DeleteVPC(db, c.Name); err != nil {
|
||||
return err
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue