Jian Li | 841a8b9 | 2017-11-23 01:31:22 +0900 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2017-present Open Networking Foundation |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
zhiyong ke | 0c26c28 | 2017-07-07 08:58:19 +0800 | [diff] [blame] | 16 | syntax = "proto3"; |
| 17 | option java_package = "org.onosproject.grpc.nb.net.meter"; |
| 18 | |
| 19 | package nb.net.meter; |
| 20 | |
| 21 | import "net/meter/MeterProto.proto"; |
| 22 | import "net/meter/MeterRequestProto.proto"; |
| 23 | |
| 24 | message submitRequest { |
| 25 | .net.meter.MeterRequestProto meter = 1; |
| 26 | } |
| 27 | |
| 28 | message submitReply { |
| 29 | .net.meter.MeterProto submit_meter = 1; |
| 30 | } |
| 31 | |
| 32 | message withdrawRequest { |
| 33 | .net.meter.MeterRequestProto meter = 1; |
| 34 | uint64 meter_id = 2; |
| 35 | } |
| 36 | |
| 37 | message withdrawReply { |
| 38 | } |
| 39 | |
| 40 | message getMeterRequest { |
| 41 | string device_id = 1; |
| 42 | uint64 meter_id = 2; |
| 43 | } |
| 44 | |
| 45 | message getMeterReply { |
| 46 | .net.meter.MeterProto meter = 1; |
| 47 | } |
| 48 | |
| 49 | message getAllMetersRequest { |
| 50 | } |
| 51 | |
| 52 | message getAllMetersReply { |
| 53 | repeated .net.meter.MeterProto meters = 1; |
| 54 | } |
| 55 | |
| 56 | message getMetersRequest { |
| 57 | string device_id = 1; |
| 58 | } |
| 59 | |
| 60 | message getMetersReply { |
| 61 | repeated .net.meter.MeterProto meters = 1; |
| 62 | } |
| 63 | |
| 64 | service MeterService { |
| 65 | rpc submit(submitRequest) returns (submitReply) {} |
| 66 | rpc withdraw(withdrawRequest) returns (withdrawReply) {} |
| 67 | rpc getMeter(getMeterRequest) returns (getMeterReply) {} |
| 68 | rpc getAllMeters(getAllMetersRequest) returns (getAllMetersReply) {} |
| 69 | rpc getMeters(getMetersRequest) returns (getMetersReply) {} |
| 70 | } |