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 | */ |
Aaron Kruglikov | 9f95f99 | 2017-06-23 14:15:25 +0900 | [diff] [blame] | 16 | syntax = "proto3"; |
Jian Li | c9b4bf1 | 2017-06-26 23:50:32 +0900 | [diff] [blame] | 17 | option java_package = "org.onosproject.grpc.net.link.models"; |
Aaron Kruglikov | 9f95f99 | 2017-06-23 14:15:25 +0900 | [diff] [blame] | 18 | |
Jian Li | c9b4bf1 | 2017-06-26 23:50:32 +0900 | [diff] [blame] | 19 | package net.link; |
Aaron Kruglikov | 9f95f99 | 2017-06-23 14:15:25 +0900 | [diff] [blame] | 20 | |
Jian Li | c9b4bf1 | 2017-06-26 23:50:32 +0900 | [diff] [blame] | 21 | enum LinkTypeProto { |
Aaron Kruglikov | 9f95f99 | 2017-06-23 14:15:25 +0900 | [diff] [blame] | 22 | // Signifies that this is a direct single-segment link. |
| 23 | DIRECT = 0; |
| 24 | |
| 25 | // Signifies that this link is potentially comprised from multiple |
| 26 | // underlying segments or hops, and as such should be used to tag |
| 27 | // links traversing optical paths, tunnels or intervening 'dark' |
| 28 | // switches. |
| 29 | INDIRECT = 1; |
| 30 | |
| 31 | // Signifies that this link is an edge, i.e. host link. |
| 32 | EDGE = 2; |
| 33 | |
| 34 | // Signifies that this link represents a logical link backed by |
| 35 | // some form of a tunnel, e.g., GRE, MPLS, ODUk, OCH. |
| 36 | TUNNEL = 3; |
| 37 | |
| 38 | // Signifies that this link is realized by fiber (either single channel or WDM). |
| 39 | OPTICAL = 4; |
| 40 | |
| 41 | // Signifies that this link is a virtual link or a pseudo-wire. |
| 42 | VIRTUAL = 5; |
| 43 | } |
| 44 | |
Jian Li | c9b4bf1 | 2017-06-26 23:50:32 +0900 | [diff] [blame] | 45 | enum LinkStateProto { |
Aaron Kruglikov | 9f95f99 | 2017-06-23 14:15:25 +0900 | [diff] [blame] | 46 | ACTIVE = 0; |
| 47 | INACTIVE = 1; |
| 48 | } |
| 49 | |
| 50 | // Link Event Types |
Jian Li | c9b4bf1 | 2017-06-26 23:50:32 +0900 | [diff] [blame] | 51 | enum LinkEventTypeProto { |
Aaron Kruglikov | 9f95f99 | 2017-06-23 14:15:25 +0900 | [diff] [blame] | 52 | LINK_ADDED = 0; |
| 53 | LINK_UPDATED = 1; |
| 54 | LINK_REMOVED = 2; |
| 55 | } |