-
Notifications
You must be signed in to change notification settings - Fork 67
/
layer2.proto
112 lines (90 loc) · 3.12 KB
/
layer2.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
//
// Copyright 2017 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
syntax = "proto3";
package gnoi.layer2;
import "github.com/openconfig/gnoi/types/types.proto";
option go_package = "github.com/openconfig/gnoi/layer2";
option (types.gnoi_version) = "0.1.0";
service Layer2 {
// ClearNeighborDiscovery will clear either a specific neighbor entry or
// clear the entire table based on parameters provided.
// TODO: This method is subject to deprecation once OpenConfig models this
// state.
rpc ClearNeighborDiscovery(ClearNeighborDiscoveryRequest)
returns (ClearNeighborDiscoveryResponse) {}
// ClearSpanningTree will reset a blocked spanning tree interface.
// TODO: This method is subject to deprecation once OpenConfig models this
// state.
rpc ClearSpanningTree(ClearSpanningTreeRequest)
returns (ClearSpanningTreeResponse) {}
// PerformBERT will perform a BERT operation on a port. The stream will
// return the current state of the operation as well as the ID for the
// operation.
rpc PerformBERT(PerformBERTRequest)
returns (stream PerformBERTResponse) {}
// ClearLLDPInterface will clear all LLDP adjacencies on the provided
// interface.
rpc ClearLLDPInterface(ClearLLDPInterfaceRequest)
returns (ClearLLDPInterfaceResponse) {}
// SendWakeOnLAN will send a WOL event on the requested interface.
rpc SendWakeOnLAN(SendWakeOnLANRequest)
returns (SendWakeOnLANResponse) {}
}
message ClearNeighborDiscoveryRequest {
types.L3Protocol protocol = 1;
string address = 2;
}
message ClearNeighborDiscoveryResponse {
}
message ClearSpanningTreeRequest {
types.Path interface = 1;
}
message ClearSpanningTreeResponse {
}
message PerformBERTRequest {
// ID for retrieving a previous BERT run data - optional.
string id = 1;
types.Path interface = 2;
}
message PerformBERTResponse {
string id = 1;
enum BERTState {
UNKNOWN = 0;
DISABLED = 1;
RUNNING = 2;
COMPLETE = 3;
ERROR = 4;
}
BERTState state = 2;
int64 elapsed_period = 3; // BERT test length in nanoseconds.
bytes pattern = 4; // Pattern used for the BERT test.
// Number of errors experienced since the start of the BERT test.
int64 errors = 5;
// Number of bits received since the start of the BERT test.
int64 received_bits = 6;
}
message ClearLLDPInterfaceRequest {
types.Path interface = 1;
}
message ClearLLDPInterfaceResponse {
}
message SendWakeOnLANRequest {
types.Path interface = 1;
string address = 2; // IP address of the WOL target.
bytes mac_address = 3; // MAC address of the target.
}
message SendWakeOnLANResponse {
}