blob: 27998d3b2b1ee60f28f394180aa3767854051f5a [file] [log] [blame]
HIGUCHI Yuta7c1583c2015-12-03 23:08:54 -08001syntax = "proto3";
2option java_package = "org.onosproject.grpc";
3
4package Link;
5
6enum 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
11 //underlying segments or hops, and as such should be used to tag
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
30message 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
41message LinkDescription {
42 ConnectPoint src = 1;
43 ConnectPoint dst = 2;
44 LinkType type = 3;
45 map<string, string> annotations = 4;
46}
47
48// Message te represent no return value
49message Void {}
50
51message LinkDetectedMsg {
52 // ProviderId scheme only
53 string provider_id = 1;
54 LinkDescription link_description = 2;
55}
56
57message LinkVanishedMsg {
58 // ProviderId scheme only
59 string provider_id = 1;
60 oneof subject {
61 LinkDescription link_description = 2;
62 ConnectPoint connect_point = 3;
63 string device_id = 4;
64 }
65}
66
67service LinkProviderServiceRpc {
68 rpc LinkDetected(LinkDetectedMsg) returns (Void);
69 rpc LinkVanished(LinkVanishedMsg) returns (Void);
70}