blob: 1e081554cb005d268d5aebe1e342b0bc7a267ae8 [file] [log] [blame]
uwe ottrembka5ea5c0a2020-08-31 10:37:35 +02001# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2"""Client and server classes corresponding to protobuf-defined services."""
3import grpc
4
5from dmi import hw_pb2 as dmi_dot_hw__pb2
6from dmi import sw_image_pb2 as dmi_dot_sw__image__pb2
7from dmi import sw_management_service_pb2 as dmi_dot_sw__management__service__pb2
8
9
10class NativeSoftwareManagementServiceStub(object):
11 """Missing associated documentation comment in .proto file."""
12
13 def __init__(self, channel):
14 """Constructor.
15
16 Args:
17 channel: A grpc.Channel.
18 """
19 self.GetSoftwareVersion = channel.unary_unary(
20 '/dmi.NativeSoftwareManagementService/GetSoftwareVersion',
21 request_serializer=dmi_dot_hw__pb2.HardwareID.SerializeToString,
aghoshc301dcd2020-09-03 16:55:34 +010022 response_deserializer=dmi_dot_sw__management__service__pb2.GetSoftwareVersionInformationResponse.FromString,
uwe ottrembka5ea5c0a2020-08-31 10:37:35 +020023 )
24 self.DownloadImage = channel.unary_stream(
25 '/dmi.NativeSoftwareManagementService/DownloadImage',
26 request_serializer=dmi_dot_sw__management__service__pb2.DownloadImageRequest.SerializeToString,
27 response_deserializer=dmi_dot_sw__image__pb2.ImageStatus.FromString,
28 )
29 self.ActivateImage = channel.unary_stream(
30 '/dmi.NativeSoftwareManagementService/ActivateImage',
31 request_serializer=dmi_dot_hw__pb2.HardwareID.SerializeToString,
32 response_deserializer=dmi_dot_sw__image__pb2.ImageStatus.FromString,
33 )
34 self.RevertToStandbyImage = channel.unary_stream(
35 '/dmi.NativeSoftwareManagementService/RevertToStandbyImage',
36 request_serializer=dmi_dot_hw__pb2.HardwareID.SerializeToString,
37 response_deserializer=dmi_dot_sw__image__pb2.ImageStatus.FromString,
38 )
amit.ghoshed23db02020-11-18 10:26:36 +010039 self.UpdateStartupConfiguration = channel.unary_stream(
40 '/dmi.NativeSoftwareManagementService/UpdateStartupConfiguration',
41 request_serializer=dmi_dot_sw__management__service__pb2.ConfigRequest.SerializeToString,
42 response_deserializer=dmi_dot_sw__management__service__pb2.ConfigResponse.FromString,
43 )
amit.ghosh2c938b82021-01-14 11:34:03 +010044 self.GetStartupConfigurationInfo = channel.unary_unary(
45 '/dmi.NativeSoftwareManagementService/GetStartupConfigurationInfo',
46 request_serializer=dmi_dot_sw__management__service__pb2.StartupConfigInfoRequest.SerializeToString,
47 response_deserializer=dmi_dot_sw__management__service__pb2.StartupConfigInfoResponse.FromString,
48 )
amit.ghosh5a689802022-09-12 14:26:10 +020049 self.UploadDebugInfo = channel.unary_stream(
50 '/dmi.NativeSoftwareManagementService/UploadDebugInfo',
51 request_serializer=dmi_dot_sw__management__service__pb2.UploadDebugInfoRequest.SerializeToString,
52 response_deserializer=dmi_dot_sw__management__service__pb2.UploadDebugInfoStatus.FromString,
53 )
uwe ottrembka5ea5c0a2020-08-31 10:37:35 +020054
55
56class NativeSoftwareManagementServiceServicer(object):
57 """Missing associated documentation comment in .proto file."""
58
59 def GetSoftwareVersion(self, request, context):
60 """Get the software version information of the Active and Standby images
61 """
62 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
63 context.set_details('Method not implemented!')
64 raise NotImplementedError('Method not implemented!')
65
66 def DownloadImage(self, request, context):
67 """Downloads and installs the image in the standby partition, returns the status/progress of the Install
68 """
69 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
70 context.set_details('Method not implemented!')
71 raise NotImplementedError('Method not implemented!')
72
73 def ActivateImage(self, request, context):
74 """Activates and runs the OLT with the image in the standby partition. If things are fine this image will
75 henceforth be marked as the Active Partition. The old working image would remain on the Standby partition.
76 Any possibly required (sub-)steps like "commit" are left to the "Device Manager"
77 """
78 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
79 context.set_details('Method not implemented!')
80 raise NotImplementedError('Method not implemented!')
81
82 def RevertToStandbyImage(self, request, context):
83 """Marks the image in the Standby as Active and reboots the device, so that it boots from that image which was in the standby.
aghoshc301dcd2020-09-03 16:55:34 +010084 This API is to be used if operator wants to go back to the previous software
uwe ottrembka5ea5c0a2020-08-31 10:37:35 +020085 """
86 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
87 context.set_details('Method not implemented!')
88 raise NotImplementedError('Method not implemented!')
89
amit.ghoshed23db02020-11-18 10:26:36 +010090 def UpdateStartupConfiguration(self, request, context):
91 """This API can be used to let the devices pickup their properitary configuration which they need at startup.
92 """
93 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
94 context.set_details('Method not implemented!')
95 raise NotImplementedError('Method not implemented!')
96
amit.ghosh2c938b82021-01-14 11:34:03 +010097 def GetStartupConfigurationInfo(self, request, context):
98 """This API can be used to retrieve information about the current startup configuration that a device is using
99 """
100 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
101 context.set_details('Method not implemented!')
102 raise NotImplementedError('Method not implemented!')
103
amit.ghosh5a689802022-09-12 14:26:10 +0200104 def UploadDebugInfo(self, request, context):
105 """This API can be used to upload to a remote location, information useful for troubleshooting problems on the hardware
106 """
107 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
108 context.set_details('Method not implemented!')
109 raise NotImplementedError('Method not implemented!')
110
uwe ottrembka5ea5c0a2020-08-31 10:37:35 +0200111
112def add_NativeSoftwareManagementServiceServicer_to_server(servicer, server):
113 rpc_method_handlers = {
114 'GetSoftwareVersion': grpc.unary_unary_rpc_method_handler(
115 servicer.GetSoftwareVersion,
116 request_deserializer=dmi_dot_hw__pb2.HardwareID.FromString,
aghoshc301dcd2020-09-03 16:55:34 +0100117 response_serializer=dmi_dot_sw__management__service__pb2.GetSoftwareVersionInformationResponse.SerializeToString,
uwe ottrembka5ea5c0a2020-08-31 10:37:35 +0200118 ),
119 'DownloadImage': grpc.unary_stream_rpc_method_handler(
120 servicer.DownloadImage,
121 request_deserializer=dmi_dot_sw__management__service__pb2.DownloadImageRequest.FromString,
122 response_serializer=dmi_dot_sw__image__pb2.ImageStatus.SerializeToString,
123 ),
124 'ActivateImage': grpc.unary_stream_rpc_method_handler(
125 servicer.ActivateImage,
126 request_deserializer=dmi_dot_hw__pb2.HardwareID.FromString,
127 response_serializer=dmi_dot_sw__image__pb2.ImageStatus.SerializeToString,
128 ),
129 'RevertToStandbyImage': grpc.unary_stream_rpc_method_handler(
130 servicer.RevertToStandbyImage,
131 request_deserializer=dmi_dot_hw__pb2.HardwareID.FromString,
132 response_serializer=dmi_dot_sw__image__pb2.ImageStatus.SerializeToString,
133 ),
amit.ghoshed23db02020-11-18 10:26:36 +0100134 'UpdateStartupConfiguration': grpc.unary_stream_rpc_method_handler(
135 servicer.UpdateStartupConfiguration,
136 request_deserializer=dmi_dot_sw__management__service__pb2.ConfigRequest.FromString,
137 response_serializer=dmi_dot_sw__management__service__pb2.ConfigResponse.SerializeToString,
138 ),
amit.ghosh2c938b82021-01-14 11:34:03 +0100139 'GetStartupConfigurationInfo': grpc.unary_unary_rpc_method_handler(
140 servicer.GetStartupConfigurationInfo,
141 request_deserializer=dmi_dot_sw__management__service__pb2.StartupConfigInfoRequest.FromString,
142 response_serializer=dmi_dot_sw__management__service__pb2.StartupConfigInfoResponse.SerializeToString,
143 ),
amit.ghosh5a689802022-09-12 14:26:10 +0200144 'UploadDebugInfo': grpc.unary_stream_rpc_method_handler(
145 servicer.UploadDebugInfo,
146 request_deserializer=dmi_dot_sw__management__service__pb2.UploadDebugInfoRequest.FromString,
147 response_serializer=dmi_dot_sw__management__service__pb2.UploadDebugInfoStatus.SerializeToString,
148 ),
uwe ottrembka5ea5c0a2020-08-31 10:37:35 +0200149 }
150 generic_handler = grpc.method_handlers_generic_handler(
151 'dmi.NativeSoftwareManagementService', rpc_method_handlers)
152 server.add_generic_rpc_handlers((generic_handler,))
153
154
155 # This class is part of an EXPERIMENTAL API.
156class NativeSoftwareManagementService(object):
157 """Missing associated documentation comment in .proto file."""
158
159 @staticmethod
160 def GetSoftwareVersion(request,
161 target,
162 options=(),
163 channel_credentials=None,
164 call_credentials=None,
165 insecure=False,
166 compression=None,
167 wait_for_ready=None,
168 timeout=None,
169 metadata=None):
170 return grpc.experimental.unary_unary(request, target, '/dmi.NativeSoftwareManagementService/GetSoftwareVersion',
171 dmi_dot_hw__pb2.HardwareID.SerializeToString,
aghoshc301dcd2020-09-03 16:55:34 +0100172 dmi_dot_sw__management__service__pb2.GetSoftwareVersionInformationResponse.FromString,
uwe ottrembka5ea5c0a2020-08-31 10:37:35 +0200173 options, channel_credentials,
174 insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
175
176 @staticmethod
177 def DownloadImage(request,
178 target,
179 options=(),
180 channel_credentials=None,
181 call_credentials=None,
182 insecure=False,
183 compression=None,
184 wait_for_ready=None,
185 timeout=None,
186 metadata=None):
187 return grpc.experimental.unary_stream(request, target, '/dmi.NativeSoftwareManagementService/DownloadImage',
188 dmi_dot_sw__management__service__pb2.DownloadImageRequest.SerializeToString,
189 dmi_dot_sw__image__pb2.ImageStatus.FromString,
190 options, channel_credentials,
191 insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
192
193 @staticmethod
194 def ActivateImage(request,
195 target,
196 options=(),
197 channel_credentials=None,
198 call_credentials=None,
199 insecure=False,
200 compression=None,
201 wait_for_ready=None,
202 timeout=None,
203 metadata=None):
204 return grpc.experimental.unary_stream(request, target, '/dmi.NativeSoftwareManagementService/ActivateImage',
205 dmi_dot_hw__pb2.HardwareID.SerializeToString,
206 dmi_dot_sw__image__pb2.ImageStatus.FromString,
207 options, channel_credentials,
208 insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
209
210 @staticmethod
211 def RevertToStandbyImage(request,
212 target,
213 options=(),
214 channel_credentials=None,
215 call_credentials=None,
216 insecure=False,
217 compression=None,
218 wait_for_ready=None,
219 timeout=None,
220 metadata=None):
221 return grpc.experimental.unary_stream(request, target, '/dmi.NativeSoftwareManagementService/RevertToStandbyImage',
222 dmi_dot_hw__pb2.HardwareID.SerializeToString,
223 dmi_dot_sw__image__pb2.ImageStatus.FromString,
224 options, channel_credentials,
225 insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
amit.ghoshed23db02020-11-18 10:26:36 +0100226
227 @staticmethod
228 def UpdateStartupConfiguration(request,
229 target,
230 options=(),
231 channel_credentials=None,
232 call_credentials=None,
233 insecure=False,
234 compression=None,
235 wait_for_ready=None,
236 timeout=None,
237 metadata=None):
238 return grpc.experimental.unary_stream(request, target, '/dmi.NativeSoftwareManagementService/UpdateStartupConfiguration',
239 dmi_dot_sw__management__service__pb2.ConfigRequest.SerializeToString,
240 dmi_dot_sw__management__service__pb2.ConfigResponse.FromString,
241 options, channel_credentials,
242 insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
amit.ghosh2c938b82021-01-14 11:34:03 +0100243
244 @staticmethod
245 def GetStartupConfigurationInfo(request,
246 target,
247 options=(),
248 channel_credentials=None,
249 call_credentials=None,
250 insecure=False,
251 compression=None,
252 wait_for_ready=None,
253 timeout=None,
254 metadata=None):
255 return grpc.experimental.unary_unary(request, target, '/dmi.NativeSoftwareManagementService/GetStartupConfigurationInfo',
256 dmi_dot_sw__management__service__pb2.StartupConfigInfoRequest.SerializeToString,
257 dmi_dot_sw__management__service__pb2.StartupConfigInfoResponse.FromString,
258 options, channel_credentials,
259 insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
amit.ghosh5a689802022-09-12 14:26:10 +0200260
261 @staticmethod
262 def UploadDebugInfo(request,
263 target,
264 options=(),
265 channel_credentials=None,
266 call_credentials=None,
267 insecure=False,
268 compression=None,
269 wait_for_ready=None,
270 timeout=None,
271 metadata=None):
272 return grpc.experimental.unary_stream(request, target, '/dmi.NativeSoftwareManagementService/UploadDebugInfo',
273 dmi_dot_sw__management__service__pb2.UploadDebugInfoRequest.SerializeToString,
274 dmi_dot_sw__management__service__pb2.UploadDebugInfoStatus.FromString,
275 options, channel_credentials,
276 insecure, call_credentials, compression, wait_for_ready, timeout, metadata)