blob: 3a935d0dfd3d45975bf2285327bec9eb11cecfc8 [file] [log] [blame]
Amit Ghosh09f28362020-06-12 21:52:19 +01001syntax = "proto3";
2
3option go_package = "github.com/opencord/device-management-interface/v3/go/dmi";
4package dmi;
5
6import "dmi/hw.proto";
7import "dmi/sw_image.proto";
8
9// The software management concept described here is aligned with WT-383a3 (Revision: 06 April 2020).
10// In particular Section 11 Software management
11// TODO check model
12
13// Protos for managing the software on a hardware device
14
15message SoftwareVersionInformation {
16 repeated ImageVersion active_versions = 1;
17 repeated ImageVersion standby_versions = 2;
18}
19
20message DownloadImageRequest {
21 Uuid device_uuid = 1;
22 ImageInformation image_info = 2;
23}
24
25service NativeSoftwareManagementService {
26 // Get the software version information of the Active and Standby images
27 rpc GetSoftwareVersion(HardwareID) returns(SoftwareVersionInformation);
28
29 // Downloads and installs the image in the standby partition, returns the status/progress of the Install
30 rpc DownloadImage(DownloadImageRequest) returns(stream ImageStatus);
31
32 // Activates and runs the OLT with the image in the standby partition. If things are fine this image will
33 // henceforth be marked as the Active Partition. The old working image would remain on the Standby partition.
34 // Any possibly required (sub-)steps like "commit" are left to the "Device Manager"
35 rpc ActivateImage(HardwareID) returns(stream ImageStatus);
36
37 // Marks the image in the Standby as Active and reboots the device, so that it boots from that image which was in the standby.
38 // This API is to be used if operator wants to go back to the pervious software
39 rpc RevertToStandbyImage(HardwareID) returns(stream ImageStatus);
40
41 // If needed we can add this later
42 //rpc SubscribeToEvents() returns (stream );
43}