From 50080cca37a5e817ecc9a11c54628e08eba6a092 Mon Sep 17 00:00:00 2001 From: denis-tingaikin Date: Fri, 28 Jan 2022 01:59:01 +0300 Subject: [PATCH] update to latest sdk-sriov Signed-off-by: denis-tingaikin --- go.mod | 4 ++-- go.sum | 10 +++++----- internal/pkg/imports/imports_linux.go | 5 +++-- main.go | 13 +++++++++---- suite_setup_test.go | 9 +++++---- 5 files changed, 24 insertions(+), 17 deletions(-) diff --git a/go.mod b/go.mod index 92fc4ee..6bb3b1e 100644 --- a/go.mod +++ b/go.mod @@ -8,8 +8,8 @@ require ( github.com/edwarnicke/grpcfd v0.1.1 github.com/kelseyhightower/envconfig v1.4.0 github.com/networkservicemesh/api v1.1.2-0.20220119092736-21eda250c390 - github.com/networkservicemesh/sdk v0.5.1-0.20220124073803-419fa7053a1a - github.com/networkservicemesh/sdk-sriov v0.0.0-20220125054043-82a6836ef9b8 + github.com/networkservicemesh/sdk v0.5.1-0.20220127193211-6d5254af4bb4 + github.com/networkservicemesh/sdk-sriov v0.0.0-20220127194319-723f27bc2105 github.com/pkg/errors v0.9.1 github.com/sirupsen/logrus v1.8.1 github.com/spiffe/go-spiffe/v2 v2.0.0-alpha.4.0.20200528145730-dc11d0c74e85 diff --git a/go.sum b/go.sum index f9bd82e..59ab3db 100644 --- a/go.sum +++ b/go.sum @@ -175,11 +175,11 @@ github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OS github.com/nats-io/stan.go v0.10.0/go.mod h1:0jEuBXKauB1HHJswHM/lx05K48TJ1Yxj6VIfM4k+aB4= github.com/networkservicemesh/api v1.1.2-0.20220119092736-21eda250c390 h1:GREf14twiQkUInGh+M0qQH+jNQ9uvTfQC2FVieDd7tQ= github.com/networkservicemesh/api v1.1.2-0.20220119092736-21eda250c390/go.mod h1:B6meq/SWjWR6bGXZdXPfbOeaBK+T1JayLdtEJQCsXKU= -github.com/networkservicemesh/sdk v0.5.1-0.20220124073803-419fa7053a1a h1:VSV85CiW9+IJUPHN58GliNlcYuVldW+lts4fLkna+/o= -github.com/networkservicemesh/sdk v0.5.1-0.20220124073803-419fa7053a1a/go.mod h1:u3HgGqMae6MFZ//JRrN8CkEJ7pwr+CWBG7cvHymhHDY= -github.com/networkservicemesh/sdk-kernel v0.0.0-20220125053613-63d40e5ccf8a/go.mod h1:DvBiFXiN7umMQISiuU2L1XChqqIYE43lgoeDXflJTRk= -github.com/networkservicemesh/sdk-sriov v0.0.0-20220125054043-82a6836ef9b8 h1:wFKI5b4VnAHV61SinOZr7JQ6FsmM2fuSIYOBK7Pg76A= -github.com/networkservicemesh/sdk-sriov v0.0.0-20220125054043-82a6836ef9b8/go.mod h1:aSNvpj40fMb46eKWBBZ9nPFiuaGH5GwdNer9WbwSLdA= +github.com/networkservicemesh/sdk v0.5.1-0.20220127193211-6d5254af4bb4 h1:dpggXFq0Ba6ZjK3b+rDEylbgvxIAvL2SdgXVNJsJct4= +github.com/networkservicemesh/sdk v0.5.1-0.20220127193211-6d5254af4bb4/go.mod h1:u3HgGqMae6MFZ//JRrN8CkEJ7pwr+CWBG7cvHymhHDY= +github.com/networkservicemesh/sdk-kernel v0.0.0-20220127193623-1f226006edcb/go.mod h1:S6k809pGQtC3g4RkgEB9GqHkFq9+GddOj6uw9uXXqnk= +github.com/networkservicemesh/sdk-sriov v0.0.0-20220127194319-723f27bc2105 h1:zOgDBnu0M5AFdB6W1r7VC0ZaKTcT6QqMgRLgeATNUpE= +github.com/networkservicemesh/sdk-sriov v0.0.0-20220127194319-723f27bc2105/go.mod h1:XIvfmUXMwxCMh3LYxYNk4wjgGsMSdYOyhMx2O1GCzB4= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= diff --git a/internal/pkg/imports/imports_linux.go b/internal/pkg/imports/imports_linux.go index 37cd226..a0092fc 100644 --- a/internal/pkg/imports/imports_linux.go +++ b/internal/pkg/imports/imports_linux.go @@ -1,4 +1,4 @@ -// DO NOT EDIT - generated by github.com/edwarnicke/imports-gen +// Code generated by github.com/edwarnicke/imports-gen DO NOT EDIT. package imports import ( @@ -26,10 +26,11 @@ import ( _ "github.com/networkservicemesh/sdk/pkg/networkservice/connectioncontext/dnscontext" _ "github.com/networkservicemesh/sdk/pkg/networkservice/ipam/point2pointipam" _ "github.com/networkservicemesh/sdk/pkg/registry/chains/client" + _ "github.com/networkservicemesh/sdk/pkg/registry/common/begin" _ "github.com/networkservicemesh/sdk/pkg/registry/common/expire" _ "github.com/networkservicemesh/sdk/pkg/registry/common/memory" _ "github.com/networkservicemesh/sdk/pkg/registry/common/recvfd" - _ "github.com/networkservicemesh/sdk/pkg/registry/common/serialize" + _ "github.com/networkservicemesh/sdk/pkg/registry/common/sendfd" _ "github.com/networkservicemesh/sdk/pkg/registry/core/adapters" _ "github.com/networkservicemesh/sdk/pkg/registry/core/chain" _ "github.com/networkservicemesh/sdk/pkg/tools/debug" diff --git a/main.go b/main.go index 3a38cfb..f97e76c 100644 --- a/main.go +++ b/main.go @@ -14,9 +14,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build linux -// +build linux - package main import ( @@ -61,6 +58,7 @@ import ( "github.com/networkservicemesh/sdk/pkg/networkservice/connectioncontext/dnscontext" "github.com/networkservicemesh/sdk/pkg/networkservice/ipam/point2pointipam" registryclient "github.com/networkservicemesh/sdk/pkg/registry/chains/client" + registrysendfd "github.com/networkservicemesh/sdk/pkg/registry/common/sendfd" "github.com/networkservicemesh/sdk/pkg/tools/debug" dnstools "github.com/networkservicemesh/sdk/pkg/tools/dnscontext" "github.com/networkservicemesh/sdk/pkg/tools/fs" @@ -269,7 +267,14 @@ func main() { } } - nseRegistryClient := registryclient.NewNetworkServiceEndpointRegistryClient(ctx, &config.ConnectTo, registryclient.WithDialOptions(clientOptions...)) + nseRegistryClient := registryclient.NewNetworkServiceEndpointRegistryClient( + ctx, + &config.ConnectTo, + registryclient.WithDialOptions(clientOptions...), + registryclient.WithNSEAdditionalFunctionality( + registrysendfd.NewNetworkServiceEndpointRegistryClient(), + ), + ) nse := ®istryapi.NetworkServiceEndpoint{ Name: config.Name, NetworkServiceNames: config.ServiceNames, diff --git a/suite_setup_test.go b/suite_setup_test.go index bfe569b..3c01782 100644 --- a/suite_setup_test.go +++ b/suite_setup_test.go @@ -1,6 +1,6 @@ -// Copyright (c) 2020-2021 Doc.ai and/or its affiliates. +// Copyright (c) 2020-2022 Doc.ai and/or its affiliates. // -// Copyright (c) 2020-2021 Cisco and/or its affiliates. +// Copyright (c) 2020-2022 Cisco and/or its affiliates. // // SPDX-License-Identifier: Apache-2.0 // @@ -36,10 +36,11 @@ import ( "google.golang.org/grpc/credentials" "github.com/networkservicemesh/api/pkg/api/registry" + registrybegin "github.com/networkservicemesh/sdk/pkg/registry/common/begin" "github.com/networkservicemesh/sdk/pkg/registry/common/expire" "github.com/networkservicemesh/sdk/pkg/registry/common/memory" registryrecvfd "github.com/networkservicemesh/sdk/pkg/registry/common/recvfd" - "github.com/networkservicemesh/sdk/pkg/registry/common/serialize" + "github.com/networkservicemesh/sdk/pkg/registry/core/adapters" registrychain "github.com/networkservicemesh/sdk/pkg/registry/core/chain" "github.com/networkservicemesh/sdk/pkg/tools/log" @@ -109,7 +110,7 @@ func (f *TestSuite) SetupSuite() { // ******************************************************************************** memrg := memory.NewNetworkServiceEndpointRegistryServer() registryServer := registrychain.NewNetworkServiceEndpointRegistryServer( - serialize.NewNetworkServiceEndpointRegistryServer(), + registrybegin.NewNetworkServiceEndpointRegistryServer(), expire.NewNetworkServiceEndpointRegistryServer(f.ctx, time.Minute), registryrecvfd.NewNetworkServiceEndpointRegistryServer(), memrg,