VOL-3741: Create per RPC Error Reason Enumeration
Change-Id: I4488a169d6cd1bdeff9cba898a1107dc1dbda928
diff --git a/python/dmi/hw_metrics_mgmt_service_pb2.py b/python/dmi/hw_metrics_mgmt_service_pb2.py
index b080bb8..4362c37 100644
--- a/python/dmi/hw_metrics_mgmt_service_pb2.py
+++ b/python/dmi/hw_metrics_mgmt_service_pb2.py
@@ -22,7 +22,7 @@
syntax='proto3',
serialized_options=b'Z9github.com/opencord/device-management-interface/v3/go/dmi',
create_key=_descriptor._internal_create_key,
- serialized_pb=b'\n!dmi/hw_metrics_mgmt_service.proto\x12\x03\x64mi\x1a\x11\x64mi/commons.proto\x1a\x0c\x64mi/hw.proto\"a\n\x0cMetricConfig\x12#\n\tmetric_id\x18\x01 \x01(\x0e\x32\x10.dmi.MetricNames\x12\x15\n\ris_configured\x18\x02 \x01(\x08\x12\x15\n\rpoll_interval\x18\x03 \x01(\r\"3\n\rMetricsConfig\x12\"\n\x07metrics\x18\x01 \x03(\x0b\x32\x11.dmi.MetricConfig\"t\n\x13ListMetricsResponse\x12\x1b\n\x06status\x18\x01 \x01(\x0e\x32\x0b.dmi.Status\x12\x1b\n\x06reason\x18\x02 \x01(\x0e\x32\x0b.dmi.Reason\x12#\n\x07metrics\x18\x03 \x01(\x0b\x32\x12.dmi.MetricsConfig\"\x8d\x01\n\x1bMetricsConfigurationRequest\x12\x1e\n\x0b\x64\x65vice_uuid\x18\x01 \x01(\x0b\x32\t.dmi.Uuid\x12%\n\x07\x63hanges\x18\x02 \x01(\x0b\x32\x12.dmi.MetricsConfigH\x00\x12\x1a\n\x10reset_to_default\x18\x03 \x01(\x08H\x00\x42\x0b\n\toperation\"X\n\x1cMetricsConfigurationResponse\x12\x1b\n\x06status\x18\x01 \x01(\x0e\x32\x0b.dmi.Status\x12\x1b\n\x06reason\x18\x02 \x01(\x0e\x32\x0b.dmi.Reason\"k\n\x0eMetricMetaData\x12\x1e\n\x0b\x64\x65vice_uuid\x18\x01 \x01(\x0b\x32\t.dmi.Uuid\x12!\n\x0e\x63omponent_uuid\x18\x02 \x01(\x0b\x32\t.dmi.Uuid\x12\x16\n\x0e\x63omponent_name\x18\x03 \x01(\t\"\x84\x01\n\x06Metric\x12#\n\tmetric_id\x18\x01 \x01(\x0e\x32\x10.dmi.MetricNames\x12,\n\x0fmetric_metadata\x18\x02 \x01(\x0b\x32\x13.dmi.MetricMetaData\x12\'\n\x05value\x18\x03 \x01(\x0b\x32\x18.dmi.ComponentSensorData\"_\n\x10GetMetricRequest\x12&\n\tmeta_data\x18\x01 \x01(\x0b\x32\x13.dmi.MetricMetaData\x12#\n\tmetric_id\x18\x02 \x01(\x0e\x32\x10.dmi.MetricNames\"j\n\x11GetMetricResponse\x12\x1b\n\x06status\x18\x01 \x01(\x0e\x32\x0b.dmi.Status\x12\x1b\n\x06reason\x18\x02 \x01(\x0e\x32\x0b.dmi.Reason\x12\x1b\n\x06metric\x18\x03 \x01(\x0b\x32\x0b.dmi.Metric*\xd9\x05\n\x0bMetricNames\x12\x19\n\x15METRIC_NAME_UNDEFINED\x10\x00\x12\x14\n\x10METRIC_FAN_SPEED\x10\x01\x12\x13\n\x0fMETRIC_CPU_TEMP\x10\x64\x12\x1f\n\x1bMETRIC_CPU_USAGE_PERCENTAGE\x10\x65\x12\x1c\n\x17METRIC_TRANSCEIVER_TEMP\x10\xc8\x01\x12\x1f\n\x1aMETRIC_TRANSCEIVER_VOLTAGE\x10\xc9\x01\x12\x1c\n\x17METRIC_TRANSCEIVER_BIAS\x10\xca\x01\x12 \n\x1bMETRIC_TRANSCEIVER_RX_POWER\x10\xcb\x01\x12 \n\x1bMETRIC_TRANSCEIVER_TX_POWER\x10\xcc\x01\x12\"\n\x1dMETRIC_TRANSCEIVER_WAVELENGTH\x10\xcd\x01\x12\x15\n\x10METRIC_DISK_TEMP\x10\xac\x02\x12\x19\n\x14METRIC_DISK_CAPACITY\x10\xad\x02\x12\x16\n\x11METRIC_DISK_USAGE\x10\xae\x02\x12!\n\x1cMETRIC_DISK_USAGE_PERCENTAGE\x10\xaf\x02\x12&\n!METRIC_DISK_READ_WRITE_PERCENTAGE\x10\xb0\x02\x12(\n#METRIC_DISK_FAULTY_CELLS_PERCENTAGE\x10\xb1\x02\x12\x14\n\x0fMETRIC_RAM_TEMP\x10\x90\x03\x12\x18\n\x13METRIC_RAM_CAPACITY\x10\x91\x03\x12\x15\n\x10METRIC_RAM_USAGE\x10\x92\x03\x12 \n\x1bMETRIC_RAM_USAGE_PERCENTAGE\x10\x93\x03\x12\x15\n\x10METRIC_POWER_MAX\x10\xf4\x03\x12\x17\n\x12METRIC_POWER_USAGE\x10\xf5\x03\x12\"\n\x1dMETRIC_POWER_USAGE_PERCENTAGE\x10\xf6\x03\x12\"\n\x1dMETRIC_INNER_SURROUNDING_TEMP\x10\xd8\x04\x32\xf9\x01\n\x1eNativeMetricsManagementService\x12\x38\n\x0bListMetrics\x12\x0f.dmi.HardwareID\x1a\x18.dmi.ListMetricsResponse\x12\x61\n\x1aUpdateMetricsConfiguration\x12 .dmi.MetricsConfigurationRequest\x1a!.dmi.MetricsConfigurationResponse\x12:\n\tGetMetric\x12\x15.dmi.GetMetricRequest\x1a\x16.dmi.GetMetricResponseB;Z9github.com/opencord/device-management-interface/v3/go/dmib\x06proto3'
+ serialized_pb=b'\n!dmi/hw_metrics_mgmt_service.proto\x12\x03\x64mi\x1a\x11\x64mi/commons.proto\x1a\x0c\x64mi/hw.proto\"a\n\x0cMetricConfig\x12#\n\tmetric_id\x18\x01 \x01(\x0e\x32\x10.dmi.MetricNames\x12\x15\n\ris_configured\x18\x02 \x01(\x08\x12\x15\n\rpoll_interval\x18\x03 \x01(\r\"3\n\rMetricsConfig\x12\"\n\x07metrics\x18\x01 \x03(\x0b\x32\x11.dmi.MetricConfig\"\xd0\x01\n\x13ListMetricsResponse\x12\x1b\n\x06status\x18\x01 \x01(\x0e\x32\x0b.dmi.Status\x12/\n\x06reason\x18\x02 \x01(\x0e\x32\x1f.dmi.ListMetricsResponse.Reason\x12#\n\x07metrics\x18\x03 \x01(\x0b\x32\x12.dmi.MetricsConfig\"F\n\x06Reason\x12\x14\n\x10UNDEFINED_REASON\x10\x00\x12\x12\n\x0eUNKNOWN_DEVICE\x10\x01\x12\x12\n\x0eINTERNAL_ERROR\x10\x02\"\x8d\x01\n\x1bMetricsConfigurationRequest\x12\x1e\n\x0b\x64\x65vice_uuid\x18\x01 \x01(\x0b\x32\t.dmi.Uuid\x12%\n\x07\x63hanges\x18\x02 \x01(\x0b\x32\x12.dmi.MetricsConfigH\x00\x12\x1a\n\x10reset_to_default\x18\x03 \x01(\x08H\x00\x42\x0b\n\toperation\"\xf0\x01\n\x1cMetricsConfigurationResponse\x12\x1b\n\x06status\x18\x01 \x01(\x0e\x32\x0b.dmi.Status\x12\x38\n\x06reason\x18\x02 \x01(\x0e\x32(.dmi.MetricsConfigurationResponse.Reason\"y\n\x06Reason\x12\x14\n\x10UNDEFINED_REASON\x10\x00\x12\x12\n\x0eUNKNOWN_DEVICE\x10\x01\x12\x12\n\x0eINTERNAL_ERROR\x10\x02\x12\x1d\n\x19POLL_INTERVAL_UNSUPPORTED\x10\x03\x12\x12\n\x0eINVALID_METRIC\x10\x04\"k\n\x0eMetricMetaData\x12\x1e\n\x0b\x64\x65vice_uuid\x18\x01 \x01(\x0b\x32\t.dmi.Uuid\x12!\n\x0e\x63omponent_uuid\x18\x02 \x01(\x0b\x32\t.dmi.Uuid\x12\x16\n\x0e\x63omponent_name\x18\x03 \x01(\t\"\x84\x01\n\x06Metric\x12#\n\tmetric_id\x18\x01 \x01(\x0e\x32\x10.dmi.MetricNames\x12,\n\x0fmetric_metadata\x18\x02 \x01(\x0b\x32\x13.dmi.MetricMetaData\x12\'\n\x05value\x18\x03 \x01(\x0b\x32\x18.dmi.ComponentSensorData\"_\n\x10GetMetricRequest\x12&\n\tmeta_data\x18\x01 \x01(\x0b\x32\x13.dmi.MetricMetaData\x12#\n\tmetric_id\x18\x02 \x01(\x0e\x32\x10.dmi.MetricNames\"\xef\x01\n\x11GetMetricResponse\x12\x1b\n\x06status\x18\x01 \x01(\x0e\x32\x0b.dmi.Status\x12-\n\x06reason\x18\x02 \x01(\x0e\x32\x1d.dmi.GetMetricResponse.Reason\x12\x1b\n\x06metric\x18\x03 \x01(\x0b\x32\x0b.dmi.Metric\"q\n\x06Reason\x12\x14\n\x10UNDEFINED_REASON\x10\x00\x12\x12\n\x0eUNKNOWN_DEVICE\x10\x01\x12\x15\n\x11UNKNOWN_COMPONENT\x10\x02\x12\x12\n\x0eINTERNAL_ERROR\x10\x03\x12\x12\n\x0eINVALID_METRIC\x10\x04*\xd9\x05\n\x0bMetricNames\x12\x19\n\x15METRIC_NAME_UNDEFINED\x10\x00\x12\x14\n\x10METRIC_FAN_SPEED\x10\x01\x12\x13\n\x0fMETRIC_CPU_TEMP\x10\x64\x12\x1f\n\x1bMETRIC_CPU_USAGE_PERCENTAGE\x10\x65\x12\x1c\n\x17METRIC_TRANSCEIVER_TEMP\x10\xc8\x01\x12\x1f\n\x1aMETRIC_TRANSCEIVER_VOLTAGE\x10\xc9\x01\x12\x1c\n\x17METRIC_TRANSCEIVER_BIAS\x10\xca\x01\x12 \n\x1bMETRIC_TRANSCEIVER_RX_POWER\x10\xcb\x01\x12 \n\x1bMETRIC_TRANSCEIVER_TX_POWER\x10\xcc\x01\x12\"\n\x1dMETRIC_TRANSCEIVER_WAVELENGTH\x10\xcd\x01\x12\x15\n\x10METRIC_DISK_TEMP\x10\xac\x02\x12\x19\n\x14METRIC_DISK_CAPACITY\x10\xad\x02\x12\x16\n\x11METRIC_DISK_USAGE\x10\xae\x02\x12!\n\x1cMETRIC_DISK_USAGE_PERCENTAGE\x10\xaf\x02\x12&\n!METRIC_DISK_READ_WRITE_PERCENTAGE\x10\xb0\x02\x12(\n#METRIC_DISK_FAULTY_CELLS_PERCENTAGE\x10\xb1\x02\x12\x14\n\x0fMETRIC_RAM_TEMP\x10\x90\x03\x12\x18\n\x13METRIC_RAM_CAPACITY\x10\x91\x03\x12\x15\n\x10METRIC_RAM_USAGE\x10\x92\x03\x12 \n\x1bMETRIC_RAM_USAGE_PERCENTAGE\x10\x93\x03\x12\x15\n\x10METRIC_POWER_MAX\x10\xf4\x03\x12\x17\n\x12METRIC_POWER_USAGE\x10\xf5\x03\x12\"\n\x1dMETRIC_POWER_USAGE_PERCENTAGE\x10\xf6\x03\x12\"\n\x1dMETRIC_INNER_SURROUNDING_TEMP\x10\xd8\x04\x32\xf9\x01\n\x1eNativeMetricsManagementService\x12\x38\n\x0bListMetrics\x12\x0f.dmi.HardwareID\x1a\x18.dmi.ListMetricsResponse\x12\x61\n\x1aUpdateMetricsConfiguration\x12 .dmi.MetricsConfigurationRequest\x1a!.dmi.MetricsConfigurationResponse\x12:\n\tGetMetric\x12\x15.dmi.GetMetricRequest\x1a\x16.dmi.GetMetricResponseB;Z9github.com/opencord/device-management-interface/v3/go/dmib\x06proto3'
,
dependencies=[dmi_dot_commons__pb2.DESCRIPTOR,dmi_dot_hw__pb2.DESCRIPTOR,])
@@ -156,8 +156,8 @@
],
containing_type=None,
serialized_options=None,
- serialized_start=1029,
- serialized_end=1758,
+ serialized_start=1409,
+ serialized_end=2138,
)
_sym_db.RegisterEnumDescriptor(_METRICNAMES)
@@ -188,6 +188,116 @@
METRIC_INNER_SURROUNDING_TEMP = 600
+_LISTMETRICSRESPONSE_REASON = _descriptor.EnumDescriptor(
+ name='Reason',
+ full_name='dmi.ListMetricsResponse.Reason',
+ filename=None,
+ file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
+ values=[
+ _descriptor.EnumValueDescriptor(
+ name='UNDEFINED_REASON', index=0, number=0,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='UNKNOWN_DEVICE', index=1, number=1,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='INTERNAL_ERROR', index=2, number=2,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ ],
+ containing_type=None,
+ serialized_options=None,
+ serialized_start=366,
+ serialized_end=436,
+)
+_sym_db.RegisterEnumDescriptor(_LISTMETRICSRESPONSE_REASON)
+
+_METRICSCONFIGURATIONRESPONSE_REASON = _descriptor.EnumDescriptor(
+ name='Reason',
+ full_name='dmi.MetricsConfigurationResponse.Reason',
+ filename=None,
+ file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
+ values=[
+ _descriptor.EnumValueDescriptor(
+ name='UNDEFINED_REASON', index=0, number=0,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='UNKNOWN_DEVICE', index=1, number=1,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='INTERNAL_ERROR', index=2, number=2,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='POLL_INTERVAL_UNSUPPORTED', index=3, number=3,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='INVALID_METRIC', index=4, number=4,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ ],
+ containing_type=None,
+ serialized_options=None,
+ serialized_start=702,
+ serialized_end=823,
+)
+_sym_db.RegisterEnumDescriptor(_METRICSCONFIGURATIONRESPONSE_REASON)
+
+_GETMETRICRESPONSE_REASON = _descriptor.EnumDescriptor(
+ name='Reason',
+ full_name='dmi.GetMetricResponse.Reason',
+ filename=None,
+ file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
+ values=[
+ _descriptor.EnumValueDescriptor(
+ name='UNDEFINED_REASON', index=0, number=0,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='UNKNOWN_DEVICE', index=1, number=1,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='UNKNOWN_COMPONENT', index=2, number=2,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='INTERNAL_ERROR', index=3, number=3,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='INVALID_METRIC', index=4, number=4,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ ],
+ containing_type=None,
+ serialized_options=None,
+ serialized_start=1293,
+ serialized_end=1406,
+)
+_sym_db.RegisterEnumDescriptor(_GETMETRICRESPONSE_REASON)
+
_METRICCONFIG = _descriptor.Descriptor(
name='MetricConfig',
@@ -301,6 +411,7 @@
],
nested_types=[],
enum_types=[
+ _LISTMETRICSRESPONSE_REASON,
],
serialized_options=None,
is_extendable=False,
@@ -308,8 +419,8 @@
extension_ranges=[],
oneofs=[
],
- serialized_start=227,
- serialized_end=343,
+ serialized_start=228,
+ serialized_end=436,
)
@@ -359,8 +470,8 @@
create_key=_descriptor._internal_create_key,
fields=[]),
],
- serialized_start=346,
- serialized_end=487,
+ serialized_start=439,
+ serialized_end=580,
)
@@ -391,6 +502,7 @@
],
nested_types=[],
enum_types=[
+ _METRICSCONFIGURATIONRESPONSE_REASON,
],
serialized_options=None,
is_extendable=False,
@@ -398,8 +510,8 @@
extension_ranges=[],
oneofs=[
],
- serialized_start=489,
- serialized_end=577,
+ serialized_start=583,
+ serialized_end=823,
)
@@ -444,8 +556,8 @@
extension_ranges=[],
oneofs=[
],
- serialized_start=579,
- serialized_end=686,
+ serialized_start=825,
+ serialized_end=932,
)
@@ -490,8 +602,8 @@
extension_ranges=[],
oneofs=[
],
- serialized_start=689,
- serialized_end=821,
+ serialized_start=935,
+ serialized_end=1067,
)
@@ -529,8 +641,8 @@
extension_ranges=[],
oneofs=[
],
- serialized_start=823,
- serialized_end=918,
+ serialized_start=1069,
+ serialized_end=1164,
)
@@ -568,6 +680,7 @@
],
nested_types=[],
enum_types=[
+ _GETMETRICRESPONSE_REASON,
],
serialized_options=None,
is_extendable=False,
@@ -575,15 +688,16 @@
extension_ranges=[],
oneofs=[
],
- serialized_start=920,
- serialized_end=1026,
+ serialized_start=1167,
+ serialized_end=1406,
)
_METRICCONFIG.fields_by_name['metric_id'].enum_type = _METRICNAMES
_METRICSCONFIG.fields_by_name['metrics'].message_type = _METRICCONFIG
_LISTMETRICSRESPONSE.fields_by_name['status'].enum_type = dmi_dot_commons__pb2._STATUS
-_LISTMETRICSRESPONSE.fields_by_name['reason'].enum_type = dmi_dot_commons__pb2._REASON
+_LISTMETRICSRESPONSE.fields_by_name['reason'].enum_type = _LISTMETRICSRESPONSE_REASON
_LISTMETRICSRESPONSE.fields_by_name['metrics'].message_type = _METRICSCONFIG
+_LISTMETRICSRESPONSE_REASON.containing_type = _LISTMETRICSRESPONSE
_METRICSCONFIGURATIONREQUEST.fields_by_name['device_uuid'].message_type = dmi_dot_hw__pb2._UUID
_METRICSCONFIGURATIONREQUEST.fields_by_name['changes'].message_type = _METRICSCONFIG
_METRICSCONFIGURATIONREQUEST.oneofs_by_name['operation'].fields.append(
@@ -593,7 +707,8 @@
_METRICSCONFIGURATIONREQUEST.fields_by_name['reset_to_default'])
_METRICSCONFIGURATIONREQUEST.fields_by_name['reset_to_default'].containing_oneof = _METRICSCONFIGURATIONREQUEST.oneofs_by_name['operation']
_METRICSCONFIGURATIONRESPONSE.fields_by_name['status'].enum_type = dmi_dot_commons__pb2._STATUS
-_METRICSCONFIGURATIONRESPONSE.fields_by_name['reason'].enum_type = dmi_dot_commons__pb2._REASON
+_METRICSCONFIGURATIONRESPONSE.fields_by_name['reason'].enum_type = _METRICSCONFIGURATIONRESPONSE_REASON
+_METRICSCONFIGURATIONRESPONSE_REASON.containing_type = _METRICSCONFIGURATIONRESPONSE
_METRICMETADATA.fields_by_name['device_uuid'].message_type = dmi_dot_hw__pb2._UUID
_METRICMETADATA.fields_by_name['component_uuid'].message_type = dmi_dot_hw__pb2._UUID
_METRIC.fields_by_name['metric_id'].enum_type = _METRICNAMES
@@ -602,8 +717,9 @@
_GETMETRICREQUEST.fields_by_name['meta_data'].message_type = _METRICMETADATA
_GETMETRICREQUEST.fields_by_name['metric_id'].enum_type = _METRICNAMES
_GETMETRICRESPONSE.fields_by_name['status'].enum_type = dmi_dot_commons__pb2._STATUS
-_GETMETRICRESPONSE.fields_by_name['reason'].enum_type = dmi_dot_commons__pb2._REASON
+_GETMETRICRESPONSE.fields_by_name['reason'].enum_type = _GETMETRICRESPONSE_REASON
_GETMETRICRESPONSE.fields_by_name['metric'].message_type = _METRIC
+_GETMETRICRESPONSE_REASON.containing_type = _GETMETRICRESPONSE
DESCRIPTOR.message_types_by_name['MetricConfig'] = _METRICCONFIG
DESCRIPTOR.message_types_by_name['MetricsConfig'] = _METRICSCONFIG
DESCRIPTOR.message_types_by_name['ListMetricsResponse'] = _LISTMETRICSRESPONSE
@@ -689,8 +805,8 @@
index=0,
serialized_options=None,
create_key=_descriptor._internal_create_key,
- serialized_start=1761,
- serialized_end=2010,
+ serialized_start=2141,
+ serialized_end=2390,
methods=[
_descriptor.MethodDescriptor(
name='ListMetrics',