VOL-3448: Introduce returning error for GetHWComponentInfo , GetMetric , GetSoftwareVersion APIs
Change-Id: Ia592bcc642ad5aa3b3891b8bdd1f9cf21bd51da2
diff --git a/protos/dmi/hw_events_mgmt_service.proto b/protos/dmi/hw_events_mgmt_service.proto
index 84defe2..2a53e3e 100644
--- a/protos/dmi/hw_events_mgmt_service.proto
+++ b/protos/dmi/hw_events_mgmt_service.proto
@@ -148,7 +148,7 @@
rpc ListEvents(HardwareID) returns(ListEventsResponse);
// Updates the configuration of the list of events in the request
- // The default behaviour of the device is to report all the supported events
+ // The default behavior of the device is to report all the supported events
// This configuration is persisted across reboots of the device or the device manager
rpc UpdateEventsConfiguration(EventsConfigurationRequest) returns(EventsConfigurationResponse);
}
diff --git a/protos/dmi/hw_management_service.proto b/protos/dmi/hw_management_service.proto
index abdcb4a..511a5d2 100644
--- a/protos/dmi/hw_management_service.proto
+++ b/protos/dmi/hw_management_service.proto
@@ -24,6 +24,12 @@
string component_name = 3;
}
+message HWComponentInfoGetResponse {
+ Status status = 1;
+ Reason reason = 2;
+ Component component = 3;
+}
+
message HWComponentInfoSetRequest {
Uuid device_uuid = 1;
Uuid component_uuid = 2;
@@ -70,7 +76,7 @@
rpc GetPhysicalInventory(PhysicalInventoryRequest) returns(stream PhysicalInventoryResponse);
// Get the details of a particular HW component
- rpc GetHWComponentInfo(HWComponentInfoGetRequest) returns(stream Component);
+ rpc GetHWComponentInfo(HWComponentInfoGetRequest) returns(stream HWComponentInfoGetResponse);
// Sets the permissible attributes of a HW component
rpc SetHWComponentInfo(HWComponentInfoSetRequest) returns(HWComponentInfoSetResponse);
diff --git a/protos/dmi/hw_metrics_mgmt_service.proto b/protos/dmi/hw_metrics_mgmt_service.proto
index a30199f..adec0d3 100644
--- a/protos/dmi/hw_metrics_mgmt_service.proto
+++ b/protos/dmi/hw_metrics_mgmt_service.proto
@@ -106,6 +106,12 @@
MetricNames metric_id = 2;
}
+message GetMetricResponse {
+ Status status = 1;
+ Reason reason = 2;
+ Metric metric = 3;
+}
+
service NativeMetricsManagementService {
// List the supported metrics for the passed device.
@@ -121,5 +127,5 @@
rpc UpdateMetricsConfiguration(MetricsConfigurationRequest) returns(MetricsConfigurationResponse);
// Get the instantenous value of a metric
- rpc GetMetric(GetMetricRequest) returns(Metric);
+ rpc GetMetric(GetMetricRequest) returns(GetMetricResponse);
}
diff --git a/protos/dmi/sw_image.proto b/protos/dmi/sw_image.proto
index cb73f32..3bb3b44 100644
--- a/protos/dmi/sw_image.proto
+++ b/protos/dmi/sw_image.proto
@@ -30,7 +30,7 @@
UNDEFINED_STATE = 0;
COPYING_IMAGE = 1;
INSTALLING_IMAGE = 2;
- COMMITING_IMAGE = 3;
+ COMMITTING_IMAGE = 3;
REBOOTING_DEVICE = 4;
UPGRADE_COMPLETE = 5;
UPGRADE_FAILED = 6;
diff --git a/protos/dmi/sw_management_service.proto b/protos/dmi/sw_management_service.proto
index 3a935d0..69de70d 100644
--- a/protos/dmi/sw_management_service.proto
+++ b/protos/dmi/sw_management_service.proto
@@ -3,6 +3,7 @@
option go_package = "github.com/opencord/device-management-interface/v3/go/dmi";
package dmi;
+import "dmi/commons.proto";
import "dmi/hw.proto";
import "dmi/sw_image.proto";
@@ -17,6 +18,12 @@
repeated ImageVersion standby_versions = 2;
}
+message GetSoftwareVersionInformationResponse {
+ Status status = 1;
+ Reason reason = 2;
+ SoftwareVersionInformation info = 3;
+}
+
message DownloadImageRequest {
Uuid device_uuid = 1;
ImageInformation image_info = 2;
@@ -24,7 +31,7 @@
service NativeSoftwareManagementService {
// Get the software version information of the Active and Standby images
- rpc GetSoftwareVersion(HardwareID) returns(SoftwareVersionInformation);
+ rpc GetSoftwareVersion(HardwareID) returns(GetSoftwareVersionInformationResponse);
// Downloads and installs the image in the standby partition, returns the status/progress of the Install
rpc DownloadImage(DownloadImageRequest) returns(stream ImageStatus);
@@ -35,7 +42,7 @@
rpc ActivateImage(HardwareID) returns(stream ImageStatus);
// Marks the image in the Standby as Active and reboots the device, so that it boots from that image which was in the standby.
- // This API is to be used if operator wants to go back to the pervious software
+ // This API is to be used if operator wants to go back to the previous software
rpc RevertToStandbyImage(HardwareID) returns(stream ImageStatus);
// If needed we can add this later