Skip to content

Commit

Permalink
change directory structure
Browse files Browse the repository at this point in the history
  • Loading branch information
ak1ra24 committed Dec 29, 2019
1 parent 70c2f96 commit 482300a
Show file tree
Hide file tree
Showing 17 changed files with 53 additions and 14 deletions.
2 changes: 1 addition & 1 deletion cmd/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package cmd
import (
"log"

"github.com/ak1ra24/tn/shell"
"github.com/ak1ra24/tn/internal/pkg/shell"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/conf.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package cmd
import (
"fmt"

"github.com/ak1ra24/tn/shell"
"github.com/ak1ra24/tn/internal/pkg/shell"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/down.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"strings"

"github.com/ak1ra24/tn/shell"
"github.com/ak1ra24/tn/internal/pkg/shell"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/ps.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"log"

"github.com/ak1ra24/tn/shell"
"github.com/ak1ra24/tn/internal/pkg/shell"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"strings"

"github.com/ak1ra24/tn/shell"
"github.com/ak1ra24/tn/internal/pkg/shell"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/reconf.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"log"
"strings"

"github.com/ak1ra24/tn/shell"
"github.com/ak1ra24/tn/internal/pkg/shell"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/reup.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"log"
"strings"

"github.com/ak1ra24/tn/shell"
"github.com/ak1ra24/tn/internal/pkg/shell"
"github.com/spf13/cobra"
)

Expand Down
4 changes: 2 additions & 2 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion cmd/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"strings"

"github.com/ak1ra24/tn/shell"
"github.com/ak1ra24/tn/internal/pkg/shell"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/up.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"log"
"strings"

"github.com/ak1ra24/tn/shell"
"github.com/ak1ra24/tn/internal/pkg/shell"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/upconf.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"log"
"strings"

"github.com/ak1ra24/tn/shell"
"github.com/ak1ra24/tn/internal/pkg/shell"
"github.com/spf13/cobra"
)

Expand Down
3 changes: 2 additions & 1 deletion cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
},
}

Expand Down
38 changes: 38 additions & 0 deletions configs/spec_template.yaml
Original file line number Diff line number Diff line change
@@ -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: ""
2 changes: 1 addition & 1 deletion shell/shell.go → internal/pkg/shell/shell.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 482300a

Please sign in to comment.