Skip to content

Commit

Permalink
update vpphelper manually
Browse files Browse the repository at this point in the history
Signed-off-by: NikitaSkrynnik <[email protected]>
  • Loading branch information
NikitaSkrynnik committed Nov 29, 2024
1 parent 3a77aef commit 2ff9db9
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 25 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ require (
github.com/networkservicemesh/sdk-kernel v0.0.0-20241126090835-89a3b4302060
github.com/networkservicemesh/sdk-sriov v0.0.0-20241126091246-f52c0d79803b
github.com/networkservicemesh/sdk-vpp v0.0.0-20241106142209-3dbe273c826b
github.com/networkservicemesh/vpphelper v0.0.0-20240115135903-e2b961f768b6
github.com/networkservicemesh/vpphelper v0.0.0-20241128104352-f48814525b60
github.com/pkg/errors v0.9.1
github.com/safchain/ethtool v0.3.0
github.com/sirupsen/logrus v1.9.3
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ github.com/networkservicemesh/sdk-sriov v0.0.0-20241126091246-f52c0d79803b h1:G+
github.com/networkservicemesh/sdk-sriov v0.0.0-20241126091246-f52c0d79803b/go.mod h1:CEKlRXbbf4rJzk3gMoPOPebIHu+Vmf529uhQK3O1gdw=
github.com/networkservicemesh/sdk-vpp v0.0.0-20241106142209-3dbe273c826b h1:oB4ZLVpDYcXF5F6gDh0NwZff3Nei3UONyzwn+FXSkZg=
github.com/networkservicemesh/sdk-vpp v0.0.0-20241106142209-3dbe273c826b/go.mod h1:vXXFWTK5XHuuKUY07lY+rdmNi8w7l2F34nEQRLtC3EA=
github.com/networkservicemesh/vpphelper v0.0.0-20240115135903-e2b961f768b6 h1:o+enN5yCikNXZN+hO+JjE+aLxBWq9+GMVF9GSQtpwMI=
github.com/networkservicemesh/vpphelper v0.0.0-20240115135903-e2b961f768b6/go.mod h1:n6+8PnoDvWj6WMryfU3J8HOCusgysFjQ0kGLfrcsDEM=
github.com/networkservicemesh/vpphelper v0.0.0-20241128104352-f48814525b60 h1:Yx5Do9XvsfY0S7d6yh7msHA+LdniP9JfYt+KgaWkEfA=
github.com/networkservicemesh/vpphelper v0.0.0-20241128104352-f48814525b60/go.mod h1:Qc5x5poZk5cVzcHk4ZIL6+NMC95uoitsmmnl7X9V/Yw=
github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8=
github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ=
github.com/open-policy-agent/opa v0.44.0 h1:sEZthsrWBqIN+ShTMJ0Hcz6a3GkYsY4FaB2S/ou2hZk=
Expand Down
11 changes: 5 additions & 6 deletions internal/tests/suite_ipsec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,9 @@ import (
"context"
"net"

"go.fd.io/govpp/api"
"google.golang.org/grpc"

"github.com/networkservicemesh/vpphelper"

"github.com/networkservicemesh/api/pkg/api/networkservice"
ipsecapi "github.com/networkservicemesh/api/pkg/api/networkservice/mechanisms/ipsec"

Expand All @@ -47,14 +46,14 @@ import (

type ipsecVerifiableEndpoint struct {
ctx context.Context
vppConn vpphelper.Connection
vppConn api.Connection
endpoint.Endpoint
}

func newIpsecVerifiableEndpoint(ctx context.Context,
prefix1, prefix2 *net.IPNet,
tokenGenerator token.GeneratorFunc,
vppConn vpphelper.Connection) verifiableEndpoint {
vppConn api.Connection) verifiableEndpoint {
rv := &ipsecVerifiableEndpoint{
ctx: ctx,
vppConn: vppConn,
Expand Down Expand Up @@ -94,14 +93,14 @@ func (v *ipsecVerifiableEndpoint) VerifyClose(_ *networkservice.Connection) erro

type ipsecVerifiableClient struct {
ctx context.Context
vppConn vpphelper.Connection
vppConn api.Connection
networkservice.NetworkServiceClient
}

func newIpsecVerifiableClient(
ctx context.Context,
sutCC grpc.ClientConnInterface,
vppConn vpphelper.Connection,
vppConn api.Connection,
) verifiableClient {
return &ipsecVerifiableClient{
ctx: ctx,
Expand Down
6 changes: 2 additions & 4 deletions internal/tests/suite_memif_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ import (
"go.fd.io/govpp/api"
"go.fd.io/govpp/binapi/vlib"

"github.com/networkservicemesh/vpphelper"

"github.com/networkservicemesh/sdk/pkg/networkservice/common/mechanisms"
"github.com/networkservicemesh/sdk/pkg/networkservice/common/mechanisms/sendfd"
"github.com/networkservicemesh/sdk/pkg/networkservice/core/chain"
Expand Down Expand Up @@ -63,7 +61,7 @@ type memifVerifiableEndpoint struct {
func newMemifVerifiableEndpoint(ctx context.Context,
prefix1, prefix2 *net.IPNet,
tokenGenerator token.GeneratorFunc,
vppConn vpphelper.Connection,
vppConn api.Connection,
) verifiableEndpoint {
return &memifVerifiableEndpoint{
ctx: ctx,
Expand Down Expand Up @@ -110,7 +108,7 @@ type memifVerifiableClient struct {
networkservice.NetworkServiceClient
}

func newMemifVerifiableClient(ctx context.Context, sutCC grpc.ClientConnInterface, vppConn vpphelper.Connection) verifiableClient {
func newMemifVerifiableClient(ctx context.Context, sutCC grpc.ClientConnInterface, vppConn api.Connection) verifiableClient {
rv := &memifVerifiableClient{
ctx: ctx,
vppConn: vppConn,
Expand Down
3 changes: 2 additions & 1 deletion internal/tests/suite_setup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import (
"github.com/sirupsen/logrus"
"github.com/spiffe/go-spiffe/v2/spiffetls/tlsconfig"
"github.com/spiffe/go-spiffe/v2/workloadapi"
"go.fd.io/govpp/api"
"go.fd.io/govpp/binapi/vpe"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
Expand Down Expand Up @@ -204,7 +205,7 @@ func (f *ForwarderTestSuite) SetupSuite() {
// ********************************************************************************
}

func (f *ForwarderTestSuite) createVpp(ctx context.Context, name string) (vppConn vpphelper.Connection, vppRoot string, errCh <-chan error) {
func (f *ForwarderTestSuite) createVpp(ctx context.Context, name string) (vppConn api.Connection, vppRoot string, errCh <-chan error) {
now := time.Now()
var err error
vppRoot, err = os.MkdirTemp("", fmt.Sprintf("%s-", name))
Expand Down
7 changes: 3 additions & 4 deletions internal/tests/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,9 @@ import (
"github.com/spiffe/go-spiffe/v2/bundle/x509bundle"
"github.com/spiffe/go-spiffe/v2/svid/x509svid"
"github.com/stretchr/testify/suite"
"go.fd.io/govpp/api"
"google.golang.org/grpc"

"github.com/networkservicemesh/vpphelper"

"github.com/networkservicemesh/api/pkg/api/registry"

"github.com/networkservicemesh/cmd-forwarder-vpp/internal/config"
Expand All @@ -51,12 +50,12 @@ type ForwarderTestSuite struct {
x509bundle x509bundle.Source

// vppServer stuff
vppServerConn vpphelper.Connection
vppServerConn api.Connection
vppServerRoot string
vppServerErrCh <-chan error

// vppClient stuff
vppClientConn vpphelper.Connection
vppClientConn api.Connection
vppClientRoot string
vppClientErrCh <-chan error

Expand Down
11 changes: 5 additions & 6 deletions internal/tests/suite_wireguard_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,9 @@ import (
"context"
"net"

"go.fd.io/govpp/api"
"google.golang.org/grpc"

"github.com/networkservicemesh/vpphelper"

"github.com/networkservicemesh/sdk/pkg/networkservice/chains/client"

"github.com/networkservicemesh/sdk/pkg/networkservice/common/authorize"
Expand All @@ -48,14 +47,14 @@ import (

type wireguardVerifiableEndpoint struct {
ctx context.Context
vppConn vpphelper.Connection
vppConn api.Connection
endpoint.Endpoint
}

func newWireguardVerifiableEndpoint(ctx context.Context,
prefix1, prefix2 *net.IPNet,
tokenGenerator token.GeneratorFunc,
vppConn vpphelper.Connection) verifiableEndpoint {
vppConn api.Connection) verifiableEndpoint {
rv := &wireguardVerifiableEndpoint{
ctx: ctx,
vppConn: vppConn,
Expand Down Expand Up @@ -95,14 +94,14 @@ func (v *wireguardVerifiableEndpoint) VerifyClose(_ *networkservice.Connection)

type wireguardVerifiableClient struct {
ctx context.Context
vppConn vpphelper.Connection
vppConn api.Connection
networkservice.NetworkServiceClient
}

func newWireguardVerifiableClient(
ctx context.Context,
sutCC grpc.ClientConnInterface,
vppConn vpphelper.Connection,
vppConn api.Connection,
) verifiableClient {
return &wireguardVerifiableClient{
ctx: ctx,
Expand Down
3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import (
"github.com/spiffe/go-spiffe/v2/spiffeid"
"github.com/spiffe/go-spiffe/v2/spiffetls/tlsconfig"
"github.com/spiffe/go-spiffe/v2/workloadapi"
"go.fd.io/govpp/api"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"

Expand Down Expand Up @@ -174,7 +175,7 @@ func main() {
// ********************************************************************************
now = time.Now()

var vppConn vpphelper.Connection
var vppConn api.Connection
var vppErrCh <-chan error
var metricsOpts []metrics.Option
cleanupDoneCh := make(chan struct{})
Expand Down

0 comments on commit 2ff9db9

Please sign in to comment.