VOL-3853:Use strings to convey more info about errors from DM to DM User

Change-Id: I41ce424b3143ed873ce7b6b6bf2a5e826c677f69
diff --git a/protos/dmi/hw_events_mgmt_service.proto b/protos/dmi/hw_events_mgmt_service.proto
index 56f6068..641adbe 100644
--- a/protos/dmi/hw_events_mgmt_service.proto
+++ b/protos/dmi/hw_events_mgmt_service.proto
@@ -112,6 +112,7 @@
     Status status = 1;

     Reason reason = 2;

     EventsCfg events = 3;

+    string reason_detail = 4;

 }

 

 message EventsConfigurationRequest {

@@ -132,6 +133,7 @@
     }

     Status status = 1;

     Reason reason = 2;

+    string reason_detail = 3;

 }

 

 message EventMetaData {

diff --git a/protos/dmi/hw_management_service.proto b/protos/dmi/hw_management_service.proto
index 209f8b8..3a703c4 100644
--- a/protos/dmi/hw_management_service.proto
+++ b/protos/dmi/hw_management_service.proto
@@ -23,6 +23,10 @@
     Status status = 1;

     Reason reason = 2;

     Hardware inventory = 3;

+    // It is recommended that upstream components/users of the DMI interface

+    // do not really interpret/parse the reson_detail, but rather use it for

+    // display purposes to the end user or use it for logging the error

+    string reason_detail = 4;

 }

 

 message HWComponentInfoGetRequest {

@@ -42,6 +46,7 @@
     Status status = 1;

     Reason reason = 2;

     Component component = 3;

+    string reason_detail = 4;

 }

 

 message HWComponentInfoSetRequest {

@@ -62,6 +67,7 @@
     }

     Status status = 1;

     Reason reason = 2;

+    string reason_detail = 3;

 }

 

 message StartManagingDeviceResponse {

@@ -79,6 +85,7 @@
     Status status = 1;

     Reason reason = 2;

     Uuid device_uuid = 3;

+    string reason_detail = 4;

 }

 

 message StopManagingDeviceRequest {

@@ -94,6 +101,7 @@
     }

     Status status = 1;

     Reason reason = 2;

+    string reason_detail = 3;

 }

 

 message ManagedDevicesResponse {

@@ -118,6 +126,7 @@
     }

     Status status = 1;

     Reason reason = 2;

+    string reason_detail = 3;

 }

 

 message GetLoggingEndpointResponse {

@@ -131,6 +140,7 @@
     Reason reason = 2;

     string logging_endpoint = 3;

     string logging_protocol = 4;

+    string reason_detail = 5;

 }

 

 message SetMsgBusEndpointRequest {

@@ -146,6 +156,7 @@
     Status status = 1;

     Reason reason = 2;

     string msgbus_endpoint = 3;

+    string reason_detail = 4;

 }

 

 message EntitiesLogLevel {

@@ -169,6 +180,7 @@
     Uuid device_uuid = 1;

     Status status = 2;

     Reason reason = 3;

+    string reason_detail = 4;

 }

 

 message GetLogLevelRequest {

@@ -188,6 +200,7 @@
     repeated EntitiesLogLevel logLevels = 2;

     Status status = 3;

     Reason reason = 4;

+    string reason_detail = 5;

 }

 

 message GetLoggableEntitiesRequest {

diff --git a/protos/dmi/hw_metrics_mgmt_service.proto b/protos/dmi/hw_metrics_mgmt_service.proto
index 103df46..72a8414 100644
--- a/protos/dmi/hw_metrics_mgmt_service.proto
+++ b/protos/dmi/hw_metrics_mgmt_service.proto
@@ -76,6 +76,7 @@
     Status status = 1;

     Reason reason = 2;

     MetricsConfig metrics = 3;

+    string reason_detail = 4;

 }

 

 message MetricsConfigurationRequest {

@@ -97,6 +98,7 @@
     }

     Status status = 1;

     Reason reason = 2;

+    string reason_detail = 3;

 }

 

 message MetricMetaData {

@@ -132,6 +134,7 @@
     Status status = 1;

     Reason reason = 2;

     Metric metric = 3;

+    string reason_detail = 4;

 }

 

 service NativeMetricsManagementService {

diff --git a/protos/dmi/sw_image.proto b/protos/dmi/sw_image.proto
index 8013c8b..08d6327 100644
--- a/protos/dmi/sw_image.proto
+++ b/protos/dmi/sw_image.proto
@@ -57,4 +57,5 @@
     ImageState state = 3;

     // description contains more information about the current state of the procedure and is device dependant

     string description = 4;

+    string reason_detail = 5;

 }

diff --git a/protos/dmi/sw_management_service.proto b/protos/dmi/sw_management_service.proto
index 82917d4..c2901e9 100644
--- a/protos/dmi/sw_management_service.proto
+++ b/protos/dmi/sw_management_service.proto
@@ -28,6 +28,7 @@
     Status status = 1;

     Reason reason = 2;

     SoftwareVersionInformation info = 3;

+    string reason_detail = 4;

 }

 

 message DownloadImageRequest {

@@ -55,6 +56,7 @@
     }

     Status status = 1;

     Reason reason = 2;

+    string reason_detail = 3;

 }

 

 message StartupConfigInfoRequest {

@@ -77,6 +79,7 @@
     // The version of the startup configuration. It is recommended to use semVer, but the DM implementations

     // and operators could choose any other format as well.

     string version = 4;

+    string reason_detail = 5;

 }

 

 service NativeSoftwareManagementService {