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