blob: 8e160ce4cb863526a1bfc273017d888b4bd6ed7e [file] [log] [blame]
Zack Williams52209662019-02-07 10:15:31 -07001syntax = "proto3";
2
3import "google/protobuf/any.proto";
4import "voltha_protos/openflow_13.proto";
5import public "voltha_protos/logical_device.proto";
6
7
8option go_package = "github.com/opencord/voltha-go/protos/inter_container";
9
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
24message Packet {
25 bytes payload = 1;
26}
27
28message ErrorCode {
29 enum codes {
30 UNSUPPORTED_REQUEST = 0;
31 INVALID_PARAMETERS = 1;
32 }
33}
34
35message Error {
36 ErrorCode code = 1;
37 string reason = 2;
38}
39
40enum MessageType {
41 REQUEST = 0;
42 RESPONSE = 1;
43 DEVICE_DISCOVERED=2;
44}
45
46message Header {
47 string id = 1;
48 MessageType type = 2;
49 string from_topic = 3;
50 string to_topic = 4;
51 int64 timestamp = 5;
52}
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;
100 }
101}
102
103message InterAdapterHeader {
104 string id = 1;
105 InterAdapterMessageType.Types type = 2;
106 string from_topic = 3;
107 string to_topic = 4;
108 string to_device_id = 5;
109 string proxy_device_id = 6;
110 int64 timestamp = 7;
111}
112
113message InterAdapterOmciMessage {
114 bytes message = 1; // OMCI_REQUEST or OMCI_RESPONSE
115}
116
117message InterAdapterResponseBody {
118 bool status = 1;
119 oneof payload {
120 google.protobuf.Any body = 2;
121 InterAdapterOmciMessage omci = 3; // OMCI_REQUEST or OMCI_RESPONSE
122 }
123}
124
125message InterAdapterMessage {
126 InterAdapterHeader header = 1;
127 google.protobuf.Any body = 2;
128}