aboutsummaryrefslogtreecommitdiffstats
path: root/internal/pkg/nfnNotify/proto/nfn.proto
diff options
context:
space:
mode:
authorRitu Sood <ritu.sood@intel.com>2019-09-27 12:33:48 -0700
committerRitu Sood <ritu.sood@intel.com>2019-09-29 06:48:00 -0700
commit53279580afc48c90cbd28ab61799d9e81e41fffa (patch)
tree0d39c0b0531a1d1d0e0387b99f5130bb85406cf3 /internal/pkg/nfnNotify/proto/nfn.proto
parenteae13a54dbdc442a450992f6c4811037ab30daab (diff)
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 <ritu.sood@intel.com>
Diffstat (limited to 'internal/pkg/nfnNotify/proto/nfn.proto')
-rw-r--r--internal/pkg/nfnNotify/proto/nfn.proto44
1 files changed, 44 insertions, 0 deletions
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