Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolved ProbeController conflict by adding common protobuf #13

Merged
merged 2 commits into from
Dec 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
all: clean replication podmon volumeGroupSnapshot
all: clean common replication podmon volumeGroupSnapshot

########################################################################
## GOLANG ##
Expand Down Expand Up @@ -75,7 +75,7 @@ export PATH := $(shell pwd):$(PATH)

.PHONY: replication
replication: $(PROTOC) $(PROTOC_GEN_GO)
$(PWD)/$(PROTOC) -I $(PROTO_INCLUDE) --go_out="$@" --go_opt=paths=source_relative --go-grpc_out=require_unimplemented_servers=false:"$@" --go-grpc_opt=paths=source_relative --proto_path="$@" ./"$@"/"$@".proto
$(PWD)/$(PROTOC) -I $(PROTO_INCLUDE) -I ./common --go_out="$@" --go_opt=paths=source_relative --go-grpc_out=require_unimplemented_servers=false:"$@" --go-grpc_opt=paths=source_relative --proto_path="$@" ./"$@"/"$@".proto
(cd "$@"; go mod tidy; go build "$@".pb.go)

.PHONY: podmon
Expand All @@ -85,6 +85,11 @@ podmon: $(PROTOC) $(PROTOC_GEN_GO)

.PHONY: volumeGroupSnapshot
volumeGroupSnapshot: $(PROTOC) $(PROTOC_GEN_GO)
$(PWD)/$(PROTOC) -I $(PROTO_INCLUDE) -I ./common --go_out="$@" --go_opt=paths=source_relative --go-grpc_out=require_unimplemented_servers=false:"$@" --go-grpc_opt=paths=source_relative --proto_path="$@" ./"$@"/"$@".proto
(cd "$@"; go mod tidy; go build "$@".pb.go)

.PHONY: common
common: $(PROTOC) $(PROTOC_GEN_GO)
$(PWD)/$(PROTOC) -I $(PROTO_INCLUDE) --go_out="$@" --go_opt=paths=source_relative --go-grpc_out=require_unimplemented_servers=false:"$@" --go-grpc_opt=paths=source_relative --proto_path="$@" ./"$@"/"$@".proto
(cd "$@"; go mod tidy; go build "$@".pb.go)

Expand Down
246 changes: 246 additions & 0 deletions common/common.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions common/common.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
syntax = "proto3";
package common.v1;

import "google/protobuf/wrappers.proto";

option go_package = "github.com/dell/dell-csi-extensions/common";


message ProbeControllerRequest {
// Intentionally left empty
}

// Metadata about the driver
// for accepting the RPC calls
message ProbeControllerResponse {
// Name of the driver
string name = 1;

// Version of CSI driver
string vendor_version = 2;

map<string, string> manifest = 3;

.google.protobuf.BoolValue ready = 4;
}
5 changes: 5 additions & 0 deletions common/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module github.com/dell/dell-csi-extensions/common

go 1.16

require google.golang.org/protobuf v1.27.1
8 changes: 8 additions & 0 deletions common/go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ=
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
5 changes: 4 additions & 1 deletion replication/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ module github.com/dell/dell-csi-extensions/replication

go 1.16

replace github.com/dell/dell-csi-extensions/common v1.0.0 => ../common

require (
google.golang.org/grpc v1.38.0
github.com/dell/dell-csi-extensions/common v1.0.0
google.golang.org/grpc v1.42.0
google.golang.org/protobuf v1.27.1
)
Loading