blob: 020289794e00220f72c112a42cdb5d60d1f18171 [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_metrics_mgmt_service_pb2 as dmi_dot_hw__metrics__mgmt__service__pb2
6from dmi import hw_pb2 as dmi_dot_hw__pb2
Chandrakanth Nalkudre Gowda68590a42021-04-22 15:19:21 +05307from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
uwe ottrembka5ea5c0a2020-08-31 10:37:35 +02008
9
10class NativeMetricsManagementServiceStub(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.ListMetrics = channel.unary_unary(
20 '/dmi.NativeMetricsManagementService/ListMetrics',
21 request_serializer=dmi_dot_hw__pb2.HardwareID.SerializeToString,
22 response_deserializer=dmi_dot_hw__metrics__mgmt__service__pb2.ListMetricsResponse.FromString,
23 )
24 self.UpdateMetricsConfiguration = channel.unary_unary(
25 '/dmi.NativeMetricsManagementService/UpdateMetricsConfiguration',
26 request_serializer=dmi_dot_hw__metrics__mgmt__service__pb2.MetricsConfigurationRequest.SerializeToString,
27 response_deserializer=dmi_dot_hw__metrics__mgmt__service__pb2.MetricsConfigurationResponse.FromString,
28 )
29 self.GetMetric = channel.unary_unary(
30 '/dmi.NativeMetricsManagementService/GetMetric',
31 request_serializer=dmi_dot_hw__metrics__mgmt__service__pb2.GetMetricRequest.SerializeToString,
aghoshc301dcd2020-09-03 16:55:34 +010032 response_deserializer=dmi_dot_hw__metrics__mgmt__service__pb2.GetMetricResponse.FromString,
uwe ottrembka5ea5c0a2020-08-31 10:37:35 +020033 )
Chandrakanth Nalkudre Gowda68590a42021-04-22 15:19:21 +053034 self.StreamMetrics = channel.unary_stream(
35 '/dmi.NativeMetricsManagementService/StreamMetrics',
36 request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
37 response_deserializer=dmi_dot_hw__metrics__mgmt__service__pb2.Metric.FromString,
38 )
uwe ottrembka5ea5c0a2020-08-31 10:37:35 +020039
40
41class NativeMetricsManagementServiceServicer(object):
42 """Missing associated documentation comment in .proto file."""
43
44 def ListMetrics(self, request, context):
45 """List the supported metrics for the passed device.
46 This would be the first call that you make to know about the metrics that a particular device supports and
47 then use the UpdateMetricsConfiguration API to monitor only the required metrics.
48 """
49 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
50 context.set_details('Method not implemented!')
51 raise NotImplementedError('Method not implemented!')
52
53 def UpdateMetricsConfiguration(self, request, context):
54 """Updates the configuration of the list of metrics in the request
55 Acts upon single metric configuration, collection of a single metric can be started/stopped
56 by changing its configuration.
57
58 This configuration is persisted across restart of the device or the device manager
59 """
60 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
61 context.set_details('Method not implemented!')
62 raise NotImplementedError('Method not implemented!')
63
64 def GetMetric(self, request, context):
65 """Get the instantenous value of a metric
66 """
67 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
68 context.set_details('Method not implemented!')
69 raise NotImplementedError('Method not implemented!')
70
Chandrakanth Nalkudre Gowda68590a42021-04-22 15:19:21 +053071 def StreamMetrics(self, request, context):
72 """Initiate the server streaming of the metrics
73 """
74 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
75 context.set_details('Method not implemented!')
76 raise NotImplementedError('Method not implemented!')
77
uwe ottrembka5ea5c0a2020-08-31 10:37:35 +020078
79def add_NativeMetricsManagementServiceServicer_to_server(servicer, server):
80 rpc_method_handlers = {
81 'ListMetrics': grpc.unary_unary_rpc_method_handler(
82 servicer.ListMetrics,
83 request_deserializer=dmi_dot_hw__pb2.HardwareID.FromString,
84 response_serializer=dmi_dot_hw__metrics__mgmt__service__pb2.ListMetricsResponse.SerializeToString,
85 ),
86 'UpdateMetricsConfiguration': grpc.unary_unary_rpc_method_handler(
87 servicer.UpdateMetricsConfiguration,
88 request_deserializer=dmi_dot_hw__metrics__mgmt__service__pb2.MetricsConfigurationRequest.FromString,
89 response_serializer=dmi_dot_hw__metrics__mgmt__service__pb2.MetricsConfigurationResponse.SerializeToString,
90 ),
91 'GetMetric': grpc.unary_unary_rpc_method_handler(
92 servicer.GetMetric,
93 request_deserializer=dmi_dot_hw__metrics__mgmt__service__pb2.GetMetricRequest.FromString,
aghoshc301dcd2020-09-03 16:55:34 +010094 response_serializer=dmi_dot_hw__metrics__mgmt__service__pb2.GetMetricResponse.SerializeToString,
uwe ottrembka5ea5c0a2020-08-31 10:37:35 +020095 ),
Chandrakanth Nalkudre Gowda68590a42021-04-22 15:19:21 +053096 'StreamMetrics': grpc.unary_stream_rpc_method_handler(
97 servicer.StreamMetrics,
98 request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
99 response_serializer=dmi_dot_hw__metrics__mgmt__service__pb2.Metric.SerializeToString,
100 ),
uwe ottrembka5ea5c0a2020-08-31 10:37:35 +0200101 }
102 generic_handler = grpc.method_handlers_generic_handler(
103 'dmi.NativeMetricsManagementService', rpc_method_handlers)
104 server.add_generic_rpc_handlers((generic_handler,))
105
106
107 # This class is part of an EXPERIMENTAL API.
108class NativeMetricsManagementService(object):
109 """Missing associated documentation comment in .proto file."""
110
111 @staticmethod
112 def ListMetrics(request,
113 target,
114 options=(),
115 channel_credentials=None,
116 call_credentials=None,
117 insecure=False,
118 compression=None,
119 wait_for_ready=None,
120 timeout=None,
121 metadata=None):
122 return grpc.experimental.unary_unary(request, target, '/dmi.NativeMetricsManagementService/ListMetrics',
123 dmi_dot_hw__pb2.HardwareID.SerializeToString,
124 dmi_dot_hw__metrics__mgmt__service__pb2.ListMetricsResponse.FromString,
125 options, channel_credentials,
126 insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
127
128 @staticmethod
129 def UpdateMetricsConfiguration(request,
130 target,
131 options=(),
132 channel_credentials=None,
133 call_credentials=None,
134 insecure=False,
135 compression=None,
136 wait_for_ready=None,
137 timeout=None,
138 metadata=None):
139 return grpc.experimental.unary_unary(request, target, '/dmi.NativeMetricsManagementService/UpdateMetricsConfiguration',
140 dmi_dot_hw__metrics__mgmt__service__pb2.MetricsConfigurationRequest.SerializeToString,
141 dmi_dot_hw__metrics__mgmt__service__pb2.MetricsConfigurationResponse.FromString,
142 options, channel_credentials,
143 insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
144
145 @staticmethod
146 def GetMetric(request,
147 target,
148 options=(),
149 channel_credentials=None,
150 call_credentials=None,
151 insecure=False,
152 compression=None,
153 wait_for_ready=None,
154 timeout=None,
155 metadata=None):
156 return grpc.experimental.unary_unary(request, target, '/dmi.NativeMetricsManagementService/GetMetric',
157 dmi_dot_hw__metrics__mgmt__service__pb2.GetMetricRequest.SerializeToString,
aghoshc301dcd2020-09-03 16:55:34 +0100158 dmi_dot_hw__metrics__mgmt__service__pb2.GetMetricResponse.FromString,
uwe ottrembka5ea5c0a2020-08-31 10:37:35 +0200159 options, channel_credentials,
160 insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
Chandrakanth Nalkudre Gowda68590a42021-04-22 15:19:21 +0530161
162 @staticmethod
163 def StreamMetrics(request,
164 target,
165 options=(),
166 channel_credentials=None,
167 call_credentials=None,
168 insecure=False,
169 compression=None,
170 wait_for_ready=None,
171 timeout=None,
172 metadata=None):
173 return grpc.experimental.unary_stream(request, target, '/dmi.NativeMetricsManagementService/StreamMetrics',
174 google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
175 dmi_dot_hw__metrics__mgmt__service__pb2.Metric.FromString,
176 options, channel_credentials,
177 insecure, call_credentials, compression, wait_for_ready, timeout, metadata)