blob: 8f33a850528f98d9ebe0f627f2cd74a688f7fc26 [file] [log] [blame]
David K. Bainbridge24ff0232019-04-30 13:26:19 -07001syntax = "proto3";
2
3option go_package = "github.com/opencord/voltha-protos/go/inter_container";
4
5import "google/protobuf/any.proto";
6import "voltha_protos/openflow_13.proto";
7import public "voltha_protos/logical_device.proto";
8
9package 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;
50 string key_topic = 5;
51 int64 timestamp = 6;
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 ONU_IND_REQUEST = 6;
101 ONU_IND_RESPONSE = 7;
102 TECH_PROFILE_DOWNLOAD_REQUEST = 8;
103 }
104}
105
106message InterAdapterHeader {
107 string id = 1;
108 InterAdapterMessageType.Types type = 2;
109 string from_topic = 3;
110 string to_topic = 4;
111 string to_device_id = 5;
112 string proxy_device_id = 6;
113 int64 timestamp = 7;
114}
115
116message InterAdapterOmciMessage {
117 bytes message = 1; // OMCI_REQUEST or OMCI_RESPONSE
118}
119
120message InterAdapterTechProfileDownloadMessage {
121 uint32 uni_id = 1;
122 string path = 2;
123}
124
125message InterAdapterResponseBody {
126 bool status = 1;
127 oneof payload {
128 google.protobuf.Any body = 2;
129 InterAdapterOmciMessage omci = 3; // OMCI_REQUEST or OMCI_RESPONSE
130 }
131}
132
133message InterAdapterMessage {
134 InterAdapterHeader header = 1;
135 google.protobuf.Any body = 2;
136}