khenaidoo | abad44c | 2018-08-03 16:58:35 -0400 | [diff] [blame] | 1 | syntax = "proto3"; |
| 2 | |
William Kurkian | daa6bb2 | 2019-03-07 12:26:28 -0500 | [diff] [blame] | 3 | option go_package = "github.com/opencord/voltha-protos/go/voltha"; |
khenaidoo | abad44c | 2018-08-03 16:58:35 -0400 | [diff] [blame] | 4 | |
| 5 | package voltha; |
| 6 | |
| 7 | import "google/protobuf/empty.proto"; |
| 8 | import "openflow_13.proto"; |
| 9 | |
| 10 | |
khenaidoo | b920354 | 2018-09-17 22:56:37 -0400 | [diff] [blame] | 11 | message PonSimOnuDeviceInfo { |
| 12 | int32 uni_port = 1; |
| 13 | string serial_number = 2; |
| 14 | } |
| 15 | |
khenaidoo | abad44c | 2018-08-03 16:58:35 -0400 | [diff] [blame] | 16 | message PonSimDeviceInfo { |
| 17 | int32 nni_port = 1; |
khenaidoo | b920354 | 2018-09-17 22:56:37 -0400 | [diff] [blame] | 18 | repeated PonSimOnuDeviceInfo onus = 2; |
khenaidoo | abad44c | 2018-08-03 16:58:35 -0400 | [diff] [blame] | 19 | } |
| 20 | |
| 21 | message FlowTable { |
| 22 | int32 port = 1; // Used to address right device |
| 23 | repeated openflow_13.ofp_flow_stats flows = 2; |
| 24 | } |
| 25 | |
| 26 | message PonSimFrame { |
| 27 | string id = 1; |
| 28 | bytes payload = 2; |
khenaidoo | b920354 | 2018-09-17 22:56:37 -0400 | [diff] [blame] | 29 | int32 out_port = 3; |
khenaidoo | abad44c | 2018-08-03 16:58:35 -0400 | [diff] [blame] | 30 | } |
| 31 | |
| 32 | message PonSimPacketCounter { |
| 33 | string name = 1; |
| 34 | int64 value = 2; |
| 35 | } |
| 36 | |
| 37 | message PonSimPortMetrics { |
| 38 | string port_name = 1; |
| 39 | repeated PonSimPacketCounter packets = 2; |
| 40 | } |
| 41 | |
| 42 | message PonSimMetrics { |
| 43 | string device = 1; |
| 44 | repeated PonSimPortMetrics metrics = 2; |
| 45 | } |
| 46 | |
khenaidoo | 91ecfd6 | 2018-11-04 17:13:42 -0500 | [diff] [blame] | 47 | message PonSimMetricsRequest { |
| 48 | int32 port = 1; |
| 49 | } |
| 50 | |
khenaidoo | abad44c | 2018-08-03 16:58:35 -0400 | [diff] [blame] | 51 | service PonSim { |
| 52 | rpc SendFrame(PonSimFrame) |
| 53 | returns (google.protobuf.Empty) {} |
| 54 | |
| 55 | rpc ReceiveFrames(google.protobuf.Empty) |
| 56 | returns (stream PonSimFrame) {} |
| 57 | |
| 58 | rpc GetDeviceInfo(google.protobuf.Empty) |
| 59 | returns(PonSimDeviceInfo) {} |
| 60 | |
| 61 | rpc UpdateFlowTable(FlowTable) |
| 62 | returns(google.protobuf.Empty) {} |
| 63 | |
| 64 | rpc GetStats(google.protobuf.Empty) |
| 65 | returns(PonSimMetrics) {} |
| 66 | |
| 67 | } |