[VOL-3543] Introducing log related APIs
Change-Id: I82f5b42dafabae9f6f7c7b7f822ae32a8ffb7984
diff --git a/python/dmi/commons_pb2.py b/python/dmi/commons_pb2.py
index 8decd2b..fb2f027 100644
--- a/python/dmi/commons_pb2.py
+++ b/python/dmi/commons_pb2.py
@@ -20,7 +20,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\x11\x64mi/commons.proto\x12\x03\x64mi*1\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\x06\n\x02OK\x10\x01\x12\t\n\x05\x45RROR\x10\x02*\xc4\x01\n\x06Reason\x12\x14\n\x10UNDEFINED_REASON\x10\x00\x12\x12\n\x0eUNKNOWN_DEVICE\x10\x01\x12\x12\n\x0eINTERNAL_ERROR\x10\x02\x12\x10\n\x0cWRONG_METRIC\x10\x03\x12\x0f\n\x0bWRONG_EVENT\x10\x04\x12\x1a\n\x16LOGGING_ENDPOINT_ERROR\x10\x05\x12#\n\x1fLOGGING_ENDPOINT_PROTOCOL_ERROR\x10\x06\x12\x18\n\x14KAFKA_ENDPOINT_ERROR\x10\x07\x42;Z9github.com/opencord/device-management-interface/v3/go/dmib\x06proto3'
+ serialized_pb=b'\n\x11\x64mi/commons.proto\x12\x03\x64mi*?\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\r\n\tOK_STATUS\x10\x01\x12\x10\n\x0c\x45RROR_STATUS\x10\x02*\xc4\x01\n\x06Reason\x12\x14\n\x10UNDEFINED_REASON\x10\x00\x12\x12\n\x0eUNKNOWN_DEVICE\x10\x01\x12\x12\n\x0eINTERNAL_ERROR\x10\x02\x12\x10\n\x0cWRONG_METRIC\x10\x03\x12\x0f\n\x0bWRONG_EVENT\x10\x04\x12\x1a\n\x16LOGGING_ENDPOINT_ERROR\x10\x05\x12#\n\x1fLOGGING_ENDPOINT_PROTOCOL_ERROR\x10\x06\x12\x18\n\x14KAFKA_ENDPOINT_ERROR\x10\x07*?\n\x08LogLevel\x12\t\n\x05TRACE\x10\x00\x12\t\n\x05\x44\x45\x42UG\x10\x01\x12\x08\n\x04INFO\x10\x02\x12\x08\n\x04WARN\x10\x03\x12\t\n\x05\x45RROR\x10\x04\x42;Z9github.com/opencord/device-management-interface/v3/go/dmib\x06proto3'
)
_STATUS = _descriptor.EnumDescriptor(
@@ -36,12 +36,12 @@
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
- name='OK', index=1, number=1,
+ name='OK_STATUS', index=1, number=1,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
- name='ERROR', index=2, number=2,
+ name='ERROR_STATUS', index=2, number=2,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
@@ -49,7 +49,7 @@
containing_type=None,
serialized_options=None,
serialized_start=26,
- serialized_end=75,
+ serialized_end=89,
)
_sym_db.RegisterEnumDescriptor(_STATUS)
@@ -104,15 +104,56 @@
],
containing_type=None,
serialized_options=None,
- serialized_start=78,
- serialized_end=274,
+ serialized_start=92,
+ serialized_end=288,
)
_sym_db.RegisterEnumDescriptor(_REASON)
Reason = enum_type_wrapper.EnumTypeWrapper(_REASON)
+_LOGLEVEL = _descriptor.EnumDescriptor(
+ name='LogLevel',
+ full_name='dmi.LogLevel',
+ filename=None,
+ file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
+ values=[
+ _descriptor.EnumValueDescriptor(
+ name='TRACE', index=0, number=0,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='DEBUG', index=1, number=1,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='INFO', index=2, number=2,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='WARN', index=3, number=3,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ERROR', index=4, number=4,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ ],
+ containing_type=None,
+ serialized_options=None,
+ serialized_start=290,
+ serialized_end=353,
+)
+_sym_db.RegisterEnumDescriptor(_LOGLEVEL)
+
+LogLevel = enum_type_wrapper.EnumTypeWrapper(_LOGLEVEL)
UNDEFINED_STATUS = 0
-OK = 1
-ERROR = 2
+OK_STATUS = 1
+ERROR_STATUS = 2
UNDEFINED_REASON = 0
UNKNOWN_DEVICE = 1
INTERNAL_ERROR = 2
@@ -121,10 +162,16 @@
LOGGING_ENDPOINT_ERROR = 5
LOGGING_ENDPOINT_PROTOCOL_ERROR = 6
KAFKA_ENDPOINT_ERROR = 7
+TRACE = 0
+DEBUG = 1
+INFO = 2
+WARN = 3
+ERROR = 4
DESCRIPTOR.enum_types_by_name['Status'] = _STATUS
DESCRIPTOR.enum_types_by_name['Reason'] = _REASON
+DESCRIPTOR.enum_types_by_name['LogLevel'] = _LOGLEVEL
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
diff --git a/python/dmi/hw_management_service_pb2.py b/python/dmi/hw_management_service_pb2.py
index b34a867..58de7dc 100644
--- a/python/dmi/hw_management_service_pb2.py
+++ b/python/dmi/hw_management_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\x1f\x64mi/hw_management_service.proto\x12\x03\x64mi\x1a\x11\x64mi/commons.proto\x1a\x0c\x64mi/hw.proto\x1a\x1bgoogle/protobuf/empty.proto\":\n\x18PhysicalInventoryRequest\x12\x1e\n\x0b\x64\x65vice_uuid\x18\x01 \x01(\x0b\x32\t.dmi.Uuid\"w\n\x19PhysicalInventoryResponse\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\tinventory\x18\x03 \x01(\x0b\x32\r.dmi.Hardware\"v\n\x19HWComponentInfoGetRequest\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\"y\n\x1aHWComponentInfoGetResponse\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\tcomponent\x18\x03 \x01(\x0b\x32\x0e.dmi.Component\"\xa1\x01\n\x19HWComponentInfoSetRequest\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\x12)\n\x07\x63hanges\x18\x04 \x01(\x0b\x32\x18.dmi.ModifiableComponent\"V\n\x1aHWComponentInfoSetResponse\x12\x1b\n\x06status\x18\x01 \x01(\x0e\x32\x0b.dmi.Status\x12\x1b\n\x06reason\x18\x02 \x01(\x0e\x32\x0b.dmi.Reason\"w\n\x1bStartManagingDeviceResponse\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\x1e\n\x0b\x64\x65vice_uuid\x18\x03 \x01(\x0b\x32\t.dmi.Uuid\")\n\x19StopManagingDeviceRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"V\n\x1aStopManagingDeviceResponse\x12\x1b\n\x06status\x18\x01 \x01(\x0e\x32\x0b.dmi.Status\x12\x1b\n\x06reason\x18\x02 \x01(\x0e\x32\x0b.dmi.Reason\"C\n\x16ManagedDevicesResponse\x12)\n\x07\x64\x65vices\x18\x01 \x03(\x0b\x32\x18.dmi.ModifiableComponent\"o\n\x19SetLoggingEndpointRequest\x12\x1e\n\x0b\x64\x65vice_uuid\x18\x01 \x01(\x0b\x32\t.dmi.Uuid\x12\x18\n\x10logging_endpoint\x18\x02 \x01(\t\x12\x18\n\x10logging_protocol\x18\x03 \x01(\t\"U\n\x19SetRemoteEndpointResponse\x12\x1b\n\x06status\x18\x01 \x01(\x0e\x32\x0b.dmi.Status\x12\x1b\n\x06reason\x18\x02 \x01(\x0e\x32\x0b.dmi.Reason\"\x8a\x01\n\x1aGetLoggingEndpointResponse\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\x18\n\x10logging_endpoint\x18\x03 \x01(\t\x12\x18\n\x10logging_protocol\x18\x04 \x01(\t\"3\n\x18SetMsgBusEndpointRequest\x12\x17\n\x0fmsgbus_endpoint\x18\x01 \x01(\t\"n\n\x19GetMsgBusEndpointResponse\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\x17\n\x0fmsgbus_endpoint\x18\x03 \x01(\t2\xd3\x06\n\x19NativeHWManagementService\x12S\n\x13StartManagingDevice\x12\x18.dmi.ModifiableComponent\x1a .dmi.StartManagingDeviceResponse0\x01\x12U\n\x12StopManagingDevice\x12\x1e.dmi.StopManagingDeviceRequest\x1a\x1f.dmi.StopManagingDeviceResponse\x12H\n\x11GetManagedDevices\x12\x16.google.protobuf.Empty\x1a\x1b.dmi.ManagedDevicesResponse\x12W\n\x14GetPhysicalInventory\x12\x1d.dmi.PhysicalInventoryRequest\x1a\x1e.dmi.PhysicalInventoryResponse0\x01\x12W\n\x12GetHWComponentInfo\x12\x1e.dmi.HWComponentInfoGetRequest\x1a\x1f.dmi.HWComponentInfoGetResponse0\x01\x12U\n\x12SetHWComponentInfo\x12\x1e.dmi.HWComponentInfoSetRequest\x1a\x1f.dmi.HWComponentInfoSetResponse\x12T\n\x12SetLoggingEndpoint\x12\x1e.dmi.SetLoggingEndpointRequest\x1a\x1e.dmi.SetRemoteEndpointResponse\x12@\n\x12GetLoggingEndpoint\x12\t.dmi.Uuid\x1a\x1f.dmi.GetLoggingEndpointResponse\x12R\n\x11SetMsgBusEndpoint\x12\x1d.dmi.SetMsgBusEndpointRequest\x1a\x1e.dmi.SetRemoteEndpointResponse\x12K\n\x11GetMsgBusEndpoint\x12\x16.google.protobuf.Empty\x1a\x1e.dmi.GetMsgBusEndpointResponseB;Z9github.com/opencord/device-management-interface/v3/go/dmib\x06proto3'
+ serialized_pb=b'\n\x1f\x64mi/hw_management_service.proto\x12\x03\x64mi\x1a\x11\x64mi/commons.proto\x1a\x0c\x64mi/hw.proto\x1a\x1bgoogle/protobuf/empty.proto\":\n\x18PhysicalInventoryRequest\x12\x1e\n\x0b\x64\x65vice_uuid\x18\x01 \x01(\x0b\x32\t.dmi.Uuid\"w\n\x19PhysicalInventoryResponse\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\tinventory\x18\x03 \x01(\x0b\x32\r.dmi.Hardware\"v\n\x19HWComponentInfoGetRequest\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\"y\n\x1aHWComponentInfoGetResponse\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\tcomponent\x18\x03 \x01(\x0b\x32\x0e.dmi.Component\"\xa1\x01\n\x19HWComponentInfoSetRequest\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\x12)\n\x07\x63hanges\x18\x04 \x01(\x0b\x32\x18.dmi.ModifiableComponent\"V\n\x1aHWComponentInfoSetResponse\x12\x1b\n\x06status\x18\x01 \x01(\x0e\x32\x0b.dmi.Status\x12\x1b\n\x06reason\x18\x02 \x01(\x0e\x32\x0b.dmi.Reason\"w\n\x1bStartManagingDeviceResponse\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\x1e\n\x0b\x64\x65vice_uuid\x18\x03 \x01(\x0b\x32\t.dmi.Uuid\")\n\x19StopManagingDeviceRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"V\n\x1aStopManagingDeviceResponse\x12\x1b\n\x06status\x18\x01 \x01(\x0e\x32\x0b.dmi.Status\x12\x1b\n\x06reason\x18\x02 \x01(\x0e\x32\x0b.dmi.Reason\"C\n\x16ManagedDevicesResponse\x12)\n\x07\x64\x65vices\x18\x01 \x03(\x0b\x32\x18.dmi.ModifiableComponent\"o\n\x19SetLoggingEndpointRequest\x12\x1e\n\x0b\x64\x65vice_uuid\x18\x01 \x01(\x0b\x32\t.dmi.Uuid\x12\x18\n\x10logging_endpoint\x18\x02 \x01(\t\x12\x18\n\x10logging_protocol\x18\x03 \x01(\t\"U\n\x19SetRemoteEndpointResponse\x12\x1b\n\x06status\x18\x01 \x01(\x0e\x32\x0b.dmi.Status\x12\x1b\n\x06reason\x18\x02 \x01(\x0e\x32\x0b.dmi.Reason\"\x8a\x01\n\x1aGetLoggingEndpointResponse\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\x18\n\x10logging_endpoint\x18\x03 \x01(\t\x12\x18\n\x10logging_protocol\x18\x04 \x01(\t\"3\n\x18SetMsgBusEndpointRequest\x12\x17\n\x0fmsgbus_endpoint\x18\x01 \x01(\t\"n\n\x19GetMsgBusEndpointResponse\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\x17\n\x0fmsgbus_endpoint\x18\x03 \x01(\t\"E\n\x10\x45ntitiesLogLevel\x12\x1f\n\x08logLevel\x18\x01 \x01(\x0e\x32\r.dmi.LogLevel\x12\x10\n\x08\x65ntities\x18\x02 \x03(\t\"^\n\x12SetLogLevelRequest\x12\x1e\n\x0b\x64\x65vice_uuid\x18\x01 \x01(\x0b\x32\t.dmi.Uuid\x12(\n\tloglevels\x18\x02 \x03(\x0b\x32\x15.dmi.EntitiesLogLevel\"@\n\x13SetLogLevelResponse\x12)\n\tresponses\x18\x01 \x03(\x0b\x32\x16.dmi.DeviceLogResponse\"m\n\x11\x44\x65viceLogResponse\x12\x1e\n\x0b\x64\x65vice_uuid\x18\x01 \x01(\x0b\x32\t.dmi.Uuid\x12\x1b\n\x06status\x18\x02 \x01(\x0e\x32\x0b.dmi.Status\x12\x1b\n\x06reason\x18\x03 \x01(\x0e\x32\x0b.dmi.Reason\"F\n\x12GetLogLevelRequest\x12\x1e\n\x0b\x64\x65vice_uuid\x18\x01 \x01(\x0b\x32\t.dmi.Uuid\x12\x10\n\x08\x65ntities\x18\x02 \x03(\t\"\x99\x01\n\x13GetLogLevelResponse\x12\x1e\n\x0b\x64\x65vice_uuid\x18\x01 \x01(\x0b\x32\t.dmi.Uuid\x12(\n\tlogLevels\x18\x02 \x03(\x0b\x32\x15.dmi.EntitiesLogLevel\x12\x1b\n\x06status\x18\x03 \x01(\x0e\x32\x0b.dmi.Status\x12\x1b\n\x06reason\x18\x04 \x01(\x0e\x32\x0b.dmi.Reason\"<\n\x1aGetLoggableEntitiesRequest\x12\x1e\n\x0b\x64\x65vice_uuid\x18\x01 \x01(\x0b\x32\t.dmi.Uuid2\xa9\x08\n\x19NativeHWManagementService\x12S\n\x13StartManagingDevice\x12\x18.dmi.ModifiableComponent\x1a .dmi.StartManagingDeviceResponse0\x01\x12U\n\x12StopManagingDevice\x12\x1e.dmi.StopManagingDeviceRequest\x1a\x1f.dmi.StopManagingDeviceResponse\x12H\n\x11GetManagedDevices\x12\x16.google.protobuf.Empty\x1a\x1b.dmi.ManagedDevicesResponse\x12W\n\x14GetPhysicalInventory\x12\x1d.dmi.PhysicalInventoryRequest\x1a\x1e.dmi.PhysicalInventoryResponse0\x01\x12W\n\x12GetHWComponentInfo\x12\x1e.dmi.HWComponentInfoGetRequest\x1a\x1f.dmi.HWComponentInfoGetResponse0\x01\x12U\n\x12SetHWComponentInfo\x12\x1e.dmi.HWComponentInfoSetRequest\x1a\x1f.dmi.HWComponentInfoSetResponse\x12T\n\x12SetLoggingEndpoint\x12\x1e.dmi.SetLoggingEndpointRequest\x1a\x1e.dmi.SetRemoteEndpointResponse\x12@\n\x12GetLoggingEndpoint\x12\t.dmi.Uuid\x1a\x1f.dmi.GetLoggingEndpointResponse\x12R\n\x11SetMsgBusEndpoint\x12\x1d.dmi.SetMsgBusEndpointRequest\x1a\x1e.dmi.SetRemoteEndpointResponse\x12K\n\x11GetMsgBusEndpoint\x12\x16.google.protobuf.Empty\x1a\x1e.dmi.GetMsgBusEndpointResponse\x12P\n\x13GetLoggableEntities\x12\x1f.dmi.GetLoggableEntitiesRequest\x1a\x18.dmi.GetLogLevelResponse\x12@\n\x0bSetLogLevel\x12\x17.dmi.SetLogLevelRequest\x1a\x18.dmi.SetLogLevelResponse\x12@\n\x0bGetLogLevel\x12\x17.dmi.GetLogLevelRequest\x1a\x18.dmi.GetLogLevelResponseB;Z9github.com/opencord/device-management-interface/v3/go/dmib\x06proto3'
,
dependencies=[dmi_dot_commons__pb2.DESCRIPTOR,dmi_dot_hw__pb2.DESCRIPTOR,google_dot_protobuf_dot_empty__pb2.DESCRIPTOR,])
@@ -655,6 +655,286 @@
serialized_end=1603,
)
+
+_ENTITIESLOGLEVEL = _descriptor.Descriptor(
+ name='EntitiesLogLevel',
+ full_name='dmi.EntitiesLogLevel',
+ filename=None,
+ file=DESCRIPTOR,
+ containing_type=None,
+ create_key=_descriptor._internal_create_key,
+ fields=[
+ _descriptor.FieldDescriptor(
+ name='logLevel', full_name='dmi.EntitiesLogLevel.logLevel', index=0,
+ number=1, type=14, cpp_type=8, label=1,
+ has_default_value=False, default_value=0,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ _descriptor.FieldDescriptor(
+ name='entities', full_name='dmi.EntitiesLogLevel.entities', index=1,
+ number=2, type=9, cpp_type=9, label=3,
+ has_default_value=False, default_value=[],
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ ],
+ extensions=[
+ ],
+ nested_types=[],
+ enum_types=[
+ ],
+ serialized_options=None,
+ is_extendable=False,
+ syntax='proto3',
+ extension_ranges=[],
+ oneofs=[
+ ],
+ serialized_start=1605,
+ serialized_end=1674,
+)
+
+
+_SETLOGLEVELREQUEST = _descriptor.Descriptor(
+ name='SetLogLevelRequest',
+ full_name='dmi.SetLogLevelRequest',
+ filename=None,
+ file=DESCRIPTOR,
+ containing_type=None,
+ create_key=_descriptor._internal_create_key,
+ fields=[
+ _descriptor.FieldDescriptor(
+ name='device_uuid', full_name='dmi.SetLogLevelRequest.device_uuid', index=0,
+ number=1, type=11, cpp_type=10, label=1,
+ has_default_value=False, default_value=None,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ _descriptor.FieldDescriptor(
+ name='loglevels', full_name='dmi.SetLogLevelRequest.loglevels', index=1,
+ number=2, type=11, cpp_type=10, label=3,
+ has_default_value=False, default_value=[],
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ ],
+ extensions=[
+ ],
+ nested_types=[],
+ enum_types=[
+ ],
+ serialized_options=None,
+ is_extendable=False,
+ syntax='proto3',
+ extension_ranges=[],
+ oneofs=[
+ ],
+ serialized_start=1676,
+ serialized_end=1770,
+)
+
+
+_SETLOGLEVELRESPONSE = _descriptor.Descriptor(
+ name='SetLogLevelResponse',
+ full_name='dmi.SetLogLevelResponse',
+ filename=None,
+ file=DESCRIPTOR,
+ containing_type=None,
+ create_key=_descriptor._internal_create_key,
+ fields=[
+ _descriptor.FieldDescriptor(
+ name='responses', full_name='dmi.SetLogLevelResponse.responses', index=0,
+ number=1, type=11, cpp_type=10, label=3,
+ has_default_value=False, default_value=[],
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ ],
+ extensions=[
+ ],
+ nested_types=[],
+ enum_types=[
+ ],
+ serialized_options=None,
+ is_extendable=False,
+ syntax='proto3',
+ extension_ranges=[],
+ oneofs=[
+ ],
+ serialized_start=1772,
+ serialized_end=1836,
+)
+
+
+_DEVICELOGRESPONSE = _descriptor.Descriptor(
+ name='DeviceLogResponse',
+ full_name='dmi.DeviceLogResponse',
+ filename=None,
+ file=DESCRIPTOR,
+ containing_type=None,
+ create_key=_descriptor._internal_create_key,
+ fields=[
+ _descriptor.FieldDescriptor(
+ name='device_uuid', full_name='dmi.DeviceLogResponse.device_uuid', index=0,
+ number=1, type=11, cpp_type=10, label=1,
+ has_default_value=False, default_value=None,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ _descriptor.FieldDescriptor(
+ name='status', full_name='dmi.DeviceLogResponse.status', index=1,
+ number=2, type=14, cpp_type=8, label=1,
+ has_default_value=False, default_value=0,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ _descriptor.FieldDescriptor(
+ name='reason', full_name='dmi.DeviceLogResponse.reason', index=2,
+ number=3, type=14, cpp_type=8, label=1,
+ has_default_value=False, default_value=0,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ ],
+ extensions=[
+ ],
+ nested_types=[],
+ enum_types=[
+ ],
+ serialized_options=None,
+ is_extendable=False,
+ syntax='proto3',
+ extension_ranges=[],
+ oneofs=[
+ ],
+ serialized_start=1838,
+ serialized_end=1947,
+)
+
+
+_GETLOGLEVELREQUEST = _descriptor.Descriptor(
+ name='GetLogLevelRequest',
+ full_name='dmi.GetLogLevelRequest',
+ filename=None,
+ file=DESCRIPTOR,
+ containing_type=None,
+ create_key=_descriptor._internal_create_key,
+ fields=[
+ _descriptor.FieldDescriptor(
+ name='device_uuid', full_name='dmi.GetLogLevelRequest.device_uuid', index=0,
+ number=1, type=11, cpp_type=10, label=1,
+ has_default_value=False, default_value=None,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ _descriptor.FieldDescriptor(
+ name='entities', full_name='dmi.GetLogLevelRequest.entities', index=1,
+ number=2, type=9, cpp_type=9, label=3,
+ has_default_value=False, default_value=[],
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ ],
+ extensions=[
+ ],
+ nested_types=[],
+ enum_types=[
+ ],
+ serialized_options=None,
+ is_extendable=False,
+ syntax='proto3',
+ extension_ranges=[],
+ oneofs=[
+ ],
+ serialized_start=1949,
+ serialized_end=2019,
+)
+
+
+_GETLOGLEVELRESPONSE = _descriptor.Descriptor(
+ name='GetLogLevelResponse',
+ full_name='dmi.GetLogLevelResponse',
+ filename=None,
+ file=DESCRIPTOR,
+ containing_type=None,
+ create_key=_descriptor._internal_create_key,
+ fields=[
+ _descriptor.FieldDescriptor(
+ name='device_uuid', full_name='dmi.GetLogLevelResponse.device_uuid', index=0,
+ number=1, type=11, cpp_type=10, label=1,
+ has_default_value=False, default_value=None,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ _descriptor.FieldDescriptor(
+ name='logLevels', full_name='dmi.GetLogLevelResponse.logLevels', index=1,
+ number=2, type=11, cpp_type=10, label=3,
+ has_default_value=False, default_value=[],
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ _descriptor.FieldDescriptor(
+ name='status', full_name='dmi.GetLogLevelResponse.status', index=2,
+ number=3, type=14, cpp_type=8, label=1,
+ has_default_value=False, default_value=0,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ _descriptor.FieldDescriptor(
+ name='reason', full_name='dmi.GetLogLevelResponse.reason', index=3,
+ number=4, type=14, cpp_type=8, label=1,
+ has_default_value=False, default_value=0,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ ],
+ extensions=[
+ ],
+ nested_types=[],
+ enum_types=[
+ ],
+ serialized_options=None,
+ is_extendable=False,
+ syntax='proto3',
+ extension_ranges=[],
+ oneofs=[
+ ],
+ serialized_start=2022,
+ serialized_end=2175,
+)
+
+
+_GETLOGGABLEENTITIESREQUEST = _descriptor.Descriptor(
+ name='GetLoggableEntitiesRequest',
+ full_name='dmi.GetLoggableEntitiesRequest',
+ filename=None,
+ file=DESCRIPTOR,
+ containing_type=None,
+ create_key=_descriptor._internal_create_key,
+ fields=[
+ _descriptor.FieldDescriptor(
+ name='device_uuid', full_name='dmi.GetLoggableEntitiesRequest.device_uuid', index=0,
+ number=1, type=11, cpp_type=10, label=1,
+ has_default_value=False, default_value=None,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ ],
+ extensions=[
+ ],
+ nested_types=[],
+ enum_types=[
+ ],
+ serialized_options=None,
+ is_extendable=False,
+ syntax='proto3',
+ extension_ranges=[],
+ oneofs=[
+ ],
+ serialized_start=2177,
+ serialized_end=2237,
+)
+
_PHYSICALINVENTORYREQUEST.fields_by_name['device_uuid'].message_type = dmi_dot_hw__pb2._UUID
_PHYSICALINVENTORYRESPONSE.fields_by_name['status'].enum_type = dmi_dot_commons__pb2._STATUS
_PHYSICALINVENTORYRESPONSE.fields_by_name['reason'].enum_type = dmi_dot_commons__pb2._REASON
@@ -682,6 +962,19 @@
_GETLOGGINGENDPOINTRESPONSE.fields_by_name['reason'].enum_type = dmi_dot_commons__pb2._REASON
_GETMSGBUSENDPOINTRESPONSE.fields_by_name['status'].enum_type = dmi_dot_commons__pb2._STATUS
_GETMSGBUSENDPOINTRESPONSE.fields_by_name['reason'].enum_type = dmi_dot_commons__pb2._REASON
+_ENTITIESLOGLEVEL.fields_by_name['logLevel'].enum_type = dmi_dot_commons__pb2._LOGLEVEL
+_SETLOGLEVELREQUEST.fields_by_name['device_uuid'].message_type = dmi_dot_hw__pb2._UUID
+_SETLOGLEVELREQUEST.fields_by_name['loglevels'].message_type = _ENTITIESLOGLEVEL
+_SETLOGLEVELRESPONSE.fields_by_name['responses'].message_type = _DEVICELOGRESPONSE
+_DEVICELOGRESPONSE.fields_by_name['device_uuid'].message_type = dmi_dot_hw__pb2._UUID
+_DEVICELOGRESPONSE.fields_by_name['status'].enum_type = dmi_dot_commons__pb2._STATUS
+_DEVICELOGRESPONSE.fields_by_name['reason'].enum_type = dmi_dot_commons__pb2._REASON
+_GETLOGLEVELREQUEST.fields_by_name['device_uuid'].message_type = dmi_dot_hw__pb2._UUID
+_GETLOGLEVELRESPONSE.fields_by_name['device_uuid'].message_type = dmi_dot_hw__pb2._UUID
+_GETLOGLEVELRESPONSE.fields_by_name['logLevels'].message_type = _ENTITIESLOGLEVEL
+_GETLOGLEVELRESPONSE.fields_by_name['status'].enum_type = dmi_dot_commons__pb2._STATUS
+_GETLOGLEVELRESPONSE.fields_by_name['reason'].enum_type = dmi_dot_commons__pb2._REASON
+_GETLOGGABLEENTITIESREQUEST.fields_by_name['device_uuid'].message_type = dmi_dot_hw__pb2._UUID
DESCRIPTOR.message_types_by_name['PhysicalInventoryRequest'] = _PHYSICALINVENTORYREQUEST
DESCRIPTOR.message_types_by_name['PhysicalInventoryResponse'] = _PHYSICALINVENTORYRESPONSE
DESCRIPTOR.message_types_by_name['HWComponentInfoGetRequest'] = _HWCOMPONENTINFOGETREQUEST
@@ -697,6 +990,13 @@
DESCRIPTOR.message_types_by_name['GetLoggingEndpointResponse'] = _GETLOGGINGENDPOINTRESPONSE
DESCRIPTOR.message_types_by_name['SetMsgBusEndpointRequest'] = _SETMSGBUSENDPOINTREQUEST
DESCRIPTOR.message_types_by_name['GetMsgBusEndpointResponse'] = _GETMSGBUSENDPOINTRESPONSE
+DESCRIPTOR.message_types_by_name['EntitiesLogLevel'] = _ENTITIESLOGLEVEL
+DESCRIPTOR.message_types_by_name['SetLogLevelRequest'] = _SETLOGLEVELREQUEST
+DESCRIPTOR.message_types_by_name['SetLogLevelResponse'] = _SETLOGLEVELRESPONSE
+DESCRIPTOR.message_types_by_name['DeviceLogResponse'] = _DEVICELOGRESPONSE
+DESCRIPTOR.message_types_by_name['GetLogLevelRequest'] = _GETLOGLEVELREQUEST
+DESCRIPTOR.message_types_by_name['GetLogLevelResponse'] = _GETLOGLEVELRESPONSE
+DESCRIPTOR.message_types_by_name['GetLoggableEntitiesRequest'] = _GETLOGGABLEENTITIESREQUEST
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
PhysicalInventoryRequest = _reflection.GeneratedProtocolMessageType('PhysicalInventoryRequest', (_message.Message,), {
@@ -804,6 +1104,55 @@
})
_sym_db.RegisterMessage(GetMsgBusEndpointResponse)
+EntitiesLogLevel = _reflection.GeneratedProtocolMessageType('EntitiesLogLevel', (_message.Message,), {
+ 'DESCRIPTOR' : _ENTITIESLOGLEVEL,
+ '__module__' : 'dmi.hw_management_service_pb2'
+ # @@protoc_insertion_point(class_scope:dmi.EntitiesLogLevel)
+ })
+_sym_db.RegisterMessage(EntitiesLogLevel)
+
+SetLogLevelRequest = _reflection.GeneratedProtocolMessageType('SetLogLevelRequest', (_message.Message,), {
+ 'DESCRIPTOR' : _SETLOGLEVELREQUEST,
+ '__module__' : 'dmi.hw_management_service_pb2'
+ # @@protoc_insertion_point(class_scope:dmi.SetLogLevelRequest)
+ })
+_sym_db.RegisterMessage(SetLogLevelRequest)
+
+SetLogLevelResponse = _reflection.GeneratedProtocolMessageType('SetLogLevelResponse', (_message.Message,), {
+ 'DESCRIPTOR' : _SETLOGLEVELRESPONSE,
+ '__module__' : 'dmi.hw_management_service_pb2'
+ # @@protoc_insertion_point(class_scope:dmi.SetLogLevelResponse)
+ })
+_sym_db.RegisterMessage(SetLogLevelResponse)
+
+DeviceLogResponse = _reflection.GeneratedProtocolMessageType('DeviceLogResponse', (_message.Message,), {
+ 'DESCRIPTOR' : _DEVICELOGRESPONSE,
+ '__module__' : 'dmi.hw_management_service_pb2'
+ # @@protoc_insertion_point(class_scope:dmi.DeviceLogResponse)
+ })
+_sym_db.RegisterMessage(DeviceLogResponse)
+
+GetLogLevelRequest = _reflection.GeneratedProtocolMessageType('GetLogLevelRequest', (_message.Message,), {
+ 'DESCRIPTOR' : _GETLOGLEVELREQUEST,
+ '__module__' : 'dmi.hw_management_service_pb2'
+ # @@protoc_insertion_point(class_scope:dmi.GetLogLevelRequest)
+ })
+_sym_db.RegisterMessage(GetLogLevelRequest)
+
+GetLogLevelResponse = _reflection.GeneratedProtocolMessageType('GetLogLevelResponse', (_message.Message,), {
+ 'DESCRIPTOR' : _GETLOGLEVELRESPONSE,
+ '__module__' : 'dmi.hw_management_service_pb2'
+ # @@protoc_insertion_point(class_scope:dmi.GetLogLevelResponse)
+ })
+_sym_db.RegisterMessage(GetLogLevelResponse)
+
+GetLoggableEntitiesRequest = _reflection.GeneratedProtocolMessageType('GetLoggableEntitiesRequest', (_message.Message,), {
+ 'DESCRIPTOR' : _GETLOGGABLEENTITIESREQUEST,
+ '__module__' : 'dmi.hw_management_service_pb2'
+ # @@protoc_insertion_point(class_scope:dmi.GetLoggableEntitiesRequest)
+ })
+_sym_db.RegisterMessage(GetLoggableEntitiesRequest)
+
DESCRIPTOR._options = None
@@ -814,8 +1163,8 @@
index=0,
serialized_options=None,
create_key=_descriptor._internal_create_key,
- serialized_start=1606,
- serialized_end=2457,
+ serialized_start=2240,
+ serialized_end=3305,
methods=[
_descriptor.MethodDescriptor(
name='StartManagingDevice',
@@ -917,6 +1266,36 @@
serialized_options=None,
create_key=_descriptor._internal_create_key,
),
+ _descriptor.MethodDescriptor(
+ name='GetLoggableEntities',
+ full_name='dmi.NativeHWManagementService.GetLoggableEntities',
+ index=10,
+ containing_service=None,
+ input_type=_GETLOGGABLEENTITIESREQUEST,
+ output_type=_GETLOGLEVELRESPONSE,
+ serialized_options=None,
+ create_key=_descriptor._internal_create_key,
+ ),
+ _descriptor.MethodDescriptor(
+ name='SetLogLevel',
+ full_name='dmi.NativeHWManagementService.SetLogLevel',
+ index=11,
+ containing_service=None,
+ input_type=_SETLOGLEVELREQUEST,
+ output_type=_SETLOGLEVELRESPONSE,
+ serialized_options=None,
+ create_key=_descriptor._internal_create_key,
+ ),
+ _descriptor.MethodDescriptor(
+ name='GetLogLevel',
+ full_name='dmi.NativeHWManagementService.GetLogLevel',
+ index=12,
+ containing_service=None,
+ input_type=_GETLOGLEVELREQUEST,
+ output_type=_GETLOGLEVELRESPONSE,
+ serialized_options=None,
+ create_key=_descriptor._internal_create_key,
+ ),
])
_sym_db.RegisterServiceDescriptor(_NATIVEHWMANAGEMENTSERVICE)
diff --git a/python/dmi/hw_management_service_pb2_grpc.py b/python/dmi/hw_management_service_pb2_grpc.py
index 7c60aab..06c4f87 100644
--- a/python/dmi/hw_management_service_pb2_grpc.py
+++ b/python/dmi/hw_management_service_pb2_grpc.py
@@ -66,6 +66,21 @@
request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
response_deserializer=dmi_dot_hw__management__service__pb2.GetMsgBusEndpointResponse.FromString,
)
+ self.GetLoggableEntities = channel.unary_unary(
+ '/dmi.NativeHWManagementService/GetLoggableEntities',
+ request_serializer=dmi_dot_hw__management__service__pb2.GetLoggableEntitiesRequest.SerializeToString,
+ response_deserializer=dmi_dot_hw__management__service__pb2.GetLogLevelResponse.FromString,
+ )
+ self.SetLogLevel = channel.unary_unary(
+ '/dmi.NativeHWManagementService/SetLogLevel',
+ request_serializer=dmi_dot_hw__management__service__pb2.SetLogLevelRequest.SerializeToString,
+ response_deserializer=dmi_dot_hw__management__service__pb2.SetLogLevelResponse.FromString,
+ )
+ self.GetLogLevel = channel.unary_unary(
+ '/dmi.NativeHWManagementService/GetLogLevel',
+ request_serializer=dmi_dot_hw__management__service__pb2.GetLogLevelRequest.SerializeToString,
+ response_deserializer=dmi_dot_hw__management__service__pb2.GetLogLevelResponse.FromString,
+ )
class NativeHWManagementServiceServicer(object):
@@ -149,6 +164,32 @@
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
+ def GetLoggableEntities(self, request, context):
+ """Gets the entities of a device on which log can be configured. A few are expected, like OS, PON Management etc.
+ In general an entity is any item within an hardware system that can emit logs, e.g. service, process, subsystem,
+ interface, package etc.
+ """
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
+ context.set_details('Method not implemented!')
+ raise NotImplementedError('Method not implemented!')
+
+ def SetLogLevel(self, request, context):
+ """Sets the log level for one or more devices for each given entity to a certain level.
+ If only one EntitiesLogLevel is provided for the device and that request contains only a log level with
+ no entity in the list it's assumed that the caller wants to set that level for all the entities.
+ """
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
+ context.set_details('Method not implemented!')
+ raise NotImplementedError('Method not implemented!')
+
+ def GetLogLevel(self, request, context):
+ """Gets the configured log level for a certain entity on a certain device.
+ If no entity is specified in the request all the entities with their log level should be returned.
+ """
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
+ context.set_details('Method not implemented!')
+ raise NotImplementedError('Method not implemented!')
+
def add_NativeHWManagementServiceServicer_to_server(servicer, server):
rpc_method_handlers = {
@@ -202,6 +243,21 @@
request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
response_serializer=dmi_dot_hw__management__service__pb2.GetMsgBusEndpointResponse.SerializeToString,
),
+ 'GetLoggableEntities': grpc.unary_unary_rpc_method_handler(
+ servicer.GetLoggableEntities,
+ request_deserializer=dmi_dot_hw__management__service__pb2.GetLoggableEntitiesRequest.FromString,
+ response_serializer=dmi_dot_hw__management__service__pb2.GetLogLevelResponse.SerializeToString,
+ ),
+ 'SetLogLevel': grpc.unary_unary_rpc_method_handler(
+ servicer.SetLogLevel,
+ request_deserializer=dmi_dot_hw__management__service__pb2.SetLogLevelRequest.FromString,
+ response_serializer=dmi_dot_hw__management__service__pb2.SetLogLevelResponse.SerializeToString,
+ ),
+ 'GetLogLevel': grpc.unary_unary_rpc_method_handler(
+ servicer.GetLogLevel,
+ request_deserializer=dmi_dot_hw__management__service__pb2.GetLogLevelRequest.FromString,
+ response_serializer=dmi_dot_hw__management__service__pb2.GetLogLevelResponse.SerializeToString,
+ ),
}
generic_handler = grpc.method_handlers_generic_handler(
'dmi.NativeHWManagementService', rpc_method_handlers)
@@ -381,3 +437,54 @@
dmi_dot_hw__management__service__pb2.GetMsgBusEndpointResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
+
+ @staticmethod
+ def GetLoggableEntities(request,
+ target,
+ options=(),
+ channel_credentials=None,
+ call_credentials=None,
+ insecure=False,
+ compression=None,
+ wait_for_ready=None,
+ timeout=None,
+ metadata=None):
+ return grpc.experimental.unary_unary(request, target, '/dmi.NativeHWManagementService/GetLoggableEntities',
+ dmi_dot_hw__management__service__pb2.GetLoggableEntitiesRequest.SerializeToString,
+ dmi_dot_hw__management__service__pb2.GetLogLevelResponse.FromString,
+ options, channel_credentials,
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
+
+ @staticmethod
+ def SetLogLevel(request,
+ target,
+ options=(),
+ channel_credentials=None,
+ call_credentials=None,
+ insecure=False,
+ compression=None,
+ wait_for_ready=None,
+ timeout=None,
+ metadata=None):
+ return grpc.experimental.unary_unary(request, target, '/dmi.NativeHWManagementService/SetLogLevel',
+ dmi_dot_hw__management__service__pb2.SetLogLevelRequest.SerializeToString,
+ dmi_dot_hw__management__service__pb2.SetLogLevelResponse.FromString,
+ options, channel_credentials,
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
+
+ @staticmethod
+ def GetLogLevel(request,
+ target,
+ options=(),
+ channel_credentials=None,
+ call_credentials=None,
+ insecure=False,
+ compression=None,
+ wait_for_ready=None,
+ timeout=None,
+ metadata=None):
+ return grpc.experimental.unary_unary(request, target, '/dmi.NativeHWManagementService/GetLogLevel',
+ dmi_dot_hw__management__service__pb2.GetLogLevelRequest.SerializeToString,
+ dmi_dot_hw__management__service__pb2.GetLogLevelResponse.FromString,
+ options, channel_credentials,
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)