blob: 3bb3b441591b8b3b4ec6b29d7230ad83f3adb3cb [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/commons.proto";
7
8// Protos for modeling a software image and it's status
9
10message ImageVersion {
11 string image_name = 1;
12 string version = 2;
13}
14
15message ImageInformation {
16 ImageVersion image = 1;
17 // Script used by the device specific managers to install the image.
18 // Script must be included in the object downloaded from the image_url
19 string image_install_script = 2;
20 // Location of the image and installation script, authentication (user/pass) if any should be in the url string
Amit Ghoshab6b2e42020-07-17 13:46:55 +010021 // The image_url would contain the protocol, credentials, the IP address/DNS of the server and the path of the file
22 // e.g. sftp://download_user:download_pass@192.168.0.1:22/images/image1
Amit Ghosh09f28362020-06-12 21:52:19 +010023 string image_url = 3;
24 // SHA-256 sum of the image (sha256sum on Linux)
25 string sha256sum = 5;
26}
27
28message ImageStatus {
29 enum ImageState {
30 UNDEFINED_STATE = 0;
31 COPYING_IMAGE = 1;
32 INSTALLING_IMAGE = 2;
aghoshc301dcd2020-09-03 16:55:34 +010033 COMMITTING_IMAGE = 3;
Amit Ghosh09f28362020-06-12 21:52:19 +010034 REBOOTING_DEVICE = 4;
35 UPGRADE_COMPLETE = 5;
36 UPGRADE_FAILED = 6;
37 ACTIVATION_COMPLETE = 7;
38 ACTIVATION_FAILED = 8;
39 }
40
41 enum Reason {
Amit Ghoshab6b2e42020-07-17 13:46:55 +010042 UNDEFINED_REASON = 0;
Amit Ghosh09f28362020-06-12 21:52:19 +010043 ERROR_IN_REQUEST = 1;
44 INTERNAL_ERROR = 2;
45 DEVICE_IN_WRONG_STATE = 3;
46 INVALID_IMAGE = 4;
47 WRONG_IMAGE_CHECKSUM = 5;
48 }
49
50 Status status = 1;
51 Reason reason = 2;
52 ImageState state = 3;
53 // description contains more information about the current state of the procedure and is device dependant
54 string description = 4;
55}