Skip to content

Commit

Permalink
Fix VPP ipAddDel test
Browse files Browse the repository at this point in the history
Update ipAddDel test to current vppinterface.AddDelIpAddress interface,
where current.ipResult is used instead of types.IPDataType.

Signed-off-by: Martin Klozik <[email protected]>
  • Loading branch information
p00rman committed Jun 2, 2020
1 parent 673eeb0 commit 52f0cf0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cnivpp/test/ipAddDel/ipAddDel.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ import (
"time"

_ "git.fd.io/govpp.git/core"
"github.com/containernetworking/cni/pkg/types/current"
_ "github.com/sirupsen/logrus"

"github.com/intel/userspace-cni-network-plugin/cnivpp/api/infra"
"github.com/intel/userspace-cni-network-plugin/cnivpp/api/interface"
"github.com/intel/userspace-cni-network-plugin/cnivpp/api/memif"
"github.com/intel/userspace-cni-network-plugin/pkg/types"
)

//
Expand Down Expand Up @@ -60,7 +60,7 @@ func main() {

// Dummy Input Data
var ipString string = "192.168.172.100/24"
var ipData types.IPDataType
var ipResult *current.Result
var memifSocketId uint32
var memifSocketFile string = "/var/run/vpp/123456/memif-3.sock"
var memifRole vppmemif.MemifRole = vppmemif.RoleMaster
Expand Down Expand Up @@ -112,7 +112,7 @@ func main() {
}

// Add IP to MemIf to Bridge.
err = vppinterface.AddDelIpAddress(vppCh.Ch, swIfIndex, 1, ipData)
err = vppinterface.AddDelIpAddress(vppCh.Ch, swIfIndex, 1, ipResult)
if err != nil {
fmt.Println("Error:", err)
os.Exit(1)
Expand All @@ -125,7 +125,7 @@ func main() {
fmt.Println("User Space VPP client wakeup.")

// Remove IP from MemIf.
err = vppinterface.AddDelIpAddress(vppCh.Ch, swIfIndex, 0, ipData)
err = vppinterface.AddDelIpAddress(vppCh.Ch, swIfIndex, 0, ipResult)

if err != nil {
fmt.Println("Error:", err)
Expand Down

0 comments on commit 52f0cf0

Please sign in to comment.