diff --git a/cmd/create/create_loadbalancer.go b/cmd/create/create_loadbalancer.go index 5a95423..729b679 100644 --- a/cmd/create/create_loadbalancer.go +++ b/cmd/create/create_loadbalancer.go @@ -90,6 +90,8 @@ func SelectToNum(sel string) int { ret = 4 case "n2": ret = 5 + case "n3": + ret = 6 default: ret = 0 } @@ -146,6 +148,7 @@ func NewCreateLoadBalancerCmd(restOptions *api.RESTOptions) *cobra.Command { priority - select the lb based on weighted round-robin persist - select the lb end-point based on sender n2 - select the lb end-point base on N2 interface params (only available with fullproxy mode) + n3 - select the lb end-point base on N3 interface params --mode value options onearm - LB put LB-IP as srcIP fullnat - LB put Service IP as scrIP diff --git a/cmd/get/get_conntrack.go b/cmd/get/get_conntrack.go index f559982..9bc2736 100644 --- a/cmd/get/get_conntrack.go +++ b/cmd/get/get_conntrack.go @@ -84,7 +84,7 @@ func PrintGetCTResult(resp *http.Response, o api.RESTOptions) { // Table Init table := TableInit() - table.SetHeader([]string{"Service Name", "destIP", "srcIP", "dport", "sport", "proto", "state", "act", "packets", "bytes"}) + table.SetHeader([]string{"Service Name", "destIP", "srcIP", "dport", "sport", "proto", "ident", "state", "act", "packets", "bytes"}) // Making load balance data data = makeConntrackData(o, ctresp) @@ -104,6 +104,7 @@ func makeConntrackData(o api.RESTOptions, ctresp api.CtInformationGet) (data [][ fmt.Sprintf("%d", conntrack.Dport), fmt.Sprintf("%d", conntrack.Sport), conntrack.Proto, + conntrack.Ident, conntrack.CState, conntrack.CAct, fmt.Sprintf("%v", conntrack.Pkts), diff --git a/cmd/get/get_loadbalancer.go b/cmd/get/get_loadbalancer.go index 32c0db9..3ab5e60 100644 --- a/cmd/get/get_loadbalancer.go +++ b/cmd/get/get_loadbalancer.go @@ -78,6 +78,8 @@ func NumToSelect(sel int) string { ret = "lc" case 5: ret = "n2" + case 6: + ret = "n3" default: ret = "rr" } diff --git a/pkg/api/conntrack.go b/pkg/api/conntrack.go index 0826fed..fd4f6bd 100644 --- a/pkg/api/conntrack.go +++ b/pkg/api/conntrack.go @@ -34,6 +34,7 @@ type ConntrackInformation struct { Dport uint16 `json:"destinationPort"` Sport uint16 `json:"sourcePort"` Proto string `json:"protocol"` + Ident string `json:"ident"` CState string `json:"conntrackState"` CAct string `json:"conntrackAct"` Pkts uint64 `json:"packets"`