Zsolt Haraszti | 656ecc6 | 2016-12-28 15:08:23 -0800 | [diff] [blame] | 1 | syntax = "proto3"; |
| 2 | |
| 3 | package voltha; |
| 4 | |
| 5 | import "google/protobuf/empty.proto"; |
| 6 | import "openflow_13.proto"; |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame^] | 7 | import "bbf_fiber_base.proto"; |
Zsolt Haraszti | 656ecc6 | 2016-12-28 15:08:23 -0800 | [diff] [blame] | 8 | |
| 9 | message PonSimDeviceInfo { |
| 10 | int32 nni_port = 1; |
| 11 | repeated int32 uni_ports = 2; |
| 12 | } |
| 13 | |
| 14 | message FlowTable { |
| 15 | int32 port = 1; // Used to address right device |
| 16 | repeated openflow_13.ofp_flow_stats flows = 2; |
| 17 | } |
| 18 | |
Sergio Slobodrian | 98eff41 | 2017-03-15 14:46:30 -0400 | [diff] [blame] | 19 | message PonSimPacketCounter { |
| 20 | string name = 1; |
| 21 | int64 value = 2; |
| 22 | } |
| 23 | |
| 24 | message PonSimPortMetrics { |
| 25 | string port_name = 1; |
| 26 | repeated PonSimPacketCounter packets = 2; |
| 27 | } |
| 28 | |
| 29 | message PonSimMetrics { |
| 30 | string device = 1; |
| 31 | repeated PonSimPortMetrics metrics = 2; |
| 32 | } |
| 33 | |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame^] | 34 | message InterfaceConfig |
| 35 | { |
| 36 | oneof interface_type |
| 37 | { |
| 38 | bbf_fiber.ChannelgroupConfig channel_group_config = 1; |
| 39 | bbf_fiber.ChannelpartitionConfig channel_partition_config = 2; |
| 40 | bbf_fiber.ChannelpairConfig channel_pair_config = 3; |
| 41 | bbf_fiber.ChannelterminationConfig channel_termination_config = 4; |
| 42 | bbf_fiber.OntaniConfig ont_ani_config = 5; |
| 43 | bbf_fiber.VOntaniConfig vont_ani_config = 6; |
| 44 | bbf_fiber.VEnetConfig venet_config = 7; |
| 45 | } |
| 46 | } |
Sergio Slobodrian | 98eff41 | 2017-03-15 14:46:30 -0400 | [diff] [blame] | 47 | |
Zsolt Haraszti | 656ecc6 | 2016-12-28 15:08:23 -0800 | [diff] [blame] | 48 | service PonSim { |
| 49 | |
| 50 | rpc GetDeviceInfo(google.protobuf.Empty) |
| 51 | returns(PonSimDeviceInfo) {} |
| 52 | |
| 53 | rpc UpdateFlowTable(FlowTable) |
| 54 | returns(google.protobuf.Empty) {} |
| 55 | |
Sergio Slobodrian | 98eff41 | 2017-03-15 14:46:30 -0400 | [diff] [blame] | 56 | rpc GetStats(google.protobuf.Empty) |
| 57 | returns(PonSimMetrics) {} |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame^] | 58 | |
| 59 | } |
| 60 | |
| 61 | service XPonSim |
| 62 | { |
| 63 | rpc CreateInterface(InterfaceConfig) |
| 64 | returns(google.protobuf.Empty) {} |
| 65 | |
| 66 | rpc UpdateInterface(InterfaceConfig) |
| 67 | returns(google.protobuf.Empty) {} |
| 68 | |
| 69 | rpc RemoveInterface(InterfaceConfig) |
| 70 | returns(google.protobuf.Empty) {} |
Zsolt Haraszti | 656ecc6 | 2016-12-28 15:08:23 -0800 | [diff] [blame] | 71 | } |