blob: 377f0bf852ab88c604d3865d03adf734d0e16a8c [file] [log] [blame]
Jian Li841a8b92017-11-23 01:31:22 +09001/*
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 ke0c26c282017-07-07 08:58:19 +080016syntax = "proto3";
17option java_package = "org.onosproject.grpc.nb.net.meter";
18
19package nb.net.meter;
20
21import "net/meter/MeterProto.proto";
22import "net/meter/MeterRequestProto.proto";
23
24message submitRequest {
25 .net.meter.MeterRequestProto meter = 1;
26}
27
28message submitReply {
29 .net.meter.MeterProto submit_meter = 1;
30}
31
32message withdrawRequest {
33 .net.meter.MeterRequestProto meter = 1;
34 uint64 meter_id = 2;
35}
36
37message withdrawReply {
38}
39
40message getMeterRequest {
41 string device_id = 1;
42 uint64 meter_id = 2;
43}
44
45message getMeterReply {
46 .net.meter.MeterProto meter = 1;
47}
48
49message getAllMetersRequest {
50}
51
52message getAllMetersReply {
53 repeated .net.meter.MeterProto meters = 1;
54}
55
56message getMetersRequest {
57 string device_id = 1;
58}
59
60message getMetersReply {
61 repeated .net.meter.MeterProto meters = 1;
62}
63
64service 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}