blob: eb9c0088402543284aad3563cd92f7ea61f70ca0 [file] [log] [blame]
Zack Williams52209662019-02-07 10:15:31 -07001syntax = "proto3";
2
Scott Baker383964b2019-11-01 14:26:07 -07003option go_package = "github.com/opencord/voltha-protos/v2/go/inter_container";
William Kurkianad745652019-03-20 08:45:51 -04004
Mahir Gunyel4b0dab22019-05-16 13:56:09 -07005import public "voltha_protos/common.proto";
6import public "voltha_protos/voltha.proto";
Zack Williams52209662019-02-07 10:15:31 -07007import "google/protobuf/any.proto";
8import "voltha_protos/openflow_13.proto";
9import public "voltha_protos/logical_device.proto";
10
Zack Williams52209662019-02-07 10:15:31 -070011package voltha;
12
13message StrType {
14 string val = 1;
15}
16
17message IntType {
18 int64 val = 1;
19}
20
21message BoolType {
22 bool val = 1;
23}
24
25message Packet {
26 bytes payload = 1;
27}
28
29message ErrorCode {
30 enum codes {
31 UNSUPPORTED_REQUEST = 0;
32 INVALID_PARAMETERS = 1;
33 }
34}
35
36message Error {
37 ErrorCode code = 1;
38 string reason = 2;
39}
40
41enum MessageType {
42 REQUEST = 0;
43 RESPONSE = 1;
44 DEVICE_DISCOVERED=2;
45}
46
47message Header {
48 string id = 1;
49 MessageType type = 2;
50 string from_topic = 3;
51 string to_topic = 4;
William Kurkian6ea97f82019-03-13 15:51:55 -040052 string key_topic = 5;
53 int64 timestamp = 6;
Zack Williams52209662019-02-07 10:15:31 -070054}
55
56message Argument {
57 string key = 1;
58 google.protobuf.Any value = 2;
59}
60
61message InterContainerMessage {
62 Header header = 1;
63 google.protobuf.Any body = 2;
64}
65
66message InterContainerRequestBody {
67 string rpc = 2;
68 repeated Argument args = 3;
69 bool response_required = 4;
70 string reply_to_topic = 5;
71}
72
73message InterContainerResponseBody {
74 bool success = 1;
75 google.protobuf.Any result = 3;
76}
77
78message SwitchCapability {
79 openflow_13.ofp_desc desc = 1;
80 openflow_13.ofp_switch_features switch_features = 2;
81}
82
83message PortCapability {
84 LogicalPort port = 1;
85}
86
87message DeviceDiscovered {
88 string id = 1;
89 string parent_id = 2;
90 string device_type = 3;
91 string publisher = 4;
92}
93
94message InterAdapterMessageType {
95 enum Types {
96 FLOW_REQUEST = 0;
97 FLOW_RESPONSE = 1;
98 OMCI_REQUEST = 2;
99 OMCI_RESPONSE = 3;
100 METRICS_REQUEST = 4;
101 METRICS_RESPONSE = 5;
Matt Jeanneret909d7dc2019-03-08 17:21:09 -0500102 ONU_IND_REQUEST = 6;
103 ONU_IND_RESPONSE = 7;
Matt Jeanneret15249fa2019-04-12 20:25:31 -0400104 TECH_PROFILE_DOWNLOAD_REQUEST = 8;
Girish Gowdra475e63e2019-11-20 16:42:59 +0530105 DELETE_GEM_PORT_REQUEST = 9;
106 DELETE_TCONT_REQUEST = 10;
Zack Williams52209662019-02-07 10:15:31 -0700107 }
108}
109
110message InterAdapterHeader {
111 string id = 1;
112 InterAdapterMessageType.Types type = 2;
113 string from_topic = 3;
114 string to_topic = 4;
115 string to_device_id = 5;
116 string proxy_device_id = 6;
117 int64 timestamp = 7;
118}
119
120message InterAdapterOmciMessage {
121 bytes message = 1; // OMCI_REQUEST or OMCI_RESPONSE
Mahir Gunyel4b0dab22019-05-16 13:56:09 -0700122 common.ConnectStatus.ConnectStatus connect_status = 2;
123 voltha.Device.ProxyAddress proxy_address = 3;
Zack Williams52209662019-02-07 10:15:31 -0700124}
125
Matt Jeanneret15249fa2019-04-12 20:25:31 -0400126message InterAdapterTechProfileDownloadMessage {
127 uint32 uni_id = 1;
128 string path = 2;
129}
130
Girish Gowdra475e63e2019-11-20 16:42:59 +0530131message InterAdapterDeleteGemPortMessage {
132 uint32 uni_id = 1;
133 string tp_path = 2;
134 uint32 gem_port_id = 3;
135}
136
137message InterAdapterDeleteTcontMessage {
138 uint32 uni_id = 1;
139 string tp_path = 2;
140 uint32 alloc_id = 3;
141}
142
Zack Williams52209662019-02-07 10:15:31 -0700143message InterAdapterResponseBody {
144 bool status = 1;
145 oneof payload {
146 google.protobuf.Any body = 2;
147 InterAdapterOmciMessage omci = 3; // OMCI_REQUEST or OMCI_RESPONSE
148 }
149}
150
151message InterAdapterMessage {
152 InterAdapterHeader header = 1;
153 google.protobuf.Any body = 2;
154}