blob: f8b076ec1b52cf0d17f42a54ca437140ed4fcd63 [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 )
uwe ottrembka5ea5c0a2020-08-31 10:37:35 +020044
45
46class NativeSoftwareManagementServiceServicer(object):
47 """Missing associated documentation comment in .proto file."""
48
49 def GetSoftwareVersion(self, request, context):
50 """Get the software version information of the Active and Standby images
51 """
52 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
53 context.set_details('Method not implemented!')
54 raise NotImplementedError('Method not implemented!')
55
56 def DownloadImage(self, request, context):
57 """Downloads and installs the image in the standby partition, returns the status/progress of the Install
58 """
59 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
60 context.set_details('Method not implemented!')
61 raise NotImplementedError('Method not implemented!')
62
63 def ActivateImage(self, request, context):
64 """Activates and runs the OLT with the image in the standby partition. If things are fine this image will
65 henceforth be marked as the Active Partition. The old working image would remain on the Standby partition.
66 Any possibly required (sub-)steps like "commit" are left to the "Device Manager"
67 """
68 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
69 context.set_details('Method not implemented!')
70 raise NotImplementedError('Method not implemented!')
71
72 def RevertToStandbyImage(self, request, context):
73 """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 +010074 This API is to be used if operator wants to go back to the previous software
uwe ottrembka5ea5c0a2020-08-31 10:37:35 +020075 """
76 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
77 context.set_details('Method not implemented!')
78 raise NotImplementedError('Method not implemented!')
79
amit.ghoshed23db02020-11-18 10:26:36 +010080 def UpdateStartupConfiguration(self, request, context):
81 """This API can be used to let the devices pickup their properitary configuration which they need at startup.
82 """
83 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
84 context.set_details('Method not implemented!')
85 raise NotImplementedError('Method not implemented!')
86
uwe ottrembka5ea5c0a2020-08-31 10:37:35 +020087
88def add_NativeSoftwareManagementServiceServicer_to_server(servicer, server):
89 rpc_method_handlers = {
90 'GetSoftwareVersion': grpc.unary_unary_rpc_method_handler(
91 servicer.GetSoftwareVersion,
92 request_deserializer=dmi_dot_hw__pb2.HardwareID.FromString,
aghoshc301dcd2020-09-03 16:55:34 +010093 response_serializer=dmi_dot_sw__management__service__pb2.GetSoftwareVersionInformationResponse.SerializeToString,
uwe ottrembka5ea5c0a2020-08-31 10:37:35 +020094 ),
95 'DownloadImage': grpc.unary_stream_rpc_method_handler(
96 servicer.DownloadImage,
97 request_deserializer=dmi_dot_sw__management__service__pb2.DownloadImageRequest.FromString,
98 response_serializer=dmi_dot_sw__image__pb2.ImageStatus.SerializeToString,
99 ),
100 'ActivateImage': grpc.unary_stream_rpc_method_handler(
101 servicer.ActivateImage,
102 request_deserializer=dmi_dot_hw__pb2.HardwareID.FromString,
103 response_serializer=dmi_dot_sw__image__pb2.ImageStatus.SerializeToString,
104 ),
105 'RevertToStandbyImage': grpc.unary_stream_rpc_method_handler(
106 servicer.RevertToStandbyImage,
107 request_deserializer=dmi_dot_hw__pb2.HardwareID.FromString,
108 response_serializer=dmi_dot_sw__image__pb2.ImageStatus.SerializeToString,
109 ),
amit.ghoshed23db02020-11-18 10:26:36 +0100110 'UpdateStartupConfiguration': grpc.unary_stream_rpc_method_handler(
111 servicer.UpdateStartupConfiguration,
112 request_deserializer=dmi_dot_sw__management__service__pb2.ConfigRequest.FromString,
113 response_serializer=dmi_dot_sw__management__service__pb2.ConfigResponse.SerializeToString,
114 ),
uwe ottrembka5ea5c0a2020-08-31 10:37:35 +0200115 }
116 generic_handler = grpc.method_handlers_generic_handler(
117 'dmi.NativeSoftwareManagementService', rpc_method_handlers)
118 server.add_generic_rpc_handlers((generic_handler,))
119
120
121 # This class is part of an EXPERIMENTAL API.
122class NativeSoftwareManagementService(object):
123 """Missing associated documentation comment in .proto file."""
124
125 @staticmethod
126 def GetSoftwareVersion(request,
127 target,
128 options=(),
129 channel_credentials=None,
130 call_credentials=None,
131 insecure=False,
132 compression=None,
133 wait_for_ready=None,
134 timeout=None,
135 metadata=None):
136 return grpc.experimental.unary_unary(request, target, '/dmi.NativeSoftwareManagementService/GetSoftwareVersion',
137 dmi_dot_hw__pb2.HardwareID.SerializeToString,
aghoshc301dcd2020-09-03 16:55:34 +0100138 dmi_dot_sw__management__service__pb2.GetSoftwareVersionInformationResponse.FromString,
uwe ottrembka5ea5c0a2020-08-31 10:37:35 +0200139 options, channel_credentials,
140 insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
141
142 @staticmethod
143 def DownloadImage(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_stream(request, target, '/dmi.NativeSoftwareManagementService/DownloadImage',
154 dmi_dot_sw__management__service__pb2.DownloadImageRequest.SerializeToString,
155 dmi_dot_sw__image__pb2.ImageStatus.FromString,
156 options, channel_credentials,
157 insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
158
159 @staticmethod
160 def ActivateImage(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/ActivateImage',
171 dmi_dot_hw__pb2.HardwareID.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 RevertToStandbyImage(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/RevertToStandbyImage',
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)
amit.ghoshed23db02020-11-18 10:26:36 +0100192
193 @staticmethod
194 def UpdateStartupConfiguration(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/UpdateStartupConfiguration',
205 dmi_dot_sw__management__service__pb2.ConfigRequest.SerializeToString,
206 dmi_dot_sw__management__service__pb2.ConfigResponse.FromString,
207 options, channel_credentials,
208 insecure, call_credentials, compression, wait_for_ready, timeout, metadata)