blob: 24390f509fd58dc4b3b5293038e8064233a5730b [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
8option go_package = "github.com/opencord/voltha-go/protos/core_adapter";
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
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;
43}
44
45message Header {
46 string id = 1;
47 MessageType type = 2;
48 string from_topic = 3;
49 string to_topic = 4;
50 int64 timestamp = 5;
51}
52
53message Argument {
54 string key = 1;
55 google.protobuf.Any value = 2;
56}
57
58message InterContainerMessage {
59 Header header = 1;
60 google.protobuf.Any body = 2;
61}
62
63message InterContainerRequestBody {
64 string rpc = 2;
65 repeated Argument args = 3;
66 bool response_required = 4;
67 string reply_to_topic = 5;
68}
69
70message InterContainerResponseBody {
71 bool success = 1;
72 google.protobuf.Any result = 3;
73}
khenaidoob9203542018-09-17 22:56:37 -040074
75message SwitchCapability {
76 openflow_13.ofp_desc desc = 1;
77 openflow_13.ofp_switch_features switch_features = 2;
78}
79
80message PortCapability {
81 LogicalPort port = 1;
khenaidoo6fdf0ba2018-11-02 14:38:33 -040082}
83
84message InterAdapterMessageType {
85 enum Types {
86 FLOW_REQUEST = 0;
87 FLOW_RESPONSE = 1;
88 OMCI_REQUEST = 2;
89 OMCI_RESPONSE = 3;
90 METRICS_REQUEST = 4;
91 METRICS_RESPONSE = 5;
92 }
93}
94
95message InterAdapterHeader {
96 string id = 1;
97 InterAdapterMessageType.Types type = 2;
98 string from_topic = 3;
99 string to_topic = 4;
100 string to_device_id = 5;
101 string proxy_device_id = 6;
102 int64 timestamp = 7;
103}
104
105message InterAdapterResponseBody {
khenaidoo91ecfd62018-11-04 17:13:42 -0500106 bool status = 1;
107 google.protobuf.Any body = 2;
khenaidoo6fdf0ba2018-11-02 14:38:33 -0400108}
109
110message InterAdapterMessage {
111 InterAdapterHeader header = 1;
112 google.protobuf.Any body = 2;
khenaidoob9203542018-09-17 22:56:37 -0400113}