blob: 7a2affa13142300f421a1d9ea224b4a227107226 [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
7
8
9class NativeMetricsManagementServiceStub(object):
10 """Missing associated documentation comment in .proto file."""
11
12 def __init__(self, channel):
13 """Constructor.
14
15 Args:
16 channel: A grpc.Channel.
17 """
18 self.ListMetrics = channel.unary_unary(
19 '/dmi.NativeMetricsManagementService/ListMetrics',
20 request_serializer=dmi_dot_hw__pb2.HardwareID.SerializeToString,
21 response_deserializer=dmi_dot_hw__metrics__mgmt__service__pb2.ListMetricsResponse.FromString,
22 )
23 self.UpdateMetricsConfiguration = channel.unary_unary(
24 '/dmi.NativeMetricsManagementService/UpdateMetricsConfiguration',
25 request_serializer=dmi_dot_hw__metrics__mgmt__service__pb2.MetricsConfigurationRequest.SerializeToString,
26 response_deserializer=dmi_dot_hw__metrics__mgmt__service__pb2.MetricsConfigurationResponse.FromString,
27 )
28 self.GetMetric = channel.unary_unary(
29 '/dmi.NativeMetricsManagementService/GetMetric',
30 request_serializer=dmi_dot_hw__metrics__mgmt__service__pb2.GetMetricRequest.SerializeToString,
aghoshc301dcd2020-09-03 16:55:34 +010031 response_deserializer=dmi_dot_hw__metrics__mgmt__service__pb2.GetMetricResponse.FromString,
uwe ottrembka5ea5c0a2020-08-31 10:37:35 +020032 )
33
34
35class NativeMetricsManagementServiceServicer(object):
36 """Missing associated documentation comment in .proto file."""
37
38 def ListMetrics(self, request, context):
39 """List the supported metrics for the passed device.
40 This would be the first call that you make to know about the metrics that a particular device supports and
41 then use the UpdateMetricsConfiguration API to monitor only the required metrics.
42 """
43 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
44 context.set_details('Method not implemented!')
45 raise NotImplementedError('Method not implemented!')
46
47 def UpdateMetricsConfiguration(self, request, context):
48 """Updates the configuration of the list of metrics in the request
49 Acts upon single metric configuration, collection of a single metric can be started/stopped
50 by changing its configuration.
51
52 This configuration is persisted across restart of the device or the device manager
53 """
54 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
55 context.set_details('Method not implemented!')
56 raise NotImplementedError('Method not implemented!')
57
58 def GetMetric(self, request, context):
59 """Get the instantenous value of a metric
60 """
61 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
62 context.set_details('Method not implemented!')
63 raise NotImplementedError('Method not implemented!')
64
65
66def add_NativeMetricsManagementServiceServicer_to_server(servicer, server):
67 rpc_method_handlers = {
68 'ListMetrics': grpc.unary_unary_rpc_method_handler(
69 servicer.ListMetrics,
70 request_deserializer=dmi_dot_hw__pb2.HardwareID.FromString,
71 response_serializer=dmi_dot_hw__metrics__mgmt__service__pb2.ListMetricsResponse.SerializeToString,
72 ),
73 'UpdateMetricsConfiguration': grpc.unary_unary_rpc_method_handler(
74 servicer.UpdateMetricsConfiguration,
75 request_deserializer=dmi_dot_hw__metrics__mgmt__service__pb2.MetricsConfigurationRequest.FromString,
76 response_serializer=dmi_dot_hw__metrics__mgmt__service__pb2.MetricsConfigurationResponse.SerializeToString,
77 ),
78 'GetMetric': grpc.unary_unary_rpc_method_handler(
79 servicer.GetMetric,
80 request_deserializer=dmi_dot_hw__metrics__mgmt__service__pb2.GetMetricRequest.FromString,
aghoshc301dcd2020-09-03 16:55:34 +010081 response_serializer=dmi_dot_hw__metrics__mgmt__service__pb2.GetMetricResponse.SerializeToString,
uwe ottrembka5ea5c0a2020-08-31 10:37:35 +020082 ),
83 }
84 generic_handler = grpc.method_handlers_generic_handler(
85 'dmi.NativeMetricsManagementService', rpc_method_handlers)
86 server.add_generic_rpc_handlers((generic_handler,))
87
88
89 # This class is part of an EXPERIMENTAL API.
90class NativeMetricsManagementService(object):
91 """Missing associated documentation comment in .proto file."""
92
93 @staticmethod
94 def ListMetrics(request,
95 target,
96 options=(),
97 channel_credentials=None,
98 call_credentials=None,
99 insecure=False,
100 compression=None,
101 wait_for_ready=None,
102 timeout=None,
103 metadata=None):
104 return grpc.experimental.unary_unary(request, target, '/dmi.NativeMetricsManagementService/ListMetrics',
105 dmi_dot_hw__pb2.HardwareID.SerializeToString,
106 dmi_dot_hw__metrics__mgmt__service__pb2.ListMetricsResponse.FromString,
107 options, channel_credentials,
108 insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
109
110 @staticmethod
111 def UpdateMetricsConfiguration(request,
112 target,
113 options=(),
114 channel_credentials=None,
115 call_credentials=None,
116 insecure=False,
117 compression=None,
118 wait_for_ready=None,
119 timeout=None,
120 metadata=None):
121 return grpc.experimental.unary_unary(request, target, '/dmi.NativeMetricsManagementService/UpdateMetricsConfiguration',
122 dmi_dot_hw__metrics__mgmt__service__pb2.MetricsConfigurationRequest.SerializeToString,
123 dmi_dot_hw__metrics__mgmt__service__pb2.MetricsConfigurationResponse.FromString,
124 options, channel_credentials,
125 insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
126
127 @staticmethod
128 def GetMetric(request,
129 target,
130 options=(),
131 channel_credentials=None,
132 call_credentials=None,
133 insecure=False,
134 compression=None,
135 wait_for_ready=None,
136 timeout=None,
137 metadata=None):
138 return grpc.experimental.unary_unary(request, target, '/dmi.NativeMetricsManagementService/GetMetric',
139 dmi_dot_hw__metrics__mgmt__service__pb2.GetMetricRequest.SerializeToString,
aghoshc301dcd2020-09-03 16:55:34 +0100140 dmi_dot_hw__metrics__mgmt__service__pb2.GetMetricResponse.FromString,
uwe ottrembka5ea5c0a2020-08-31 10:37:35 +0200141 options, channel_credentials,
142 insecure, call_credentials, compression, wait_for_ready, timeout, metadata)