HIGUCHI Yuta | 7c1583c | 2015-12-03 23:08:54 -0800 | [diff] [blame] | 1 | syntax = "proto3"; |
HIGUCHI Yuta | e3e9063 | 2016-05-11 16:44:01 -0700 | [diff] [blame] | 2 | option java_package = "org.onosproject.grpc.net"; |
HIGUCHI Yuta | 7c1583c | 2015-12-03 23:08:54 -0800 | [diff] [blame] | 3 | |
| 4 | package Link; |
| 5 | |
| 6 | enum LinkType { |
| 7 | // Signifies that this is a direct single-segment link. |
| 8 | DIRECT = 0; |
| 9 | |
| 10 | // Signifies that this link is potentially comprised from multiple |
Yuta HIGUCHI | 3680fab | 2016-08-22 21:19:55 -0700 | [diff] [blame] | 11 | // underlying segments or hops, and as such should be used to tag |
HIGUCHI Yuta | 7c1583c | 2015-12-03 23:08:54 -0800 | [diff] [blame] | 12 | // links traversing optical paths, tunnels or intervening 'dark' |
| 13 | // switches. |
| 14 | INDIRECT = 1; |
| 15 | |
| 16 | // Signifies that this link is an edge, i.e. host link. |
| 17 | EDGE = 2; |
| 18 | |
| 19 | // Signifies that this link represents a logical link backed by |
| 20 | // some form of a tunnel, e.g., GRE, MPLS, ODUk, OCH. |
| 21 | TUNNEL = 3; |
| 22 | |
| 23 | // Signifies that this link is realized by fiber (either single channel or WDM). |
| 24 | OPTICAL = 4; |
| 25 | |
| 26 | // Signifies that this link is a virtual link or a pseudo-wire. |
| 27 | VIRTUAL = 5; |
| 28 | } |
| 29 | |
| 30 | message ConnectPoint { |
| 31 | oneof element_id { |
| 32 | // DeviceID as String DeviceId#toString |
| 33 | string device_id = 1; |
| 34 | |
| 35 | // TODO add support to other element_id if required |
| 36 | } |
| 37 | // PortNumber as String PortNumber#toString |
| 38 | string port_number = 2; |
| 39 | } |
| 40 | |
Shravan Ambati | bb6b445 | 2016-05-04 13:25:28 -0700 | [diff] [blame] | 41 | enum LinkState { |
| 42 | ACTIVE = 0; |
| 43 | INACTIVE = 1; |
| 44 | } |
| 45 | |
| 46 | // Corresponds to org.onosproject.net.Link. |
| 47 | message LinkCore { |
| 48 | LinkState state = 1; |
| 49 | ConnectPoint src = 2; |
| 50 | ConnectPoint dst = 3; |
| 51 | LinkType type = 4; |
| 52 | map<string, string> annotations = 5; |
| 53 | } |
| 54 | |
HIGUCHI Yuta | 7c1583c | 2015-12-03 23:08:54 -0800 | [diff] [blame] | 55 | message LinkDescription { |
| 56 | ConnectPoint src = 1; |
| 57 | ConnectPoint dst = 2; |
| 58 | LinkType type = 3; |
| 59 | map<string, string> annotations = 4; |
| 60 | } |