blob: b9669b71134f8c12acfdaa9fba0d5fa5e486702b [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 )
39
40
41class NativeSoftwareManagementServiceServicer(object):
42 """Missing associated documentation comment in .proto file."""
43
44 def GetSoftwareVersion(self, request, context):
45 """Get the software version information of the Active and Standby images
46 """
47 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
48 context.set_details('Method not implemented!')
49 raise NotImplementedError('Method not implemented!')
50
51 def DownloadImage(self, request, context):
52 """Downloads and installs the image in the standby partition, returns the status/progress of the Install
53 """
54 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
55 context.set_details('Method not implemented!')
56 raise NotImplementedError('Method not implemented!')
57
58 def ActivateImage(self, request, context):
59 """Activates and runs the OLT with the image in the standby partition. If things are fine this image will
60 henceforth be marked as the Active Partition. The old working image would remain on the Standby partition.
61 Any possibly required (sub-)steps like "commit" are left to the "Device Manager"
62 """
63 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
64 context.set_details('Method not implemented!')
65 raise NotImplementedError('Method not implemented!')
66
67 def RevertToStandbyImage(self, request, context):
68 """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 +010069 This API is to be used if operator wants to go back to the previous software
uwe ottrembka5ea5c0a2020-08-31 10:37:35 +020070 """
71 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
72 context.set_details('Method not implemented!')
73 raise NotImplementedError('Method not implemented!')
74
75
76def add_NativeSoftwareManagementServiceServicer_to_server(servicer, server):
77 rpc_method_handlers = {
78 'GetSoftwareVersion': grpc.unary_unary_rpc_method_handler(
79 servicer.GetSoftwareVersion,
80 request_deserializer=dmi_dot_hw__pb2.HardwareID.FromString,
aghoshc301dcd2020-09-03 16:55:34 +010081 response_serializer=dmi_dot_sw__management__service__pb2.GetSoftwareVersionInformationResponse.SerializeToString,
uwe ottrembka5ea5c0a2020-08-31 10:37:35 +020082 ),
83 'DownloadImage': grpc.unary_stream_rpc_method_handler(
84 servicer.DownloadImage,
85 request_deserializer=dmi_dot_sw__management__service__pb2.DownloadImageRequest.FromString,
86 response_serializer=dmi_dot_sw__image__pb2.ImageStatus.SerializeToString,
87 ),
88 'ActivateImage': grpc.unary_stream_rpc_method_handler(
89 servicer.ActivateImage,
90 request_deserializer=dmi_dot_hw__pb2.HardwareID.FromString,
91 response_serializer=dmi_dot_sw__image__pb2.ImageStatus.SerializeToString,
92 ),
93 'RevertToStandbyImage': grpc.unary_stream_rpc_method_handler(
94 servicer.RevertToStandbyImage,
95 request_deserializer=dmi_dot_hw__pb2.HardwareID.FromString,
96 response_serializer=dmi_dot_sw__image__pb2.ImageStatus.SerializeToString,
97 ),
98 }
99 generic_handler = grpc.method_handlers_generic_handler(
100 'dmi.NativeSoftwareManagementService', rpc_method_handlers)
101 server.add_generic_rpc_handlers((generic_handler,))
102
103
104 # This class is part of an EXPERIMENTAL API.
105class NativeSoftwareManagementService(object):
106 """Missing associated documentation comment in .proto file."""
107
108 @staticmethod
109 def GetSoftwareVersion(request,
110 target,
111 options=(),
112 channel_credentials=None,
113 call_credentials=None,
114 insecure=False,
115 compression=None,
116 wait_for_ready=None,
117 timeout=None,
118 metadata=None):
119 return grpc.experimental.unary_unary(request, target, '/dmi.NativeSoftwareManagementService/GetSoftwareVersion',
120 dmi_dot_hw__pb2.HardwareID.SerializeToString,
aghoshc301dcd2020-09-03 16:55:34 +0100121 dmi_dot_sw__management__service__pb2.GetSoftwareVersionInformationResponse.FromString,
uwe ottrembka5ea5c0a2020-08-31 10:37:35 +0200122 options, channel_credentials,
123 insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
124
125 @staticmethod
126 def DownloadImage(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_stream(request, target, '/dmi.NativeSoftwareManagementService/DownloadImage',
137 dmi_dot_sw__management__service__pb2.DownloadImageRequest.SerializeToString,
138 dmi_dot_sw__image__pb2.ImageStatus.FromString,
139 options, channel_credentials,
140 insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
141
142 @staticmethod
143 def ActivateImage(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/ActivateImage',
154 dmi_dot_hw__pb2.HardwareID.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 RevertToStandbyImage(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/RevertToStandbyImage',
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)