VOL-3514: Option for configuring logging endpoint and protocol

Change-Id: I4e2ac1812b8066d125afee27f609764cfe4dfdc1
diff --git a/protos/dmi/commons.proto b/protos/dmi/commons.proto
index 828f5cf..e6f7d1b 100644
--- a/protos/dmi/commons.proto
+++ b/protos/dmi/commons.proto
@@ -18,4 +18,7 @@
     INTERNAL_ERROR = 2;
     WRONG_METRIC = 3;
     WRONG_EVENT = 4;
+    LOGGING_ENDPOINT_ERROR = 5;
+    LOGGING_ENDPOINT_PROTOCOL_ERROR = 6;
+    KAFKA_ENDPOINT_ERROR = 7;
 }
diff --git a/protos/dmi/hw_management_service.proto b/protos/dmi/hw_management_service.proto
index 0584454..dd50bb8 100644
--- a/protos/dmi/hw_management_service.proto
+++ b/protos/dmi/hw_management_service.proto
@@ -62,6 +62,34 @@
     repeated ModifiableComponent devices = 1;

 }

 

+message SetLoggingEndpointRequest {

+    Uuid device_uuid = 1;

+    string logging_endpoint = 2;

+    string logging_protocol = 3;

+}

+

+message SetRemoteEndpointResponse {

+    Status status = 1;

+    Reason reason = 2;

+}

+

+message GetLoggingEndpointResponse {

+    Status status = 1;

+    Reason reason = 2;

+    string logging_endpoint = 3;

+    string logging_protocol = 4;

+}

+

+message SetMsgBusEndpointRequest {

+    string msgbus_endpoint = 1;

+}

+

+message GetMsgBusEndpointResponse {

+    Status status = 1;

+    Reason reason = 2;

+    string msgbus_endpoint = 3;

+}

+

 service NativeHWManagementService {

     // Initializes context for a device and sets up required states

     // In the call to StartManagingDevice, the fields of ModifiableComponent which are relevant

@@ -88,4 +116,16 @@
 

     // Sets the permissible attributes of a HW component

     rpc SetHWComponentInfo(HWComponentInfoSetRequest) returns(HWComponentInfoSetResponse);

+

+    // Sets the location to which logs need to be shipped

+    rpc SetLoggingEndpoint(SetLoggingEndpointRequest) returns(SetRemoteEndpointResponse);

+

+    // Gets the configured location to which the logs are being shipped

+    rpc GetLoggingEndpoint(Uuid) returns(GetLoggingEndpointResponse);

+

+    // Sets the location of the Message Bus to which events and metrics are shipped

+    rpc SetMsgBusEndpoint(SetMsgBusEndpointRequest) returns(SetRemoteEndpointResponse);

+

+    // Gets the configured location to which the events and metrics are being shipped

+    rpc GetMsgBusEndpoint(google.protobuf.Empty) returns(GetMsgBusEndpointResponse);

 }