blob: 4d4ffe814b974d749877dae7d2a7a617bf6c911b [file] [log] [blame]
khenaidooabad44c2018-08-03 16:58:35 -04001syntax = "proto3";
2
3import "google/protobuf/any.proto";
khenaidoob9203542018-09-17 22:56:37 -04004import "openflow_13.proto";
5import public "logical_device.proto";
6
khenaidooabad44c2018-08-03 16:58:35 -04007
khenaidoo79232702018-12-04 11:00:41 -05008option go_package = "github.com/opencord/voltha-go/protos/inter_container";
khenaidooabad44c2018-08-03 16:58:35 -04009
10package voltha;
11
12message StrType {
13 string val = 1;
14}
15
16message IntType {
17 int64 val = 1;
18}
19
20message BoolType {
21 bool val = 1;
22}
23
khenaidoofdbad6e2018-11-06 22:26:38 -050024message Packet {
25 bytes payload = 1;
26}
27
28message ErrorCode {
29 enum codes {
khenaidoob9203542018-09-17 22:56:37 -040030 UNSUPPORTED_REQUEST = 0;
31 INVALID_PARAMETERS = 1;
khenaidoofdbad6e2018-11-06 22:26:38 -050032 }
khenaidoob9203542018-09-17 22:56:37 -040033}
34
khenaidooabad44c2018-08-03 16:58:35 -040035message Error {
khenaidoob9203542018-09-17 22:56:37 -040036 ErrorCode code = 1;
37 string reason = 2;
khenaidooabad44c2018-08-03 16:58:35 -040038}
39
40enum MessageType {
41 REQUEST = 0;
42 RESPONSE = 1;
khenaidoo79232702018-12-04 11:00:41 -050043 DEVICE_DISCOVERED=2;
khenaidooabad44c2018-08-03 16:58:35 -040044}
45
46message Header {
47 string id = 1;
48 MessageType type = 2;
49 string from_topic = 3;
50 string to_topic = 4;
khenaidoobdcb8e02019-03-06 16:28:56 -050051 string key_topic = 5;
52 int64 timestamp = 6;
khenaidooabad44c2018-08-03 16:58:35 -040053}
54
55message Argument {
56 string key = 1;
57 google.protobuf.Any value = 2;
58}
59
60message InterContainerMessage {
61 Header header = 1;
62 google.protobuf.Any body = 2;
63}
64
65message InterContainerRequestBody {
66 string rpc = 2;
67 repeated Argument args = 3;
68 bool response_required = 4;
69 string reply_to_topic = 5;
70}
71
72message InterContainerResponseBody {
73 bool success = 1;
74 google.protobuf.Any result = 3;
75}
khenaidoob9203542018-09-17 22:56:37 -040076
77message SwitchCapability {
78 openflow_13.ofp_desc desc = 1;
79 openflow_13.ofp_switch_features switch_features = 2;
80}
81
82message PortCapability {
83 LogicalPort port = 1;
khenaidoo6fdf0ba2018-11-02 14:38:33 -040084}
85
khenaidoo79232702018-12-04 11:00:41 -050086message DeviceDiscovered {
87 string id = 1;
88 string parent_id = 2;
89 string device_type = 3;
khenaidoo19374072018-12-11 11:05:15 -050090 string publisher = 4;
khenaidoo79232702018-12-04 11:00:41 -050091}
92
khenaidoo6fdf0ba2018-11-02 14:38:33 -040093message InterAdapterMessageType {
94 enum Types {
95 FLOW_REQUEST = 0;
96 FLOW_RESPONSE = 1;
97 OMCI_REQUEST = 2;
98 OMCI_RESPONSE = 3;
99 METRICS_REQUEST = 4;
100 METRICS_RESPONSE = 5;
101 }
102}
103
104message InterAdapterHeader {
105 string id = 1;
106 InterAdapterMessageType.Types type = 2;
107 string from_topic = 3;
108 string to_topic = 4;
109 string to_device_id = 5;
110 string proxy_device_id = 6;
111 int64 timestamp = 7;
112}
113
114message InterAdapterResponseBody {
khenaidoo91ecfd62018-11-04 17:13:42 -0500115 bool status = 1;
116 google.protobuf.Any body = 2;
khenaidoo6fdf0ba2018-11-02 14:38:33 -0400117}
118
119message InterAdapterMessage {
120 InterAdapterHeader header = 1;
121 google.protobuf.Any body = 2;
khenaidoob9203542018-09-17 22:56:37 -0400122}