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