Compare commits
No commits in common. "d1559b2ba070400ce6fadd0efe80d36b1ba7623e" and "a650a34fc3a424075c48ec9d88b4d77bf1735fe4" have entirely different histories.
d1559b2ba0
...
a650a34fc3
2 changed files with 1 additions and 46 deletions
|
|
@ -32,12 +32,7 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
goos: [linux]
|
goos: [linux]
|
||||||
goarch: [amd64]
|
goarch: [amd64]
|
||||||
binaries:
|
binaries: [db, metadata, metacli, agent]
|
||||||
- db
|
|
||||||
- metadata
|
|
||||||
- metacli
|
|
||||||
- agent
|
|
||||||
- netns
|
|
||||||
uses: ./.forgejo/workflows/build.yml
|
uses: ./.forgejo/workflows/build.yml
|
||||||
with:
|
with:
|
||||||
tag: ${{ needs.set-release-target.outputs.release_cible }}
|
tag: ${{ needs.set-release-target.outputs.release_cible }}
|
||||||
|
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"flag"
|
|
||||||
"fmt"
|
|
||||||
"os"
|
|
||||||
|
|
||||||
"git.g3e.fr/syonad/two/internal/netns"
|
|
||||||
)
|
|
||||||
|
|
||||||
var (
|
|
||||||
netns_name = flag.String("netns", "", "Network namespace à faire")
|
|
||||||
action = flag.String("action", "", "Action a faire")
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
flag.Parse()
|
|
||||||
|
|
||||||
switch *action {
|
|
||||||
case "create":
|
|
||||||
err := netns.Create(*netns_name)
|
|
||||||
if err != nil {
|
|
||||||
fmt.Println(err)
|
|
||||||
}
|
|
||||||
case "delete":
|
|
||||||
err := netns.Delete(*netns_name)
|
|
||||||
if err != nil {
|
|
||||||
fmt.Println(err)
|
|
||||||
}
|
|
||||||
case "check":
|
|
||||||
if netns.Exist(*netns_name) {
|
|
||||||
fmt.Printf("netns %s exist\n", *netns_name)
|
|
||||||
} else {
|
|
||||||
fmt.Printf("netns %s do not exist\n", *netns_name)
|
|
||||||
}
|
|
||||||
default:
|
|
||||||
fmt.Printf("Available commande:\n - create\n - delete\n - check\n")
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue