From 6ccb2c6f27dea2b11ae0099419f7a860f44db887 Mon Sep 17 00:00:00 2001 From: Vladimir Popov Date: Fri, 26 Feb 2021 13:39:10 +0700 Subject: [PATCH 1/2] Manually update to the latest sdk version Signed-off-by: Vladimir Popov --- go.mod | 8 ++++---- go.sum | 22 ++++++++++++++-------- internal/imports/imports_linux.go | 3 ++- main.go | 24 +++++++++++++++--------- 4 files changed, 35 insertions(+), 22 deletions(-) diff --git a/go.mod b/go.mod index fc6f4d77..34b4307d 100644 --- a/go.mod +++ b/go.mod @@ -5,16 +5,16 @@ go 1.15 require ( github.com/antonfisher/nested-logrus-formatter v1.1.0 github.com/edwarnicke/exechelper v1.0.2 - github.com/edwarnicke/grpcfd v0.0.0-20200920223154-d5b6e1f19bd0 + github.com/edwarnicke/grpcfd v0.0.0-20210219150442-10fb469a6976 github.com/kelseyhightower/envconfig v1.4.0 github.com/networkservicemesh/api v0.0.0-20210218170701-1a72f1cba074 - github.com/networkservicemesh/sdk v0.0.0-20210220122417-bab01203bb73 + github.com/networkservicemesh/sdk v0.0.0-20210224165044-73abdc1d1c42 github.com/networkservicemesh/sdk-k8s v0.0.0-20210220123047-b200a6b6b974 - github.com/networkservicemesh/sdk-sriov v0.0.0-20210217064121-69fae3fcd42e + github.com/networkservicemesh/sdk-sriov v0.0.0-20210224174015-393913c86605 github.com/pkg/errors v0.9.1 github.com/sirupsen/logrus v1.7.0 github.com/spiffe/go-spiffe/v2 v2.0.0-alpha.4.0.20200528145730-dc11d0c74e85 github.com/stretchr/testify v1.6.1 - google.golang.org/grpc v1.33.2 + google.golang.org/grpc v1.35.0 k8s.io/kubelet v0.20.1 ) diff --git a/go.sum b/go.sum index ff1f1086..bdd6d606 100644 --- a/go.sum +++ b/go.sum @@ -39,6 +39,8 @@ github.com/DataDog/datadog-go v2.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3 github.com/Djarvur/go-err113 v0.0.0-20200511133814-5174e21577d5/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= github.com/HdrHistogram/hdrhistogram-go v1.0.0 h1:jivTvI9tBw5B8wW9Qd0uoQ2qaajb29y4TPhYTgh8Lb0= github.com/HdrHistogram/hdrhistogram-go v1.0.0/go.mod h1:YzE1EgsuAz8q9lfGdlxBZo2Ma655+PfKp2mlzcAqIFw= +github.com/HdrHistogram/hdrhistogram-go v1.0.1 h1:GX8GAYDuhlFQnI2fRDHQhTlkHMz8bEn0jTI6LJU0mpw= +github.com/HdrHistogram/hdrhistogram-go v1.0.1/go.mod h1:BWJ+nMSHY3L41Zj7CA3uXnloDp7xxV0YvstAE7nKTaM= github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= @@ -83,6 +85,7 @@ github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6D github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= @@ -106,6 +109,8 @@ github.com/edwarnicke/exechelper v1.0.2 h1:dD49Ui2U0FBFxxhalnKw6vLS0P0TkgnXBRvKL github.com/edwarnicke/exechelper v1.0.2/go.mod h1:/T271jtNX/ND4De6pa2aRy2+8sNtyCDB1A2pp4M+fUs= github.com/edwarnicke/grpcfd v0.0.0-20200920223154-d5b6e1f19bd0 h1:FHjcIM6YU8DnCw94+29EZX0bUqh016oqrtJrO8ZYiIY= github.com/edwarnicke/grpcfd v0.0.0-20200920223154-d5b6e1f19bd0/go.mod h1:rHihB9YvNMixz8rS+ZbwosI2kj65VLkeyYAI2M+/cGA= +github.com/edwarnicke/grpcfd v0.0.0-20210219150442-10fb469a6976 h1:qYvyZmwMS7wdlMlf/r8jPeBUIkjuPO/Ns9T7g1p7c2A= +github.com/edwarnicke/grpcfd v0.0.0-20210219150442-10fb469a6976/go.mod h1:rHihB9YvNMixz8rS+ZbwosI2kj65VLkeyYAI2M+/cGA= github.com/edwarnicke/serialize v0.0.0-20200705214914-ebc43080eecf h1:/lViRfaDxKINb2X6kOR3EJKJGR+MxUvqfgtYt5nh+qc= github.com/edwarnicke/serialize v0.0.0-20200705214914-ebc43080eecf/go.mod h1:XvbCO/QGsl3X8RzjBMoRpkm54FIAZH5ChK2j+aox7pw= github.com/edwarnicke/serialize v1.0.7 h1:geX8vmyu8Ij2S5fFIXjy9gBDkKxXnrMIzMoDvV0Ddac= @@ -115,6 +120,7 @@ github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= @@ -393,20 +399,18 @@ github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxzi github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/nats-io/stan.go v0.6.0/go.mod h1:eIcD5bi3pqbHT/xIIvXMwvzXYElgouBvaVRftaE+eac= github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d/go.mod h1:o96djdrsSGy3AWPyBgZMAGfxZNfgntdJG+11KU4QvbU= -github.com/networkservicemesh/api v0.0.0-20210202152048-ec956057eb3a h1:26MmmU399gnahAC+f6OfWsP5MpnLdJ4UjvBa6fXYvNU= -github.com/networkservicemesh/api v0.0.0-20210202152048-ec956057eb3a/go.mod h1:qvxdY1Zt4QTtiG+uH1XmjpegeHjlt5Jj4A8iK55iJPI= github.com/networkservicemesh/api v0.0.0-20210218170701-1a72f1cba074 h1:lMU+bavS8l0vKZKtCYutUFtTaU5jzTEA7bD/s843XYU= github.com/networkservicemesh/api v0.0.0-20210218170701-1a72f1cba074/go.mod h1:qvxdY1Zt4QTtiG+uH1XmjpegeHjlt5Jj4A8iK55iJPI= -github.com/networkservicemesh/sdk v0.0.0-20210216095211-a36209b21c4b h1:6M4ZAQwAJxcI2ii7QF2oK2btsx/qwjbtnpILMLsecQw= -github.com/networkservicemesh/sdk v0.0.0-20210216095211-a36209b21c4b/go.mod h1:7Y9JsBKKjgvOT2faCXy/aM76bWsA//xvdVfbdLe0WXk= github.com/networkservicemesh/sdk v0.0.0-20210220122417-bab01203bb73 h1:m7UW86tzJrJkmZPtgvGDgpXsU2LX3DmzYGLymC34Q+s= github.com/networkservicemesh/sdk v0.0.0-20210220122417-bab01203bb73/go.mod h1:cK8mHGgBoxNO7Y3pwozi2a+NdALq+3H0wWc1J/TqJQg= +github.com/networkservicemesh/sdk v0.0.0-20210224165044-73abdc1d1c42 h1:mTsxFNi6ILJGgvDZrzrsHbVTZmdUiXftd/F5maMFwxg= +github.com/networkservicemesh/sdk v0.0.0-20210224165044-73abdc1d1c42/go.mod h1:IrL3IsUBr/iQrtLQEtmBRFKoIKjYZEW+Z7ZFDt9TbRc= github.com/networkservicemesh/sdk-k8s v0.0.0-20210220123047-b200a6b6b974 h1:P6Bejf9wfq0dsLUmnwrPcniNFeBccsPwh27E/azZtJA= github.com/networkservicemesh/sdk-k8s v0.0.0-20210220123047-b200a6b6b974/go.mod h1:6MdZduLVqsvd8RaXTi+woH3eUJFQwzdmS8HZbG/tMzo= -github.com/networkservicemesh/sdk-kernel v0.0.0-20210216095528-c177e58a0d03 h1:ooGOUOXve7Dwdt25oyDrKINenrfG86UoxfEIXsQSorE= -github.com/networkservicemesh/sdk-kernel v0.0.0-20210216095528-c177e58a0d03/go.mod h1:fYNkQR64twi8v9ATVTXDfMRbfKktUHA49nxI/kqwvDE= -github.com/networkservicemesh/sdk-sriov v0.0.0-20210217064121-69fae3fcd42e h1:dsbp9wJc4ZB8P8gOt6+lXMUhBTyM7eyc0OmvBNjTvdA= -github.com/networkservicemesh/sdk-sriov v0.0.0-20210217064121-69fae3fcd42e/go.mod h1:SAfJDaAfFQ7z+2hRlddcqP4MVdMY6LEl6v2ApU2HkQQ= +github.com/networkservicemesh/sdk-kernel v0.0.0-20210220122930-b70b80948edb h1:y06cP9qHJ8XLfDD1D4EfN8LpRU4iXVrAGi1giHisE9A= +github.com/networkservicemesh/sdk-kernel v0.0.0-20210220122930-b70b80948edb/go.mod h1:VjMFZ21aIj/XiR60CmhkOPweE8xxtT996zJIPvE1rrE= +github.com/networkservicemesh/sdk-sriov v0.0.0-20210224174015-393913c86605 h1:Iew2yt8Pm+NOyl+1v9m6yWdwXNJKaVyxT0O3ukZeTm0= +github.com/networkservicemesh/sdk-sriov v0.0.0-20210224174015-393913c86605/go.mod h1:ThDPP939JaAR2lVqAMfrM34UKCMddyE27UeKDKAXlbA= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nishanths/exhaustive v0.0.0-20200811152831-6cf413ae40e0/go.mod h1:wBEpHwM2OdmeNpdCvRPUlkEbBuaFmcK4Wv8Q7FuGW3c= @@ -886,6 +890,8 @@ google.golang.org/grpc v1.32.0 h1:zWTV+LMdc3kaiJMSTOFz2UgSBgx8RNQoTGiZu3fR9S0= google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.2 h1:EQyQC3sa8M+p6Ulc8yy9SWSS2GVwyRc83gAbG8lrl4o= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.35.0 h1:TwIQcH3es+MojMVojxxfQ3l3OF2KzlRxML2xZq0kRo8= +google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/internal/imports/imports_linux.go b/internal/imports/imports_linux.go index 0170951e..99c7db0d 100644 --- a/internal/imports/imports_linux.go +++ b/internal/imports/imports_linux.go @@ -14,7 +14,7 @@ import ( _ "github.com/networkservicemesh/sdk-k8s/pkg/tools/k8stest/podresources" _ "github.com/networkservicemesh/sdk-k8s/pkg/tools/podresources" _ "github.com/networkservicemesh/sdk-k8s/pkg/tools/socketpath" - _ "github.com/networkservicemesh/sdk-sriov/pkg/networkservice/chains/sriovns" + _ "github.com/networkservicemesh/sdk-sriov/pkg/networkservice/chains/xconnectns" _ "github.com/networkservicemesh/sdk-sriov/pkg/sriov/config" _ "github.com/networkservicemesh/sdk-sriov/pkg/sriov/pci" _ "github.com/networkservicemesh/sdk-sriov/pkg/sriov/resource" @@ -39,6 +39,7 @@ import ( _ "github.com/networkservicemesh/sdk/pkg/tools/signalctx" _ "github.com/networkservicemesh/sdk/pkg/tools/spiffejwt" _ "github.com/networkservicemesh/sdk/pkg/tools/spire" + _ "github.com/networkservicemesh/sdk/pkg/tools/token" _ "github.com/pkg/errors" _ "github.com/sirupsen/logrus" _ "github.com/spiffe/go-spiffe/v2/bundle/x509bundle" diff --git a/main.go b/main.go index 3072b321..eba91ffa 100644 --- a/main.go +++ b/main.go @@ -38,14 +38,14 @@ import ( registryapi "github.com/networkservicemesh/api/pkg/api/registry" k8sdeviceplugin "github.com/networkservicemesh/sdk-k8s/pkg/tools/deviceplugin" k8spodresources "github.com/networkservicemesh/sdk-k8s/pkg/tools/podresources" - "github.com/networkservicemesh/sdk-sriov/pkg/networkservice/chains/sriovns" + "github.com/networkservicemesh/sdk-sriov/pkg/networkservice/chains/xconnectns" sriovconfig "github.com/networkservicemesh/sdk-sriov/pkg/sriov/config" "github.com/networkservicemesh/sdk-sriov/pkg/sriov/pci" "github.com/networkservicemesh/sdk-sriov/pkg/sriov/resource" - "github.com/networkservicemesh/sdk-sriov/pkg/sriov/token" + sriovtoken "github.com/networkservicemesh/sdk-sriov/pkg/sriov/token" "github.com/networkservicemesh/sdk/pkg/networkservice/common/authorize" - "github.com/networkservicemesh/sdk/pkg/registry/common/interpose" - "github.com/networkservicemesh/sdk/pkg/registry/common/refresh" + registryinterpose "github.com/networkservicemesh/sdk/pkg/registry/common/interpose" + registryrefresh "github.com/networkservicemesh/sdk/pkg/registry/common/refresh" registrysendfd "github.com/networkservicemesh/sdk/pkg/registry/common/sendfd" registrychain "github.com/networkservicemesh/sdk/pkg/registry/core/chain" "github.com/networkservicemesh/sdk/pkg/tools/debug" @@ -56,6 +56,7 @@ import ( "github.com/networkservicemesh/sdk/pkg/tools/opentracing" "github.com/networkservicemesh/sdk/pkg/tools/signalctx" "github.com/networkservicemesh/sdk/pkg/tools/spiffejwt" + "github.com/networkservicemesh/sdk/pkg/tools/token" "github.com/networkservicemesh/cmd-forwarder-sriov/internal/deviceplugin" ) @@ -148,7 +149,7 @@ func main() { log.FromContext(ctx).Infof("executing phase 3: init pools (time since start: %s)", time.Since(starttime)) // ******************************************************************************** - tokenPool := token.NewPool(sriovConfig) + tokenPool := sriovtoken.NewPool(sriovConfig) pciPool, err := pci.NewPool(config.PCIDevicesPath, config.PCIDriversPath, config.VFIOPath, sriovConfig) if err != nil { @@ -188,7 +189,7 @@ func main() { // ******************************************************************************** log.FromContext(ctx).Infof("executing phase 6: create sriovns network service endpoint (time since start: %s)", time.Since(starttime)) // ******************************************************************************** - endpoint := sriovns.NewServer( + endpoint := xconnectns.NewServer( ctx, config.Name, authorize.NewServer(), @@ -203,7 +204,12 @@ func main() { credentials.NewTLS(tlsconfig.MTLSClientConfig(source, source, tlsconfig.AuthorizeAny())), ), ), - grpc.WithDefaultCallOptions(grpc.WaitForReady(true)), + grpc.WithDefaultCallOptions( + grpc.WaitForReady(true), + grpc.PerRPCCredentials(token.NewPerRPCCredentials(spiffejwt.TokenGeneratorFunc(source, config.MaxTokenLifetime))), + ), + grpcfd.WithChainStreamInterceptor(), + grpcfd.WithChainUnaryInterceptor(), ) // ******************************************************************************** @@ -251,8 +257,8 @@ func main() { } registryClient := registrychain.NewNetworkServiceEndpointRegistryClient( - refresh.NewNetworkServiceEndpointRegistryClient(), - interpose.NewNetworkServiceEndpointRegistryClient(), + registryinterpose.NewNetworkServiceEndpointRegistryClient(), + registryrefresh.NewNetworkServiceEndpointRegistryClient(), registrysendfd.NewNetworkServiceEndpointRegistryClient(), registryapi.NewNetworkServiceEndpointRegistryClient(registryCC), ) From a6ee3ee0dec1a6ad1fe39f7ed9e1ebe10313b7c9 Mon Sep 17 00:00:00 2001 From: Vladimir Popov Date: Mon, 1 Mar 2021 10:44:14 +0700 Subject: [PATCH 2/2] Manually update to the latest sdk version Signed-off-by: Vladimir Popov --- go.mod | 4 ++-- go.sum | 12 ++++++------ internal/imports/imports_linux.go | 4 +--- main.go | 12 ++---------- suite_setup_test.go | 2 +- 5 files changed, 12 insertions(+), 22 deletions(-) diff --git a/go.mod b/go.mod index 34b4307d..4501f38d 100644 --- a/go.mod +++ b/go.mod @@ -8,9 +8,9 @@ require ( github.com/edwarnicke/grpcfd v0.0.0-20210219150442-10fb469a6976 github.com/kelseyhightower/envconfig v1.4.0 github.com/networkservicemesh/api v0.0.0-20210218170701-1a72f1cba074 - github.com/networkservicemesh/sdk v0.0.0-20210224165044-73abdc1d1c42 + github.com/networkservicemesh/sdk v0.0.0-20210226095245-acdecd4599ac github.com/networkservicemesh/sdk-k8s v0.0.0-20210220123047-b200a6b6b974 - github.com/networkservicemesh/sdk-sriov v0.0.0-20210224174015-393913c86605 + github.com/networkservicemesh/sdk-sriov v0.0.0-20210226100411-20d85b751bdb github.com/pkg/errors v0.9.1 github.com/sirupsen/logrus v1.7.0 github.com/spiffe/go-spiffe/v2 v2.0.0-alpha.4.0.20200528145730-dc11d0c74e85 diff --git a/go.sum b/go.sum index bdd6d606..3fdd4dfb 100644 --- a/go.sum +++ b/go.sum @@ -403,14 +403,14 @@ github.com/networkservicemesh/api v0.0.0-20210218170701-1a72f1cba074 h1:lMU+bavS github.com/networkservicemesh/api v0.0.0-20210218170701-1a72f1cba074/go.mod h1:qvxdY1Zt4QTtiG+uH1XmjpegeHjlt5Jj4A8iK55iJPI= github.com/networkservicemesh/sdk v0.0.0-20210220122417-bab01203bb73 h1:m7UW86tzJrJkmZPtgvGDgpXsU2LX3DmzYGLymC34Q+s= github.com/networkservicemesh/sdk v0.0.0-20210220122417-bab01203bb73/go.mod h1:cK8mHGgBoxNO7Y3pwozi2a+NdALq+3H0wWc1J/TqJQg= -github.com/networkservicemesh/sdk v0.0.0-20210224165044-73abdc1d1c42 h1:mTsxFNi6ILJGgvDZrzrsHbVTZmdUiXftd/F5maMFwxg= -github.com/networkservicemesh/sdk v0.0.0-20210224165044-73abdc1d1c42/go.mod h1:IrL3IsUBr/iQrtLQEtmBRFKoIKjYZEW+Z7ZFDt9TbRc= +github.com/networkservicemesh/sdk v0.0.0-20210226095245-acdecd4599ac h1:U9LDdSiCrQTt61NiWf6iIL+1f139RmImaExfGkGzWd4= +github.com/networkservicemesh/sdk v0.0.0-20210226095245-acdecd4599ac/go.mod h1:IrL3IsUBr/iQrtLQEtmBRFKoIKjYZEW+Z7ZFDt9TbRc= github.com/networkservicemesh/sdk-k8s v0.0.0-20210220123047-b200a6b6b974 h1:P6Bejf9wfq0dsLUmnwrPcniNFeBccsPwh27E/azZtJA= github.com/networkservicemesh/sdk-k8s v0.0.0-20210220123047-b200a6b6b974/go.mod h1:6MdZduLVqsvd8RaXTi+woH3eUJFQwzdmS8HZbG/tMzo= -github.com/networkservicemesh/sdk-kernel v0.0.0-20210220122930-b70b80948edb h1:y06cP9qHJ8XLfDD1D4EfN8LpRU4iXVrAGi1giHisE9A= -github.com/networkservicemesh/sdk-kernel v0.0.0-20210220122930-b70b80948edb/go.mod h1:VjMFZ21aIj/XiR60CmhkOPweE8xxtT996zJIPvE1rrE= -github.com/networkservicemesh/sdk-sriov v0.0.0-20210224174015-393913c86605 h1:Iew2yt8Pm+NOyl+1v9m6yWdwXNJKaVyxT0O3ukZeTm0= -github.com/networkservicemesh/sdk-sriov v0.0.0-20210224174015-393913c86605/go.mod h1:ThDPP939JaAR2lVqAMfrM34UKCMddyE27UeKDKAXlbA= +github.com/networkservicemesh/sdk-kernel v0.0.0-20210226095937-76847e2a604b h1:nXkV/JZahKezBaNm1d/ZK8X7qYhldbqbNF5zNCF/H60= +github.com/networkservicemesh/sdk-kernel v0.0.0-20210226095937-76847e2a604b/go.mod h1:P2OFnGk/D8/ofa17KRKk80302uQvxVFPZM+IxzXMop8= +github.com/networkservicemesh/sdk-sriov v0.0.0-20210226100411-20d85b751bdb h1:eBQwLJozNp+1Rc9sfBb25LR4FqCmMfD5c60qJJ1zqhw= +github.com/networkservicemesh/sdk-sriov v0.0.0-20210226100411-20d85b751bdb/go.mod h1:+4WbIteyx02EwW2zEk45Krj6TwaQjX9JZFV/u4CfeAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nishanths/exhaustive v0.0.0-20200811152831-6cf413ae40e0/go.mod h1:wBEpHwM2OdmeNpdCvRPUlkEbBuaFmcK4Wv8Q7FuGW3c= diff --git a/internal/imports/imports_linux.go b/internal/imports/imports_linux.go index 99c7db0d..a219d4e0 100644 --- a/internal/imports/imports_linux.go +++ b/internal/imports/imports_linux.go @@ -21,12 +21,10 @@ import ( _ "github.com/networkservicemesh/sdk-sriov/pkg/sriov/token" _ "github.com/networkservicemesh/sdk-sriov/pkg/tools/tokens" _ "github.com/networkservicemesh/sdk/pkg/networkservice/common/authorize" + _ "github.com/networkservicemesh/sdk/pkg/registry/chains/client" _ "github.com/networkservicemesh/sdk/pkg/registry/common/expire" - _ "github.com/networkservicemesh/sdk/pkg/registry/common/interpose" _ "github.com/networkservicemesh/sdk/pkg/registry/common/memory" _ "github.com/networkservicemesh/sdk/pkg/registry/common/recvfd" - _ "github.com/networkservicemesh/sdk/pkg/registry/common/refresh" - _ "github.com/networkservicemesh/sdk/pkg/registry/common/sendfd" _ "github.com/networkservicemesh/sdk/pkg/registry/common/setid" _ "github.com/networkservicemesh/sdk/pkg/registry/core/adapters" _ "github.com/networkservicemesh/sdk/pkg/registry/core/chain" diff --git a/main.go b/main.go index eba91ffa..1455b388 100644 --- a/main.go +++ b/main.go @@ -44,10 +44,7 @@ import ( "github.com/networkservicemesh/sdk-sriov/pkg/sriov/resource" sriovtoken "github.com/networkservicemesh/sdk-sriov/pkg/sriov/token" "github.com/networkservicemesh/sdk/pkg/networkservice/common/authorize" - registryinterpose "github.com/networkservicemesh/sdk/pkg/registry/common/interpose" - registryrefresh "github.com/networkservicemesh/sdk/pkg/registry/common/refresh" - registrysendfd "github.com/networkservicemesh/sdk/pkg/registry/common/sendfd" - registrychain "github.com/networkservicemesh/sdk/pkg/registry/core/chain" + registryclient "github.com/networkservicemesh/sdk/pkg/registry/chains/client" "github.com/networkservicemesh/sdk/pkg/tools/debug" "github.com/networkservicemesh/sdk/pkg/tools/grpcutils" "github.com/networkservicemesh/sdk/pkg/tools/jaeger" @@ -256,12 +253,7 @@ func main() { log.FromContext(ctx).Fatalf("failed to connect to registry: %+v", err) } - registryClient := registrychain.NewNetworkServiceEndpointRegistryClient( - registryinterpose.NewNetworkServiceEndpointRegistryClient(), - registryrefresh.NewNetworkServiceEndpointRegistryClient(), - registrysendfd.NewNetworkServiceEndpointRegistryClient(), - registryapi.NewNetworkServiceEndpointRegistryClient(registryCC), - ) + registryClient := registryclient.NewNetworkServiceEndpointRegistryInterposeClient(ctx, registryCC) _, err = registryClient.Register(ctx, ®istryapi.NetworkServiceEndpoint{ Name: config.Name, NetworkServiceNames: []string{config.NSName}, diff --git a/suite_setup_test.go b/suite_setup_test.go index 0e6a490b..602df8a1 100644 --- a/suite_setup_test.go +++ b/suite_setup_test.go @@ -129,7 +129,7 @@ func (f *ForwarderTestSuite) SetupSuite() { memrg := memory.NewNetworkServiceEndpointRegistryServer() registryServer := registrychain.NewNetworkServiceEndpointRegistryServer( setid.NewNetworkServiceEndpointRegistryServer(), - expire.NewNetworkServiceEndpointRegistryServer(24*time.Hour), + expire.NewNetworkServiceEndpointRegistryServer(f.ctx, 24*time.Hour), registryrecvfd.NewNetworkServiceEndpointRegistryServer(), memrg, )