From d73d0dbebb00f2c338d81868bbbd2818c160ab3d Mon Sep 17 00:00:00 2001 From: Nikita Skrynnik Date: Tue, 5 Jul 2022 17:51:09 +1100 Subject: [PATCH 1/5] add metadata Signed-off-by: Nikita Skrynnik --- go.mod | 1 + internal/imports/imports_linux.go | 1 + main.go | 2 ++ 3 files changed, 4 insertions(+) diff --git a/go.mod b/go.mod index 1cdcdc4..bcba9b8 100644 --- a/go.mod +++ b/go.mod @@ -3,6 +3,7 @@ module github.com/networkservicemesh/cmd-nsc-init go 1.18 require ( + cloud.google.com/go v0.34.0 github.com/antonfisher/nested-logrus-formatter v1.3.1 github.com/edwarnicke/grpcfd v1.1.2 github.com/kelseyhightower/envconfig v1.4.0 diff --git a/internal/imports/imports_linux.go b/internal/imports/imports_linux.go index 85c4315..37e9bbf 100644 --- a/internal/imports/imports_linux.go +++ b/internal/imports/imports_linux.go @@ -2,6 +2,7 @@ package imports import ( + _ "cloud.google.com/go/compute/metadata" _ "context" _ "crypto/tls" _ "fmt" diff --git a/main.go b/main.go index 48756cf..7f67f62 100644 --- a/main.go +++ b/main.go @@ -27,6 +27,7 @@ import ( "os/signal" "syscall" + "cloud.google.com/go/compute/metadata" nested "github.com/antonfisher/nested-logrus-formatter" "github.com/edwarnicke/grpcfd" "github.com/kelseyhightower/envconfig" @@ -166,6 +167,7 @@ func main() { nsmClient := chain.NewNetworkServiceClient( updatepath.NewClient(rootConf.Name), begin.NewClient(), + metadata.NewClient(), clientinfo.NewClient(), sriovtoken.NewClient(), mechanisms.NewClient(map[string]networkservice.NetworkServiceClient{ From 97787cbfcc15ad231f8f2e85f554e7ef5d1bd365 Mon Sep 17 00:00:00 2001 From: Nikita Skrynnik Date: Tue, 5 Jul 2022 17:55:19 +1100 Subject: [PATCH 2/5] fix ci Signed-off-by: Nikita Skrynnik --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 7f67f62..2e32f17 100644 --- a/main.go +++ b/main.go @@ -27,7 +27,6 @@ import ( "os/signal" "syscall" - "cloud.google.com/go/compute/metadata" nested "github.com/antonfisher/nested-logrus-formatter" "github.com/edwarnicke/grpcfd" "github.com/kelseyhightower/envconfig" @@ -54,6 +53,7 @@ import ( "github.com/networkservicemesh/sdk/pkg/networkservice/common/updatepath" "github.com/networkservicemesh/sdk/pkg/networkservice/connectioncontext/dnscontext" "github.com/networkservicemesh/sdk/pkg/networkservice/core/chain" + "github.com/networkservicemesh/sdk/pkg/networkservice/utils/metadata" "github.com/networkservicemesh/sdk/pkg/tools/grpcutils" "github.com/networkservicemesh/sdk/pkg/tools/log" "github.com/networkservicemesh/sdk/pkg/tools/log/logruslogger" From f392c0bbe1e6e2632a11e5ee64424a7f19e7fc84 Mon Sep 17 00:00:00 2001 From: Nikita Skrynnik Date: Tue, 5 Jul 2022 17:56:55 +1100 Subject: [PATCH 3/5] run go generate Signed-off-by: Nikita Skrynnik --- internal/imports/imports_linux.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/imports/imports_linux.go b/internal/imports/imports_linux.go index 37e9bbf..a9e6aed 100644 --- a/internal/imports/imports_linux.go +++ b/internal/imports/imports_linux.go @@ -2,7 +2,6 @@ package imports import ( - _ "cloud.google.com/go/compute/metadata" _ "context" _ "crypto/tls" _ "fmt" @@ -25,6 +24,7 @@ import ( _ "github.com/networkservicemesh/sdk/pkg/networkservice/common/updatepath" _ "github.com/networkservicemesh/sdk/pkg/networkservice/connectioncontext/dnscontext" _ "github.com/networkservicemesh/sdk/pkg/networkservice/core/chain" + _ "github.com/networkservicemesh/sdk/pkg/networkservice/utils/metadata" _ "github.com/networkservicemesh/sdk/pkg/tools/awarenessgroups" _ "github.com/networkservicemesh/sdk/pkg/tools/grpcutils" _ "github.com/networkservicemesh/sdk/pkg/tools/log" From e1c29434c479fdf6e76c1961c04104fc1b9f4e79 Mon Sep 17 00:00:00 2001 From: Nikita Skrynnik Date: Tue, 5 Jul 2022 18:00:46 +1100 Subject: [PATCH 4/5] run go mod tidy Signed-off-by: Nikita Skrynnik --- go.mod | 1 - internal/imports/gen.go | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/go.mod b/go.mod index bcba9b8..1cdcdc4 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,6 @@ module github.com/networkservicemesh/cmd-nsc-init go 1.18 require ( - cloud.google.com/go v0.34.0 github.com/antonfisher/nested-logrus-formatter v1.3.1 github.com/edwarnicke/grpcfd v1.1.2 github.com/kelseyhightower/envconfig v1.4.0 diff --git a/internal/imports/gen.go b/internal/imports/gen.go index 3caf9aa..7b7bd2d 100644 --- a/internal/imports/gen.go +++ b/internal/imports/gen.go @@ -19,4 +19,4 @@ package imports //go:generate bash -c "cd $(mktemp -d) && GO111MODULE=on go install github.com/edwarnicke/imports-gen@v1.1.1" -//go:generate bash -c "GOOS=linux ${GOPATH}/bin/imports-gen" +//go:generate bash -c "GOOS=linux imports-gen" From 00da28eb8c51665e8e9188e8708bfa18a515a107 Mon Sep 17 00:00:00 2001 From: Nikita Skrynnik Date: Tue, 5 Jul 2022 18:03:09 +1100 Subject: [PATCH 5/5] fix ci Signed-off-by: Nikita Skrynnik --- internal/imports/gen.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/imports/gen.go b/internal/imports/gen.go index 7b7bd2d..3caf9aa 100644 --- a/internal/imports/gen.go +++ b/internal/imports/gen.go @@ -19,4 +19,4 @@ package imports //go:generate bash -c "cd $(mktemp -d) && GO111MODULE=on go install github.com/edwarnicke/imports-gen@v1.1.1" -//go:generate bash -c "GOOS=linux imports-gen" +//go:generate bash -c "GOOS=linux ${GOPATH}/bin/imports-gen"