blob: 1b1dad531822dd384a57022263957a78e50d8807 [file] [log] [blame]
Jian Li485a2cd2017-07-18 18:16:38 +09001syntax="proto3";
2option java_package = "org.onosproject.grpc.nb.net.device";
3
4package nb.net.device;
5
6import "net/DeviceProto.proto";
7import "net/device/DeviceEnumsProto.proto";
8import "net/device/PortStatisticsProto.proto";
9import "net/PortProto.proto";
10import "net/ConnectPointProto.proto";
11
12message getDeviceCountRequest {
13}
14
15message getDeviceCountReply {
16 int32 device_count = 1;
17}
18
19message getDevicesRequest {
20}
21
22message getDevicesReply {
23 repeated .net.DeviceProto device = 1;
24}
25
26message getAvailableDevicesReply {
27 repeated .net.DeviceProto device = 1;
28}
29
30message getAvailableDevicesRequest {
31 .net.device.DeviceTypeProto type = 1;
32}
33
34message getDeviceRequest {
35 string device_id = 1;
36}
37
38message getDeviceReply {
39 .net.DeviceProto device = 1;
40}
41
42message getRoleRequest {
43 string device_id = 1;
44}
45
46message getRoleReply {
47 .net.device.MastershipRoleProto role = 1;
48}
49
50message getPortsRequest {
51 string device_id = 1;
52}
53
54message getPortsReply {
55 repeated .net.PortProto port = 1;
56}
57
58message getPortStatisticsRequest {
59 string device_id = 1;
60}
61
62message getPortStatisticsReply {
63 repeated .net.device.PortStatisticsProto port_statistics = 1;
64}
65
66message getPortDeltaStatisticsRequest {
67 string device_id = 1;
68}
69
70message getPortDeltaStatisticsReply {
71 repeated .net.device.PortStatisticsProto port_statistics = 1;
72}
73
74message getStatisticsForPortRequest {
75 string device_id = 1;
76 uint64 port_number = 2;
77}
78
79message getStatisticsForPortReply {
80 .net.device.PortStatisticsProto port_statistics = 1;
81}
82
83message getDeltaStatisticsForPortRequest {
84 string device_id = 1;
85 uint64 port_number = 2;
86}
87
88message getDeltaStatisticsForPortReply {
89 .net.device.PortStatisticsProto port_statistics = 1;
90}
91
92message getPortRequest {
93 .net.ConnectPointProto connect_point = 1;
94}
95
96message getPortReply {
97 .net.PortProto port = 1;
98}
99
100message isAvailableRequest {
101 string device_id = 1;
102}
103
104message isAvailableReply {
105 bool is_available = 1;
106}
107
108message localStatusRequest {
109 string device_id = 1;
110}
111
112message localStatusReply {
113 string status = 1;
114}
115
116service 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}