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 | */ |
shivani vaidya | 9632b5f | 2017-06-27 11:00:04 -0700 | [diff] [blame] | 16 | syntax="proto3"; |
| 17 | option java_package = "org.onosproject.grpc.nb.net.link"; |
| 18 | |
| 19 | package nb.net.link; |
| 20 | |
| 21 | import "net/LinkProto.proto"; |
| 22 | import "net/ConnectPointProto.proto"; |
| 23 | |
| 24 | message getLinkCountRequest { |
| 25 | } |
| 26 | |
| 27 | message getLinkCountReply { |
| 28 | int32 link_count = 1; |
| 29 | } |
| 30 | |
| 31 | message getActiveLinksRequest { |
| 32 | } |
| 33 | |
| 34 | message getActiveLinksReply { |
| 35 | repeated .net.LinkProto link = 1; |
| 36 | } |
| 37 | |
| 38 | message getDeviceLinksRequest { |
| 39 | string device_id = 1; |
| 40 | } |
| 41 | |
| 42 | message getDeviceLinksReply { |
| 43 | repeated .net.LinkProto link = 1; |
| 44 | } |
| 45 | |
| 46 | message getDeviceEgressLinksRequest { |
| 47 | string device_id = 1; |
| 48 | } |
| 49 | |
| 50 | message getDeviceEgressLinksReply { |
| 51 | repeated .net.LinkProto link = 1; |
| 52 | } |
| 53 | |
| 54 | message getDeviceIngressLinksRequest { |
| 55 | string device_id = 1; |
| 56 | } |
| 57 | |
| 58 | message getDeviceIngressLinksReply { |
| 59 | repeated .net.LinkProto link = 1; |
| 60 | } |
| 61 | |
| 62 | message getLinksRequest { |
| 63 | .net.ConnectPointProto connect_point = 1; |
| 64 | } |
| 65 | |
| 66 | message getLinksReply { |
| 67 | repeated .net.LinkProto link = 1; |
| 68 | } |
| 69 | |
| 70 | message getEgressLinksRequest { |
| 71 | .net.ConnectPointProto connect_point = 1; |
| 72 | } |
| 73 | |
| 74 | message getEgressLinksReply { |
| 75 | repeated .net.LinkProto link = 1; |
| 76 | } |
| 77 | |
| 78 | message getIngressLinksRequest { |
| 79 | .net.ConnectPointProto connect_point = 1; |
| 80 | } |
| 81 | |
| 82 | message getIngressLinksReply { |
| 83 | repeated .net.LinkProto link = 1; |
| 84 | } |
| 85 | |
| 86 | message getLinkRequest { |
| 87 | .net.ConnectPointProto src = 1; |
| 88 | .net.ConnectPointProto dst = 2; |
| 89 | } |
| 90 | |
| 91 | message getLinkReply { |
| 92 | .net.LinkProto link = 1; |
| 93 | } |
| 94 | |
| 95 | service LinkService { |
| 96 | rpc getLinkCount(getLinkCountRequest) returns(getLinkCountReply) {} |
| 97 | rpc getLinks(getLinksRequest) returns(getLinksReply) {} |
| 98 | rpc getActiveLinks(getActiveLinksRequest) returns(getActiveLinksReply) {} |
| 99 | rpc getDeviceLinks(getDeviceLinksRequest) returns(getDeviceLinksReply) {} |
| 100 | rpc getDeviceEgressLinks(getDeviceEgressLinksRequest) returns(getDeviceEgressLinksReply) {} |
| 101 | rpc getDeviceIngressLinks(getDeviceIngressLinksRequest) returns(getDeviceIngressLinksReply) {} |
| 102 | rpc getEgressLinks(getEgressLinksRequest) returns(getEgressLinksReply) {} |
| 103 | rpc getIngressLinks(getIngressLinksRequest) returns(getIngressLinksReply) {} |
| 104 | rpc getLink(getLinkRequest) returns(getLinkReply) {} |
| 105 | } |