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