blob: cf2398df330b8d1da82a61a5cbb29ec11b4b8366 [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 )
uwe ottrembka5ea5c0a2020-08-31 10:37:35 +020049
50
51class NativeSoftwareManagementServiceServicer(object):
52 """Missing associated documentation comment in .proto file."""
53
54 def GetSoftwareVersion(self, request, context):
55 """Get the software version information of the Active and Standby images
56 """
57 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
58 context.set_details('Method not implemented!')
59 raise NotImplementedError('Method not implemented!')
60
61 def DownloadImage(self, request, context):
62 """Downloads and installs the image in the standby partition, returns the status/progress of the Install
63 """
64 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
65 context.set_details('Method not implemented!')
66 raise NotImplementedError('Method not implemented!')
67
68 def ActivateImage(self, request, context):
69 """Activates and runs the OLT with the image in the standby partition. If things are fine this image will
70 henceforth be marked as the Active Partition. The old working image would remain on the Standby partition.
71 Any possibly required (sub-)steps like "commit" are left to the "Device Manager"
72 """
73 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
74 context.set_details('Method not implemented!')
75 raise NotImplementedError('Method not implemented!')
76
77 def RevertToStandbyImage(self, request, context):
78 """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 +010079 This API is to be used if operator wants to go back to the previous software
uwe ottrembka5ea5c0a2020-08-31 10:37:35 +020080 """
81 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
82 context.set_details('Method not implemented!')
83 raise NotImplementedError('Method not implemented!')
84
amit.ghoshed23db02020-11-18 10:26:36 +010085 def UpdateStartupConfiguration(self, request, context):
86 """This API can be used to let the devices pickup their properitary configuration which they need at startup.
87 """
88 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
89 context.set_details('Method not implemented!')
90 raise NotImplementedError('Method not implemented!')
91
amit.ghosh2c938b82021-01-14 11:34:03 +010092 def GetStartupConfigurationInfo(self, request, context):
93 """This API can be used to retrieve information about the current startup configuration that a device is using
94 """
95 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
96 context.set_details('Method not implemented!')
97 raise NotImplementedError('Method not implemented!')
98
uwe ottrembka5ea5c0a2020-08-31 10:37:35 +020099
100def add_NativeSoftwareManagementServiceServicer_to_server(servicer, server):
101 rpc_method_handlers = {
102 'GetSoftwareVersion': grpc.unary_unary_rpc_method_handler(
103 servicer.GetSoftwareVersion,
104 request_deserializer=dmi_dot_hw__pb2.HardwareID.FromString,
aghoshc301dcd2020-09-03 16:55:34 +0100105 response_serializer=dmi_dot_sw__management__service__pb2.GetSoftwareVersionInformationResponse.SerializeToString,
uwe ottrembka5ea5c0a2020-08-31 10:37:35 +0200106 ),
107 'DownloadImage': grpc.unary_stream_rpc_method_handler(
108 servicer.DownloadImage,
109 request_deserializer=dmi_dot_sw__management__service__pb2.DownloadImageRequest.FromString,
110 response_serializer=dmi_dot_sw__image__pb2.ImageStatus.SerializeToString,
111 ),
112 'ActivateImage': grpc.unary_stream_rpc_method_handler(
113 servicer.ActivateImage,
114 request_deserializer=dmi_dot_hw__pb2.HardwareID.FromString,
115 response_serializer=dmi_dot_sw__image__pb2.ImageStatus.SerializeToString,
116 ),
117 'RevertToStandbyImage': grpc.unary_stream_rpc_method_handler(
118 servicer.RevertToStandbyImage,
119 request_deserializer=dmi_dot_hw__pb2.HardwareID.FromString,
120 response_serializer=dmi_dot_sw__image__pb2.ImageStatus.SerializeToString,
121 ),
amit.ghoshed23db02020-11-18 10:26:36 +0100122 'UpdateStartupConfiguration': grpc.unary_stream_rpc_method_handler(
123 servicer.UpdateStartupConfiguration,
124 request_deserializer=dmi_dot_sw__management__service__pb2.ConfigRequest.FromString,
125 response_serializer=dmi_dot_sw__management__service__pb2.ConfigResponse.SerializeToString,
126 ),
amit.ghosh2c938b82021-01-14 11:34:03 +0100127 'GetStartupConfigurationInfo': grpc.unary_unary_rpc_method_handler(
128 servicer.GetStartupConfigurationInfo,
129 request_deserializer=dmi_dot_sw__management__service__pb2.StartupConfigInfoRequest.FromString,
130 response_serializer=dmi_dot_sw__management__service__pb2.StartupConfigInfoResponse.SerializeToString,
131 ),
uwe ottrembka5ea5c0a2020-08-31 10:37:35 +0200132 }
133 generic_handler = grpc.method_handlers_generic_handler(
134 'dmi.NativeSoftwareManagementService', rpc_method_handlers)
135 server.add_generic_rpc_handlers((generic_handler,))
136
137
138 # This class is part of an EXPERIMENTAL API.
139class NativeSoftwareManagementService(object):
140 """Missing associated documentation comment in .proto file."""
141
142 @staticmethod
143 def GetSoftwareVersion(request,
144 target,
145 options=(),
146 channel_credentials=None,
147 call_credentials=None,
148 insecure=False,
149 compression=None,
150 wait_for_ready=None,
151 timeout=None,
152 metadata=None):
153 return grpc.experimental.unary_unary(request, target, '/dmi.NativeSoftwareManagementService/GetSoftwareVersion',
154 dmi_dot_hw__pb2.HardwareID.SerializeToString,
aghoshc301dcd2020-09-03 16:55:34 +0100155 dmi_dot_sw__management__service__pb2.GetSoftwareVersionInformationResponse.FromString,
uwe ottrembka5ea5c0a2020-08-31 10:37:35 +0200156 options, channel_credentials,
157 insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
158
159 @staticmethod
160 def DownloadImage(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_stream(request, target, '/dmi.NativeSoftwareManagementService/DownloadImage',
171 dmi_dot_sw__management__service__pb2.DownloadImageRequest.SerializeToString,
172 dmi_dot_sw__image__pb2.ImageStatus.FromString,
173 options, channel_credentials,
174 insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
175
176 @staticmethod
177 def ActivateImage(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/ActivateImage',
188 dmi_dot_hw__pb2.HardwareID.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 RevertToStandbyImage(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/RevertToStandbyImage',
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)
amit.ghoshed23db02020-11-18 10:26:36 +0100209
210 @staticmethod
211 def UpdateStartupConfiguration(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/UpdateStartupConfiguration',
222 dmi_dot_sw__management__service__pb2.ConfigRequest.SerializeToString,
223 dmi_dot_sw__management__service__pb2.ConfigResponse.FromString,
224 options, channel_credentials,
225 insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
amit.ghosh2c938b82021-01-14 11:34:03 +0100226
227 @staticmethod
228 def GetStartupConfigurationInfo(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_unary(request, target, '/dmi.NativeSoftwareManagementService/GetStartupConfigurationInfo',
239 dmi_dot_sw__management__service__pb2.StartupConfigInfoRequest.SerializeToString,
240 dmi_dot_sw__management__service__pb2.StartupConfigInfoResponse.FromString,
241 options, channel_credentials,
242 insecure, call_credentials, compression, wait_for_ready, timeout, metadata)