From 53279580afc48c90cbd28ab61799d9e81e41fffa Mon Sep 17 00:00:00 2001 From: Ritu Sood Date: Fri, 27 Sep 2019 12:33:48 -0700 Subject: Adding gRPC proto and server gRPC server is required to send updates to nfn-agent running on all the nodes in the cluster, to setup provider networks as defined in the provider network CR. This patch includes proto file and generated code along with gRPC server code Change-Id: I891629d84932ae662ba7545ebfe4d9921448fdc1 Signed-off-by: Ritu Sood --- internal/pkg/nfnNotify/proto/nfn.proto | 44 ++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 internal/pkg/nfnNotify/proto/nfn.proto (limited to 'internal/pkg/nfnNotify/proto/nfn.proto') diff --git a/internal/pkg/nfnNotify/proto/nfn.proto b/internal/pkg/nfnNotify/proto/nfn.proto new file mode 100644 index 0000000..85e2131 --- /dev/null +++ b/internal/pkg/nfnNotify/proto/nfn.proto @@ -0,0 +1,44 @@ +// +// nfn.proto +// +// Example that implements push notification from grpc server to client +// +syntax = "proto3"; + +service nfnNotify { + rpc Subscribe (SubscribeContext) returns (stream Notification); +} + +message SubscribeContext { + string node_name = 1; +} + +message Notification { + string cni_type = 1; + oneof payload { + InSync in_sync = 2; + ProviderNetworkCreate provider_nw_create = 3; + ProviderNetworkRemove provider_nw_remove = 4; + } +} + +message ProviderNetworkCreate { + string provider_nw_name = 1; + VlanInfo vlan = 2; + // Add other types supported here beyond vlan +} + +message ProviderNetworkRemove { + string provider_nw_name = 1; + string vlan_logical_intf = 2; + // Add other types supported here +} + +message VlanInfo { + string vlan_id = 1; + string provider_intf = 2; + string logical_intf = 3; +} + +message InSync { +} \ No newline at end of file -- cgit 1.2.3-korg