f-21: vpc: change to be ok in the name
All checks were successful
Pre Release Workflow / set-release-target (push) Successful in 1s
Pre Release Workflow / build (agent, amd64, linux) (push) Successful in 1m34s
Pre Release Workflow / build (db, amd64, linux) (push) Successful in 1m34s
Pre Release Workflow / build (metacli, amd64, linux) (push) Successful in 1m31s
Pre Release Workflow / build (metadata, amd64, linux) (push) Successful in 1m32s
Pre Release Workflow / build (subnet, amd64, linux) (push) Successful in 1m33s
Pre Release Workflow / upload-scripts (run-dnsmasq-in-netns.sh) (push) Successful in 6s
Pre Release Workflow / prerelease (push) Successful in 14s
Pre Release Workflow / build (dhcp, amd64, linux) (push) Successful in 1m30s
All checks were successful
Pre Release Workflow / set-release-target (push) Successful in 1s
Pre Release Workflow / build (agent, amd64, linux) (push) Successful in 1m34s
Pre Release Workflow / build (db, amd64, linux) (push) Successful in 1m34s
Pre Release Workflow / build (metacli, amd64, linux) (push) Successful in 1m31s
Pre Release Workflow / build (metadata, amd64, linux) (push) Successful in 1m32s
Pre Release Workflow / build (subnet, amd64, linux) (push) Successful in 1m33s
Pre Release Workflow / upload-scripts (run-dnsmasq-in-netns.sh) (push) Successful in 6s
Pre Release Workflow / prerelease (push) Successful in 14s
Pre Release Workflow / build (dhcp, amd64, linux) (push) Successful in 1m30s
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
parent
b70fdb66f0
commit
2779002c63
3 changed files with 18 additions and 20 deletions
|
|
@ -1,6 +1,8 @@
|
|||
package vpc
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"git.g3e.fr/syonad/two/internal/netif"
|
||||
"git.g3e.fr/syonad/two/internal/netns"
|
||||
"git.g3e.fr/syonad/two/pkg/db/kv"
|
||||
|
|
@ -12,7 +14,9 @@ func DeleteVPC(db *badger.DB, name string) error {
|
|||
if state, err := kv.GetFromDB(db, "vpc/"+name+"/state"); err != nil {
|
||||
return err
|
||||
} else if state == "deleting" {
|
||||
if err := netif.DeleteLink("vp-" + name + "-e"); err != nil {
|
||||
vpcID := strings.SplitN(name, "-", 2)[1]
|
||||
|
||||
if err := netif.DeleteLink("vp-" + vpcID + "-e"); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue