| /* |
| * Copyright 2017-present Open Networking Foundation |
| * |
| * Licensed under the Apache License, Version 2.0 (the "License"); |
| * you may not use this file except in compliance with the License. |
| * You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| syntax="proto3"; |
| option java_package = "org.onosproject.grpc.nb.net.device"; |
| |
| package nb.net.device; |
| |
| import "net/DeviceProto.proto"; |
| import "net/device/DeviceEnumsProto.proto"; |
| import "net/MastershipRoleProto.proto"; |
| import "net/device/PortStatisticsProto.proto"; |
| import "net/PortProto.proto"; |
| import "net/ConnectPointProto.proto"; |
| |
| message getDeviceCountRequest { |
| } |
| |
| message getDeviceCountReply { |
| int32 device_count = 1; |
| } |
| |
| message getDevicesRequest { |
| } |
| |
| message getDevicesReply { |
| repeated .net.DeviceProto device = 1; |
| } |
| |
| message getAvailableDevicesReply { |
| repeated .net.DeviceProto device = 1; |
| } |
| |
| message getAvailableDevicesRequest { |
| .net.device.DeviceTypeProto type = 1; |
| } |
| |
| message getDeviceRequest { |
| string device_id = 1; |
| } |
| |
| message getDeviceReply { |
| .net.DeviceProto device = 1; |
| } |
| |
| message getRoleRequest { |
| string device_id = 1; |
| } |
| |
| message getRoleReply { |
| .net.MastershipRoleProto role = 1; |
| } |
| |
| message getPortsRequest { |
| string device_id = 1; |
| } |
| |
| message getPortsReply { |
| repeated .net.PortProto port = 1; |
| } |
| |
| message getPortStatisticsRequest { |
| string device_id = 1; |
| } |
| |
| message getPortStatisticsReply { |
| repeated .net.device.PortStatisticsProto port_statistics = 1; |
| } |
| |
| message getPortDeltaStatisticsRequest { |
| string device_id = 1; |
| } |
| |
| message getPortDeltaStatisticsReply { |
| repeated .net.device.PortStatisticsProto port_statistics = 1; |
| } |
| |
| message getStatisticsForPortRequest { |
| string device_id = 1; |
| uint64 port_number = 2; |
| } |
| |
| message getStatisticsForPortReply { |
| .net.device.PortStatisticsProto port_statistics = 1; |
| } |
| |
| message getDeltaStatisticsForPortRequest { |
| string device_id = 1; |
| uint64 port_number = 2; |
| } |
| |
| message getDeltaStatisticsForPortReply { |
| .net.device.PortStatisticsProto port_statistics = 1; |
| } |
| |
| message getPortRequest { |
| .net.ConnectPointProto connect_point = 1; |
| } |
| |
| message getPortReply { |
| .net.PortProto port = 1; |
| } |
| |
| message isAvailableRequest { |
| string device_id = 1; |
| } |
| |
| message isAvailableReply { |
| bool is_available = 1; |
| } |
| |
| message localStatusRequest { |
| string device_id = 1; |
| } |
| |
| message localStatusReply { |
| string status = 1; |
| } |
| |
| service DeviceService { |
| rpc getDeviceCount(getDeviceCountRequest) returns (getDeviceCountReply) {} |
| rpc getDevices(getDevicesRequest) returns (getDevicesReply) {} |
| rpc getAvailableDevices(getAvailableDevicesRequest) returns (getAvailableDevicesReply) {} |
| rpc getDevice(getDeviceRequest) returns (getDeviceReply) {} |
| rpc getRole(getRoleRequest) returns (getRoleReply) {} |
| rpc getPorts(getPortsRequest) returns (getPortsReply) {} |
| rpc getPortStatistics(getPortStatisticsRequest) returns (getPortStatisticsReply) {} |
| rpc getPortDeltaStatistics(getPortDeltaStatisticsRequest) |
| returns (getPortDeltaStatisticsReply) {} |
| rpc getStatisticsForPort(getStatisticsForPortRequest) |
| returns (getStatisticsForPortReply) {} |
| rpc getDeltaStatisticsForPort(getDeltaStatisticsForPortRequest) |
| returns (getDeltaStatisticsForPortReply) {} |
| rpc getPort(getPortRequest) returns (getPortReply) {} |
| rpc isAvailable(isAvailableRequest) returns (isAvailableReply) {} |
| rpc localStatus(localStatusRequest) returns (localStatusReply) {} |
| } |