blob: 1c55d0c010dd9861652154085f10552c7a90c1f9 [file] [log] [blame]
Zack Williams52209662019-02-07 10:15:31 -07001syntax = "proto3";
2
William Kurkianad745652019-03-20 08:45:51 -04003option go_package = "github.com/opencord/voltha-protos/go/inter_container";
4
Zack Williams52209662019-02-07 10:15:31 -07005import "google/protobuf/any.proto";
6import "voltha_protos/openflow_13.proto";
7import public "voltha_protos/logical_device.proto";
8
Zack Williams52209662019-02-07 10:15:31 -07009package voltha;
10
11message StrType {
12 string val = 1;
13}
14
15message IntType {
16 int64 val = 1;
17}
18
19message BoolType {
20 bool val = 1;
21}
22
23message Packet {
24 bytes payload = 1;
25}
26
27message ErrorCode {
28 enum codes {
29 UNSUPPORTED_REQUEST = 0;
30 INVALID_PARAMETERS = 1;
31 }
32}
33
34message Error {
35 ErrorCode code = 1;
36 string reason = 2;
37}
38
39enum MessageType {
40 REQUEST = 0;
41 RESPONSE = 1;
42 DEVICE_DISCOVERED=2;
43}
44
45message Header {
46 string id = 1;
47 MessageType type = 2;
48 string from_topic = 3;
49 string to_topic = 4;
William Kurkian6ea97f82019-03-13 15:51:55 -040050 string key_topic = 5;
51 int64 timestamp = 6;
Zack Williams52209662019-02-07 10:15:31 -070052}
53
54message Argument {
55 string key = 1;
56 google.protobuf.Any value = 2;
57}
58
59message InterContainerMessage {
60 Header header = 1;
61 google.protobuf.Any body = 2;
62}
63
64message InterContainerRequestBody {
65 string rpc = 2;
66 repeated Argument args = 3;
67 bool response_required = 4;
68 string reply_to_topic = 5;
69}
70
71message InterContainerResponseBody {
72 bool success = 1;
73 google.protobuf.Any result = 3;
74}
75
76message SwitchCapability {
77 openflow_13.ofp_desc desc = 1;
78 openflow_13.ofp_switch_features switch_features = 2;
79}
80
81message PortCapability {
82 LogicalPort port = 1;
83}
84
85message DeviceDiscovered {
86 string id = 1;
87 string parent_id = 2;
88 string device_type = 3;
89 string publisher = 4;
90}
91
92message InterAdapterMessageType {
93 enum Types {
94 FLOW_REQUEST = 0;
95 FLOW_RESPONSE = 1;
96 OMCI_REQUEST = 2;
97 OMCI_RESPONSE = 3;
98 METRICS_REQUEST = 4;
99 METRICS_RESPONSE = 5;
Matt Jeanneret909d7dc2019-03-08 17:21:09 -0500100 ONU_IND_REQUEST = 6;
101 ONU_IND_RESPONSE = 7;
Zack Williams52209662019-02-07 10:15:31 -0700102 }
103}
104
105message InterAdapterHeader {
106 string id = 1;
107 InterAdapterMessageType.Types type = 2;
108 string from_topic = 3;
109 string to_topic = 4;
110 string to_device_id = 5;
111 string proxy_device_id = 6;
112 int64 timestamp = 7;
113}
114
115message InterAdapterOmciMessage {
116 bytes message = 1; // OMCI_REQUEST or OMCI_RESPONSE
117}
118
119message InterAdapterResponseBody {
120 bool status = 1;
121 oneof payload {
122 google.protobuf.Any body = 2;
123 InterAdapterOmciMessage omci = 3; // OMCI_REQUEST or OMCI_RESPONSE
124 }
125}
126
127message InterAdapterMessage {
128 InterAdapterHeader header = 1;
129 google.protobuf.Any body = 2;
130}