Skip to content
This repository has been archived by the owner on Oct 16, 2024. It is now read-only.

Commit

Permalink
Merge pull request #11 from onmetal/osc-getnatinfo-vni
Browse files Browse the repository at this point in the history
Bump net-dpservice-go from 0.1.14 to 0.1.15
  • Loading branch information
guvenc authored Jul 4, 2023
2 parents ca8845d + c9f765b commit ab74738
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 13 deletions.
10 changes: 3 additions & 7 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,14 @@


//"args": ["add", "interface", "--id=vm4", "--ip=10.200.1.4", "--ip=2000:200:1::4", "--vni=200", "--device=net_tap5"]
//"args": ["add", "-f", "/tmp/int.json"]
//"args": ["delete", "-f", "/tmp/vip.yaml"]
//"args": ["get", "firewallrule", "--interface-id=vm1", "--rule-id=11"]
//"args": ["list", "interfaces", "--wide"]

//"args": ["get", "vni", "--vni=100", "--vni-type=0"]


//"args": ["list", "prefixes","--interface-id=vm1"]

//"args": ["delete", "virtualip","--interface-id=vm1"]

//"args": ["add", "-f", "/tmp/int.json"]
//"args": ["delete", "-f", "/tmp/vip.yaml"]

}
]
}
2 changes: 1 addition & 1 deletion cmd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func RunInit(
return fmt.Errorf("error dp-service already initialized, uuid: %s", uuid)
}

init, err := client.Init(ctx, dpdkproto.InitConfig{})
init, err := client.Init(ctx, &dpdkproto.InitConfig{})
if err != nil && !strings.Contains(err.Error(), errors.StatusErrorString) {
return fmt.Errorf("error init: %w", err)
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/ghodss/yaml v1.0.0
github.com/google/addlicense v1.1.1
github.com/jedib0t/go-pretty/v6 v6.3.9
github.com/onmetal/net-dpservice-go v0.1.14
github.com/onmetal/net-dpservice-go v0.1.15
github.com/onsi/ginkgo/v2 v2.2.0
github.com/onsi/gomega v1.20.2
github.com/spf13/cobra v1.7.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU=
github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
github.com/onmetal/net-dpservice-go v0.1.14 h1:xsFXBcogp/BaV8DDGLe0AQiKTVPdLy5EL7F4VWnj/J8=
github.com/onmetal/net-dpservice-go v0.1.14/go.mod h1:C6TEAtr2T3RJKTf0Js+2T9liU0lXZUdIFWUJvwHmEIE=
github.com/onmetal/net-dpservice-go v0.1.15 h1:aCvScw7iVSLLzCmaqh1ka2WgX8dhK/2wwVMkmLhbjwo=
github.com/onmetal/net-dpservice-go v0.1.15/go.mod h1:M7dg98Xx54qZqWMCWS5LUra3z0x459Pg4/l3F5He4Jk=
github.com/onsi/ginkgo/v2 v2.2.0 h1:3ZNA3L1c5FYDFTTxbFeVGGD8jYvjYauHD30YgLxVsNI=
github.com/onsi/ginkgo/v2 v2.2.0/go.mod h1:MEH45j8TBi6u9BMogfbp0stKC5cdGjumZj5Y7AG4VIk=
github.com/onsi/gomega v1.20.2 h1:8uQq0zMgLEfa0vRrrBgaJF2gyW9Da9BmfGV+OyUzfkY=
Expand Down
4 changes: 2 additions & 2 deletions renderer/renderer.go
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ func (t defaultTableConverter) natTable(nats []api.Nat) (*TableData, error) {
headers = []any{"InterfaceID", "IP", "MinPort", "MaxPort", "UnderlayRoute"}
// if command was natinfo
} else {
headers = []any{"IP", "MinPort", "MaxPort", "UnderlayRoute", "NatInfoType"}
headers = []any{"VNI", "IP", "MinPort", "MaxPort", "UnderlayRoute", "NatInfoType"}
}

columns := make([][]any, len(nats))
Expand All @@ -332,7 +332,7 @@ func (t defaultTableConverter) natTable(nats []api.Nat) (*TableData, error) {
columns[i] = []any{nat.NatMeta.InterfaceID, nat.Spec.NatVIPIP, nat.Spec.MinPort, nat.Spec.MaxPort, nat.Spec.UnderlayRoute}
// if command was natinfo
} else {
columns[i] = []any{nat.Spec.NatVIPIP, nat.Spec.MinPort, nat.Spec.MaxPort, nat.Spec.UnderlayRoute}
columns[i] = []any{nat.Spec.Vni, nat.Spec.NatVIPIP, nat.Spec.MinPort, nat.Spec.MaxPort, nat.Spec.UnderlayRoute}
if len(nats) > 0 && nats[i].Spec.UnderlayRoute == nil {
columns[i] = append(columns[i], "Local")
} else {
Expand Down

0 comments on commit ab74738

Please sign in to comment.