diff --git a/cmd/build.go b/cmd/build.go index 23d6ce5..aca91a0 100644 --- a/cmd/build.go +++ b/cmd/build.go @@ -4,7 +4,7 @@ package cmd import ( "log" - "github.com/ak1ra24/tn/shell" + "github.com/ak1ra24/tn/internal/pkg/shell" "github.com/spf13/cobra" ) diff --git a/cmd/conf.go b/cmd/conf.go index 3488873..cc0f118 100644 --- a/cmd/conf.go +++ b/cmd/conf.go @@ -4,7 +4,7 @@ package cmd import ( "fmt" - "github.com/ak1ra24/tn/shell" + "github.com/ak1ra24/tn/internal/pkg/shell" "github.com/spf13/cobra" ) diff --git a/cmd/down.go b/cmd/down.go index 58fa4f6..817e357 100644 --- a/cmd/down.go +++ b/cmd/down.go @@ -5,7 +5,7 @@ import ( "fmt" "strings" - "github.com/ak1ra24/tn/shell" + "github.com/ak1ra24/tn/internal/pkg/shell" "github.com/spf13/cobra" ) diff --git a/cmd/ps.go b/cmd/ps.go index a208867..5c50169 100644 --- a/cmd/ps.go +++ b/cmd/ps.go @@ -5,7 +5,7 @@ import ( "fmt" "log" - "github.com/ak1ra24/tn/shell" + "github.com/ak1ra24/tn/internal/pkg/shell" "github.com/spf13/cobra" ) diff --git a/cmd/pull.go b/cmd/pull.go index 9d9af22..8dd5fcc 100644 --- a/cmd/pull.go +++ b/cmd/pull.go @@ -5,7 +5,7 @@ import ( "fmt" "strings" - "github.com/ak1ra24/tn/shell" + "github.com/ak1ra24/tn/internal/pkg/shell" "github.com/spf13/cobra" ) diff --git a/cmd/reconf.go b/cmd/reconf.go index 05d2331..4afb2fb 100644 --- a/cmd/reconf.go +++ b/cmd/reconf.go @@ -6,7 +6,7 @@ import ( "log" "strings" - "github.com/ak1ra24/tn/shell" + "github.com/ak1ra24/tn/internal/pkg/shell" "github.com/spf13/cobra" ) diff --git a/cmd/reup.go b/cmd/reup.go index 41284c1..28493b9 100644 --- a/cmd/reup.go +++ b/cmd/reup.go @@ -6,7 +6,7 @@ import ( "log" "strings" - "github.com/ak1ra24/tn/shell" + "github.com/ak1ra24/tn/internal/pkg/shell" "github.com/spf13/cobra" ) diff --git a/cmd/root.go b/cmd/root.go index 61672ed..2a16470 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -5,8 +5,8 @@ import ( "fmt" "os" - "github.com/ak1ra24/tn/shell" - "github.com/ak1ra24/tn/utils" + "github.com/ak1ra24/tn/internal/pkg/shell" + "github.com/ak1ra24/tn/internal/pkg/utils" "github.com/spf13/cobra" "github.com/spf13/viper" diff --git a/cmd/test.go b/cmd/test.go index 2e4a512..eba21a7 100644 --- a/cmd/test.go +++ b/cmd/test.go @@ -5,7 +5,7 @@ import ( "fmt" "strings" - "github.com/ak1ra24/tn/shell" + "github.com/ak1ra24/tn/internal/pkg/shell" "github.com/spf13/cobra" ) diff --git a/cmd/up.go b/cmd/up.go index e37f09d..f5fba1b 100644 --- a/cmd/up.go +++ b/cmd/up.go @@ -6,7 +6,7 @@ import ( "log" "strings" - "github.com/ak1ra24/tn/shell" + "github.com/ak1ra24/tn/internal/pkg/shell" "github.com/spf13/cobra" ) diff --git a/cmd/upconf.go b/cmd/upconf.go index 50b4a45..0c45426 100644 --- a/cmd/upconf.go +++ b/cmd/upconf.go @@ -6,7 +6,7 @@ import ( "log" "strings" - "github.com/ak1ra24/tn/shell" + "github.com/ak1ra24/tn/internal/pkg/shell" "github.com/spf13/cobra" ) diff --git a/cmd/version.go b/cmd/version.go index 3810943..ec7beae 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -12,7 +12,8 @@ var versionCmd = &cobra.Command{ Use: "version", Short: "show the tinet version", Run: func(cmd *cobra.Command, args []string) { - fmt.Println("Tinet version 0.0.1") + version := "v0.0.0" + fmt.Printf("Tinet version %s\n", version) }, } diff --git a/configs/spec_template.yaml b/configs/spec_template.yaml new file mode 100644 index 0000000..2b59c2c --- /dev/null +++ b/configs/spec_template.yaml @@ -0,0 +1,38 @@ +precmd: +- cmds: + - cmd: "" +preinit: +- cmds: + - cmd: "" +postinit: +- cmds: + - cmd: "" +postfini: +- cmds: + - cmd: "" +nodes: +- name: "" + type: "" + net_base: "" + image: "" + interfaces: + - name: "" + type: "" + args: "" + addr: "" + sysctls: [] +switches: +- name: "" + interfaces: + - name: "" + type: "" + args: "" + addr: "" +node_configs: +- name: "" + cmds: + - cmd: "" +test: +- name: "" + cmds: + - cmd: "" diff --git a/shell/shell.go b/internal/pkg/shell/shell.go similarity index 99% rename from shell/shell.go rename to internal/pkg/shell/shell.go index a08a8ff..62e9610 100644 --- a/shell/shell.go +++ b/internal/pkg/shell/shell.go @@ -7,7 +7,7 @@ import ( l "github.com/sirupsen/logrus" - "github.com/ak1ra24/tn/utils" + "github.com/ak1ra24/tn/internal/pkg/utils" "gopkg.in/yaml.v2" ) diff --git a/shell/shell_test.go b/internal/pkg/shell/shell_test.go similarity index 100% rename from shell/shell_test.go rename to internal/pkg/shell/shell_test.go diff --git a/utils/utils.go b/internal/pkg/utils/utils.go similarity index 100% rename from utils/utils.go rename to internal/pkg/utils/utils.go diff --git a/utils/utils_test.go b/internal/pkg/utils/utils_test.go similarity index 100% rename from utils/utils_test.go rename to internal/pkg/utils/utils_test.go