blob: dd50bb8360eeaa025acd633deb56e62443857276 [file] [log] [blame]
syntax = "proto3";
option go_package = "github.com/opencord/device-management-interface/v3/go/dmi";
package dmi;
import "dmi/commons.proto";
import "dmi/hw.proto";
import "google/protobuf/empty.proto";
// Protos for the management of a hardware and it's components
message PhysicalInventoryRequest {
Uuid device_uuid = 1;
}
message PhysicalInventoryResponse {
Status status = 1;
Reason reason = 2;
Hardware inventory = 3;
}
message HWComponentInfoGetRequest {
Uuid device_uuid = 1;
Uuid component_uuid = 2;
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;
string component_name = 3;
ModifiableComponent changes = 4;
}
message HWComponentInfoSetResponse {
Status status = 1;
Reason reason = 2;
}
message StartManagingDeviceResponse {
Status status = 1;
Reason reason = 2;
Uuid device_uuid = 3;
}
message StopManagingDeviceRequest {
string name = 1;
}
message StopManagingDeviceResponse {
Status status = 1;
Reason reason = 2;
}
message ManagedDevicesResponse {
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
// and their meanings in this context is mentioned below:
// name = The unique name that needs to be assigned to this hardware;
// class = COMPONENT_TYPE_UNDEFINED;
// parent = nil;
// alias = Optional;
// asset_id = Optional;
// uri = IP Address of the Hardware;
rpc StartManagingDevice(ModifiableComponent) returns(stream StartManagingDeviceResponse);
// Stop management of a device and clean up any context and caches for that device
rpc StopManagingDevice(StopManagingDeviceRequest) returns(StopManagingDeviceResponse);
// Returns an object containing a list of devices managed by this entity
rpc GetManagedDevices(google.protobuf.Empty) returns(ManagedDevicesResponse);
// Get the HW inventory details of the Device
rpc GetPhysicalInventory(PhysicalInventoryRequest) returns(stream PhysicalInventoryResponse);
// Get the details of a particular HW component
rpc GetHWComponentInfo(HWComponentInfoGetRequest) returns(stream HWComponentInfoGetResponse);
// 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);
}