-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathcisco_grpc_dialin_pb2_grpc.py
More file actions
267 lines (231 loc) · 11 KB
/
cisco_grpc_dialin_pb2_grpc.py
File metadata and controls
267 lines (231 loc) · 11 KB
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
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc
import cisco_grpc_dialin_pb2 as cisco__grpc__dialin__pb2
class gRPCConfigOperStub(object):
# missing associated documentation comment in .proto file
pass
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.GetConfig = channel.unary_stream(
'/IOSXRExtensibleManagabilityService.gRPCConfigOper/GetConfig',
request_serializer=cisco__grpc__dialin__pb2.ConfigGetArgs.SerializeToString,
response_deserializer=cisco__grpc__dialin__pb2.ConfigGetReply.FromString,
)
self.MergeConfig = channel.unary_unary(
'/IOSXRExtensibleManagabilityService.gRPCConfigOper/MergeConfig',
request_serializer=cisco__grpc__dialin__pb2.ConfigArgs.SerializeToString,
response_deserializer=cisco__grpc__dialin__pb2.ConfigReply.FromString,
)
self.DeleteConfig = channel.unary_unary(
'/IOSXRExtensibleManagabilityService.gRPCConfigOper/DeleteConfig',
request_serializer=cisco__grpc__dialin__pb2.ConfigArgs.SerializeToString,
response_deserializer=cisco__grpc__dialin__pb2.ConfigReply.FromString,
)
self.ReplaceConfig = channel.unary_unary(
'/IOSXRExtensibleManagabilityService.gRPCConfigOper/ReplaceConfig',
request_serializer=cisco__grpc__dialin__pb2.ConfigArgs.SerializeToString,
response_deserializer=cisco__grpc__dialin__pb2.ConfigReply.FromString,
)
self.CliConfig = channel.unary_unary(
'/IOSXRExtensibleManagabilityService.gRPCConfigOper/CliConfig',
request_serializer=cisco__grpc__dialin__pb2.CliConfigArgs.SerializeToString,
response_deserializer=cisco__grpc__dialin__pb2.CliConfigReply.FromString,
)
self.CommitReplace = channel.unary_unary(
'/IOSXRExtensibleManagabilityService.gRPCConfigOper/CommitReplace',
request_serializer=cisco__grpc__dialin__pb2.CommitReplaceArgs.SerializeToString,
response_deserializer=cisco__grpc__dialin__pb2.CommitReplaceReply.FromString,
)
self.CommitConfig = channel.unary_unary(
'/IOSXRExtensibleManagabilityService.gRPCConfigOper/CommitConfig',
request_serializer=cisco__grpc__dialin__pb2.CommitArgs.SerializeToString,
response_deserializer=cisco__grpc__dialin__pb2.CommitReply.FromString,
)
self.ConfigDiscardChanges = channel.unary_unary(
'/IOSXRExtensibleManagabilityService.gRPCConfigOper/ConfigDiscardChanges',
request_serializer=cisco__grpc__dialin__pb2.DiscardChangesArgs.SerializeToString,
response_deserializer=cisco__grpc__dialin__pb2.DiscardChangesReply.FromString,
)
self.GetOper = channel.unary_stream(
'/IOSXRExtensibleManagabilityService.gRPCConfigOper/GetOper',
request_serializer=cisco__grpc__dialin__pb2.GetOperArgs.SerializeToString,
response_deserializer=cisco__grpc__dialin__pb2.GetOperReply.FromString,
)
self.CreateSubs = channel.unary_stream(
'/IOSXRExtensibleManagabilityService.gRPCConfigOper/CreateSubs',
request_serializer=cisco__grpc__dialin__pb2.CreateSubsArgs.SerializeToString,
response_deserializer=cisco__grpc__dialin__pb2.CreateSubsReply.FromString,
)
class gRPCConfigOperServicer(object):
# missing associated documentation comment in .proto file
pass
def GetConfig(self, request, context):
"""Configuration related commands
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def MergeConfig(self, request, context):
# missing associated documentation comment in .proto file
pass
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def DeleteConfig(self, request, context):
# missing associated documentation comment in .proto file
pass
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def ReplaceConfig(self, request, context):
# missing associated documentation comment in .proto file
pass
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def CliConfig(self, request, context):
# missing associated documentation comment in .proto file
pass
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def CommitReplace(self, request, context):
# missing associated documentation comment in .proto file
pass
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def CommitConfig(self, request, context):
"""Do we need implicit or explicit commit
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def ConfigDiscardChanges(self, request, context):
# missing associated documentation comment in .proto file
pass
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetOper(self, request, context):
"""Get only returns oper data
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def CreateSubs(self, request, context):
"""Get Telemetry Data
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def add_gRPCConfigOperServicer_to_server(servicer, server):
rpc_method_handlers = {
'GetConfig': grpc.unary_stream_rpc_method_handler(
servicer.GetConfig,
request_deserializer=cisco__grpc__dialin__pb2.ConfigGetArgs.FromString,
response_serializer=cisco__grpc__dialin__pb2.ConfigGetReply.SerializeToString,
),
'MergeConfig': grpc.unary_unary_rpc_method_handler(
servicer.MergeConfig,
request_deserializer=cisco__grpc__dialin__pb2.ConfigArgs.FromString,
response_serializer=cisco__grpc__dialin__pb2.ConfigReply.SerializeToString,
),
'DeleteConfig': grpc.unary_unary_rpc_method_handler(
servicer.DeleteConfig,
request_deserializer=cisco__grpc__dialin__pb2.ConfigArgs.FromString,
response_serializer=cisco__grpc__dialin__pb2.ConfigReply.SerializeToString,
),
'ReplaceConfig': grpc.unary_unary_rpc_method_handler(
servicer.ReplaceConfig,
request_deserializer=cisco__grpc__dialin__pb2.ConfigArgs.FromString,
response_serializer=cisco__grpc__dialin__pb2.ConfigReply.SerializeToString,
),
'CliConfig': grpc.unary_unary_rpc_method_handler(
servicer.CliConfig,
request_deserializer=cisco__grpc__dialin__pb2.CliConfigArgs.FromString,
response_serializer=cisco__grpc__dialin__pb2.CliConfigReply.SerializeToString,
),
'CommitReplace': grpc.unary_unary_rpc_method_handler(
servicer.CommitReplace,
request_deserializer=cisco__grpc__dialin__pb2.CommitReplaceArgs.FromString,
response_serializer=cisco__grpc__dialin__pb2.CommitReplaceReply.SerializeToString,
),
'CommitConfig': grpc.unary_unary_rpc_method_handler(
servicer.CommitConfig,
request_deserializer=cisco__grpc__dialin__pb2.CommitArgs.FromString,
response_serializer=cisco__grpc__dialin__pb2.CommitReply.SerializeToString,
),
'ConfigDiscardChanges': grpc.unary_unary_rpc_method_handler(
servicer.ConfigDiscardChanges,
request_deserializer=cisco__grpc__dialin__pb2.DiscardChangesArgs.FromString,
response_serializer=cisco__grpc__dialin__pb2.DiscardChangesReply.SerializeToString,
),
'GetOper': grpc.unary_stream_rpc_method_handler(
servicer.GetOper,
request_deserializer=cisco__grpc__dialin__pb2.GetOperArgs.FromString,
response_serializer=cisco__grpc__dialin__pb2.GetOperReply.SerializeToString,
),
'CreateSubs': grpc.unary_stream_rpc_method_handler(
servicer.CreateSubs,
request_deserializer=cisco__grpc__dialin__pb2.CreateSubsArgs.FromString,
response_serializer=cisco__grpc__dialin__pb2.CreateSubsReply.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'IOSXRExtensibleManagabilityService.gRPCConfigOper', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
class gRPCExecStub(object):
"""
Should we seperate Exec from Config/Oper?
"""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.ShowCmdTextOutput = channel.unary_stream(
'/IOSXRExtensibleManagabilityService.gRPCExec/ShowCmdTextOutput',
request_serializer=cisco__grpc__dialin__pb2.ShowCmdArgs.SerializeToString,
response_deserializer=cisco__grpc__dialin__pb2.ShowCmdTextReply.FromString,
)
self.ShowCmdJSONOutput = channel.unary_stream(
'/IOSXRExtensibleManagabilityService.gRPCExec/ShowCmdJSONOutput',
request_serializer=cisco__grpc__dialin__pb2.ShowCmdArgs.SerializeToString,
response_deserializer=cisco__grpc__dialin__pb2.ShowCmdJSONReply.FromString,
)
class gRPCExecServicer(object):
"""
Should we seperate Exec from Config/Oper?
"""
def ShowCmdTextOutput(self, request, context):
"""Exec commands
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def ShowCmdJSONOutput(self, request, context):
# missing associated documentation comment in .proto file
pass
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def add_gRPCExecServicer_to_server(servicer, server):
rpc_method_handlers = {
'ShowCmdTextOutput': grpc.unary_stream_rpc_method_handler(
servicer.ShowCmdTextOutput,
request_deserializer=cisco__grpc__dialin__pb2.ShowCmdArgs.FromString,
response_serializer=cisco__grpc__dialin__pb2.ShowCmdTextReply.SerializeToString,
),
'ShowCmdJSONOutput': grpc.unary_stream_rpc_method_handler(
servicer.ShowCmdJSONOutput,
request_deserializer=cisco__grpc__dialin__pb2.ShowCmdArgs.FromString,
response_serializer=cisco__grpc__dialin__pb2.ShowCmdJSONReply.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'IOSXRExtensibleManagabilityService.gRPCExec', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))