Jian Li | 485a2cd | 2017-07-18 18:16:38 +0900 | [diff] [blame] | 1 | syntax="proto3"; |
| 2 | option java_package = "org.onosproject.grpc.nb.net.device"; |
| 3 | |
| 4 | package nb.net.device; |
| 5 | |
| 6 | import "net/DeviceProto.proto"; |
| 7 | import "net/device/DeviceEnumsProto.proto"; |
Jian Li | d8e7207 | 2017-11-21 10:50:02 +0900 | [diff] [blame] | 8 | import "net/MastershipRoleProto.proto"; |
Jian Li | 485a2cd | 2017-07-18 18:16:38 +0900 | [diff] [blame] | 9 | import "net/device/PortStatisticsProto.proto"; |
| 10 | import "net/PortProto.proto"; |
| 11 | import "net/ConnectPointProto.proto"; |
| 12 | |
| 13 | message getDeviceCountRequest { |
| 14 | } |
| 15 | |
| 16 | message getDeviceCountReply { |
| 17 | int32 device_count = 1; |
| 18 | } |
| 19 | |
| 20 | message getDevicesRequest { |
| 21 | } |
| 22 | |
| 23 | message getDevicesReply { |
| 24 | repeated .net.DeviceProto device = 1; |
| 25 | } |
| 26 | |
| 27 | message getAvailableDevicesReply { |
| 28 | repeated .net.DeviceProto device = 1; |
| 29 | } |
| 30 | |
| 31 | message getAvailableDevicesRequest { |
| 32 | .net.device.DeviceTypeProto type = 1; |
| 33 | } |
| 34 | |
| 35 | message getDeviceRequest { |
| 36 | string device_id = 1; |
| 37 | } |
| 38 | |
| 39 | message getDeviceReply { |
| 40 | .net.DeviceProto device = 1; |
| 41 | } |
| 42 | |
| 43 | message getRoleRequest { |
| 44 | string device_id = 1; |
| 45 | } |
| 46 | |
| 47 | message getRoleReply { |
Jian Li | d8e7207 | 2017-11-21 10:50:02 +0900 | [diff] [blame] | 48 | .net.MastershipRoleProto role = 1; |
Jian Li | 485a2cd | 2017-07-18 18:16:38 +0900 | [diff] [blame] | 49 | } |
| 50 | |
| 51 | message getPortsRequest { |
| 52 | string device_id = 1; |
| 53 | } |
| 54 | |
| 55 | message getPortsReply { |
| 56 | repeated .net.PortProto port = 1; |
| 57 | } |
| 58 | |
| 59 | message getPortStatisticsRequest { |
| 60 | string device_id = 1; |
| 61 | } |
| 62 | |
| 63 | message getPortStatisticsReply { |
| 64 | repeated .net.device.PortStatisticsProto port_statistics = 1; |
| 65 | } |
| 66 | |
| 67 | message getPortDeltaStatisticsRequest { |
| 68 | string device_id = 1; |
| 69 | } |
| 70 | |
| 71 | message getPortDeltaStatisticsReply { |
| 72 | repeated .net.device.PortStatisticsProto port_statistics = 1; |
| 73 | } |
| 74 | |
| 75 | message getStatisticsForPortRequest { |
| 76 | string device_id = 1; |
| 77 | uint64 port_number = 2; |
| 78 | } |
| 79 | |
| 80 | message getStatisticsForPortReply { |
| 81 | .net.device.PortStatisticsProto port_statistics = 1; |
| 82 | } |
| 83 | |
| 84 | message getDeltaStatisticsForPortRequest { |
| 85 | string device_id = 1; |
| 86 | uint64 port_number = 2; |
| 87 | } |
| 88 | |
| 89 | message getDeltaStatisticsForPortReply { |
| 90 | .net.device.PortStatisticsProto port_statistics = 1; |
| 91 | } |
| 92 | |
| 93 | message getPortRequest { |
| 94 | .net.ConnectPointProto connect_point = 1; |
| 95 | } |
| 96 | |
| 97 | message getPortReply { |
| 98 | .net.PortProto port = 1; |
| 99 | } |
| 100 | |
| 101 | message isAvailableRequest { |
| 102 | string device_id = 1; |
| 103 | } |
| 104 | |
| 105 | message isAvailableReply { |
| 106 | bool is_available = 1; |
| 107 | } |
| 108 | |
| 109 | message localStatusRequest { |
| 110 | string device_id = 1; |
| 111 | } |
| 112 | |
| 113 | message localStatusReply { |
| 114 | string status = 1; |
| 115 | } |
| 116 | |
| 117 | service DeviceService { |
| 118 | rpc getDeviceCount(getDeviceCountRequest) returns (getDeviceCountReply) {} |
| 119 | rpc getDevices(getDevicesRequest) returns (getDevicesReply) {} |
| 120 | rpc getAvailableDevices(getAvailableDevicesRequest) returns (getAvailableDevicesReply) {} |
| 121 | rpc getDevice(getDeviceRequest) returns (getDeviceReply) {} |
| 122 | rpc getRole(getRoleRequest) returns (getRoleReply) {} |
| 123 | rpc getPorts(getPortsRequest) returns (getPortsReply) {} |
| 124 | rpc getPortStatistics(getPortStatisticsRequest) returns (getPortStatisticsReply) {} |
| 125 | rpc getPortDeltaStatistics(getPortDeltaStatisticsRequest) |
| 126 | returns (getPortDeltaStatisticsReply) {} |
| 127 | rpc getStatisticsForPort(getStatisticsForPortRequest) |
| 128 | returns (getStatisticsForPortReply) {} |
| 129 | rpc getDeltaStatisticsForPort(getDeltaStatisticsForPortRequest) |
| 130 | returns (getDeltaStatisticsForPortReply) {} |
| 131 | rpc getPort(getPortRequest) returns (getPortReply) {} |
| 132 | rpc isAvailable(isAvailableRequest) returns (isAvailableReply) {} |
| 133 | rpc localStatus(localStatusRequest) returns (localStatusReply) {} |
| 134 | } |