HIGUCHI Yuta | 15653fd | 2015-11-09 11:05:09 -0800 | [diff] [blame] | 1 | syntax = "proto3"; |
HIGUCHI Yuta | e3e9063 | 2016-05-11 16:44:01 -0700 | [diff] [blame] | 2 | option java_package = "org.onosproject.grpc.net"; |
HIGUCHI Yuta | 15653fd | 2015-11-09 11:05:09 -0800 | [diff] [blame] | 3 | |
| 4 | package Port; |
| 5 | |
| 6 | enum PortType { |
| 7 | // Signifies copper-based connectivity. |
| 8 | COPPER = 0; |
| 9 | // Signifies optical fiber-based connectivity. |
| 10 | FIBER = 1; |
| 11 | // Signifies optical fiber-based packet port. |
| 12 | PACKET = 2; |
| 13 | // Signifies optical fiber-based optical tributary port (called T-port). |
| 14 | //The signal from the client side will be formed into a ITU G.709 (OTN) frame. |
| 15 | ODUCLT = 3; |
| 16 | // Signifies optical fiber-based Line-side port (called L-port). |
| 17 | OCH = 4; |
| 18 | // Signifies optical fiber-based WDM port (called W-port). |
| 19 | //Optical Multiplexing Section (See ITU G.709). |
| 20 | OMS = 5; |
| 21 | // Signifies virtual port. |
| 22 | VIRTUAL = 6; |
| 23 | } |
| 24 | |
HIGUCHI Yuta | 15653fd | 2015-11-09 11:05:09 -0800 | [diff] [blame] | 25 | message PortDescription { |
| 26 | // PortNumber as String PortNumber#toString |
| 27 | string port_number = 1; |
| 28 | bool is_enabled = 2; |
| 29 | PortType type = 3; |
| 30 | int64 port_speed = 4; |
| 31 | map<string, string> annotations = 8; |
| 32 | } |
| 33 | |
Shravan Ambati | bb6b445 | 2016-05-04 13:25:28 -0700 | [diff] [blame] | 34 | // Corresponds to org.onosproject.net.Port. |
| 35 | message PortCore { |
| 36 | string port_number = 1; |
| 37 | bool is_enabled = 2; |
| 38 | PortType type = 3; |
| 39 | int64 port_speed = 4; |
| 40 | map<string, string> annotations = 5; |
| 41 | } |
| 42 | |
HIGUCHI Yuta | 15653fd | 2015-11-09 11:05:09 -0800 | [diff] [blame] | 43 | message PortStatistics { |
| 44 | int32 port = 1; |
| 45 | int64 packets_received = 2; |
| 46 | int64 packets_sent = 3; |
| 47 | // TODO add all other fields |
| 48 | } |