-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathiosxr.proto
302 lines (246 loc) · 6.12 KB
/
iosxr.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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
syntax = "proto3";
package IOSXRExtensibleManagabilityService;
service gRPCConfigOper {
// Configuration related commands
rpc GetConfig(ConfigGetArgs) returns(stream ConfigGetReply) {};
rpc MergeConfig(ConfigArgs) returns(ConfigReply) {};
rpc DeleteConfig(ConfigArgs) returns(ConfigReply) {};
rpc RemoveConfig(ConfigArgs) returns(ConfigReply) {};
rpc ReplaceConfig(ConfigArgs) returns(ConfigReply) {};
rpc CliConfig(CliConfigArgs) returns(CliConfigReply) {};
rpc CommitReplace(CommitReplaceArgs) returns (CommitReplaceReply) {};
// Do we need implicit or explicit commit
//
rpc CommitConfig(CommitArgs) returns(CommitReply) {};
rpc ConfigDiscardChanges(DiscardChangesArgs) returns(DiscardChangesReply) {};
// Get only returns oper data
//
rpc GetOper(GetOperArgs) returns(stream GetOperReply) {};
// Do we need "Get" also to give combined oper and config?
// Get Telemetry Data
rpc CreateSubs(CreateSubsArgs) returns(stream CreateSubsReply) {};
// Get Proto File
rpc GetProtoFile(GetProtoFileArgs) returns(stream GetProtoFileReply) {};
}
service gRPCExec {
// Exec commands
rpc ShowCmdTextOutput(ShowCmdArgs) returns(stream ShowCmdTextReply) {};
rpc ShowCmdJSONOutput(ShowCmdArgs) returns(stream ShowCmdJSONReply) {};
rpc ActionJSON(ActionJSONArgs) returns(stream ActionJSONReply) {};
}
service OpenConfiggRPC {
rpc SubscribeTelemetry(SubscribeRequest) returns (stream SubscribeResponse) {};
rpc UnSubscribeTelemetry(CancelSubscribeReq) returns (SubscribeResponse) {};
// get-models rpc implementation per
// github.com/openconfig/public/blob/master/release/models/rpc/openconfig-rpc.yang
rpc GetModels(GetModelsInput) returns (GetModelsOutput) {};
}
message ConfigGetArgs {
int64 ReqId = 1;
string yangpathjson = 2;
}
message ConfigGetReply {
int64 ResReqId = 1;
string yangjson = 2;
string errors = 3;
}
message GetOperArgs {
int64 ReqId = 1;
string yangpathjson = 2;
}
message GetOperReply {
int64 ResReqId = 1;
string yangjson = 2;
string errors = 3;
}
message ConfigArgs {
int64 ReqId = 1;
string yangjson = 2;
bool Confirmed = 3;
uint32 ConfirmTimeout = 4;
}
message ConfigReply {
int64 ResReqId = 1;
string errors = 2;
uint32 CommitID = 3;
}
message CliConfigArgs {
int64 ReqId = 1;
string cli = 2;
bool Confirmed = 3;
uint32 ConfirmTimeout = 4;
}
message CliConfigReply {
int64 ResReqId = 1;
string errors = 2;
uint32 CommitID = 3;
}
message CommitReplaceArgs {
int64 ReqId = 1;
string cli = 2;
string yangjson = 3;
}
message CommitReplaceReply {
int64 ResReqId = 1;
string errors = 2;
}
message CommitMsg {
string label = 1;
string comment = 2;
}
enum CommitResult {
CHANGE = 0;
NO_CHANGE = 1;
FAIL = 2;
}
message CommitArgs {
int64 ReqId = 1;
uint32 CommitID = 2;
}
message CommitReply {
int64 ResReqId = 1;
string errors = 2;
}
message DiscardChangesArgs {
int64 ReqId = 1;
}
message DiscardChangesReply {
int64 ResReqId = 1;
string errors = 2;
}
message ShowCmdArgs {
int64 ReqId = 1;
string cli = 2;
}
message ShowCmdTextReply {
int64 ResReqId =1;
string output = 2;
string errors = 3;
}
message ShowCmdJSONReply {
int64 ResReqId =1;
string jsonoutput = 2;
string errors = 3;
}
// QOSMarking specifies the DSCP value to be set on transmitted telemetry
message QOSMarking {
uint32 marking = 1;
}
message CreateSubsArgs {
int64 ReqId = 1;
int64 encode = 2;
string subidstr = 3;
QOSMarking qos = 4; // DSCP marking to be used.
repeated string Subscriptions = 5;
}
message ActionJSONArgs {
int64 ReqId = 1;
string yangpathjson = 2;
}
message ActionJSONReply {
int64 ResReqId = 1;
string yangjson = 2;
string errors = 3;
}
message CreateSubsReply {
int64 ResReqId = 1;
bytes data = 2;
string errors = 3;
}
message SubscribeRequest {
int64 ReqId = 1;
oneof request {
SubscriptionList subscribe = 2;
}
}
message TelemetryStreamDestination {
string destination_address = 1;
uint32 destination_port = 2;
enum TSP {
TSP_TCP = 0;
TSP_GRPC = 1;
}
TSP telemetry_stream_protocol = 3;
}
message TelemetryPath {
string Path = 1;
}
message SubscriptionList {
repeated TelemetryStreamDestination TelemetryStreamDestinations = 1;
repeated TelemetryPath TelemetryPaths = 2;
uint64 sample_interval = 3;
enum ENC_SPEC {
ENC_KV_GPB = 0;
ENC_GPB = 1;
}
ENC_SPEC encoding = 4;
QOSMarking qos = 5; // DSCP marking to be used.
}
enum OC_RPC_RESPONSE_TYPE {
OK = 0;
NOK = 1;
UNSUPPORTED_PATH = 2;
INVALID_PATH = 3;
INVALID_CONFIGURATION = 4;
UNSUPPORTED_INTERVAL = 5;
UNSUPPORTED_ENCODING = 6;
INVALID_SUBSCRIPTION_ID = 7;
}
message StatusResponse {
string message_json = 1;
OC_RPC_RESPONSE_TYPE code = 2;
}
message Notification {
bytes data = 1;
}
message SubscribeResponse {
int64 ResReqId = 1;
uint64 subscription_id = 2;
oneof response {
Notification update = 3;
StatusResponse status = 4;
}
}
message CancelSubscribeReq {
int64 ReqId = 1;
uint64 subscription_id = 2;
}
enum GET_MODEL_TYPE {
MODULE = 0;
AUGMENTATION = 1;
DEVIATION = 2;
BUNDLE = 3;
}
message GetModelsInput {
uint64 requestId = 1;
string name = 2;
string namespace = 3;
string version = 4;
enum MODLE_REQUEST_TYPE {
SUMMARY = 0;
DETAIL = 1;
}
MODLE_REQUEST_TYPE requestType = 5;
}
message GetModelsOutput {
uint64 requestId = 1;
message ModelInfo {
string name = 1;
string namespace = 2;
string version = 3;
GET_MODEL_TYPE modelType = 4;
string modelData = 5;
}
repeated ModelInfo models = 2;
OC_RPC_RESPONSE_TYPE responseCode = 3;
string msg = 4;
}
message GetProtoFileArgs {
int64 reqId = 1;
string yangPath = 2;
}
message GetProtoFileReply {
int64 reqId = 1;
string protoContent = 2;
string errors = 3;
}