blob: 3dda39f943fb326ffa3bce404ef54d9c76b478c5 [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
aghoshc301dcd2020-09-03 16:55:34 +01006import "dmi/commons.proto";
Amit Ghosh09f28362020-06-12 21:52:19 +01007import "dmi/hw.proto";
8import "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
16message SoftwareVersionInformation {
17 repeated ImageVersion active_versions = 1;
18 repeated ImageVersion standby_versions = 2;
19}
20
aghoshc301dcd2020-09-03 16:55:34 +010021message GetSoftwareVersionInformationResponse {
22 Status status = 1;
23 Reason reason = 2;
24 SoftwareVersionInformation info = 3;
25}
26
Amit Ghosh09f28362020-06-12 21:52:19 +010027message DownloadImageRequest {
28 Uuid device_uuid = 1;
29 ImageInformation image_info = 2;
30}
31
amit.ghoshed23db02020-11-18 10:26:36 +010032message ConfigRequest {
33 Uuid device_uuid = 1;
34 // Location of the configuration file, authentication (user/pass) if any should be in the url string
35 // The config_url would contain the protocol, credentials, the IP address/DNS of the server and the path of the file
36 // e.g. sftp://download_user:download_pass@192.168.0.1:22/OLT-configs/config-v1.2.3.xml
37 string config_url = 2;
38}
39
40message ConfigResponse {
41 Status status = 1;
42 Reason reason = 2;
43}
44
Amit Ghosh09f28362020-06-12 21:52:19 +010045service NativeSoftwareManagementService {
46 // Get the software version information of the Active and Standby images
aghoshc301dcd2020-09-03 16:55:34 +010047 rpc GetSoftwareVersion(HardwareID) returns(GetSoftwareVersionInformationResponse);
Amit Ghosh09f28362020-06-12 21:52:19 +010048
49 // Downloads and installs the image in the standby partition, returns the status/progress of the Install
50 rpc DownloadImage(DownloadImageRequest) returns(stream ImageStatus);
51
52 // Activates and runs the OLT with the image in the standby partition. If things are fine this image will
53 // henceforth be marked as the Active Partition. The old working image would remain on the Standby partition.
54 // Any possibly required (sub-)steps like "commit" are left to the "Device Manager"
55 rpc ActivateImage(HardwareID) returns(stream ImageStatus);
56
57 // Marks the image in the Standby as Active and reboots the device, so that it boots from that image which was in the standby.
aghoshc301dcd2020-09-03 16:55:34 +010058 // This API is to be used if operator wants to go back to the previous software
Amit Ghosh09f28362020-06-12 21:52:19 +010059 rpc RevertToStandbyImage(HardwareID) returns(stream ImageStatus);
60
amit.ghoshed23db02020-11-18 10:26:36 +010061 // This API can be used to let the devices pickup their properitary configuration which they need at startup.
62 rpc UpdateStartupConfiguration(ConfigRequest) returns(stream ConfigResponse);
63
Amit Ghosh09f28362020-06-12 21:52:19 +010064 // If needed we can add this later
65 //rpc SubscribeToEvents() returns (stream );
66}