blob: e85767eb3a87af98f93fa4e28fb138709ddd04b5 [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
21 string image_url = 3;
22 // SHA-256 sum of the image (sha256sum on Linux)
23 string sha256sum = 5;
24}
25
26message ImageStatus {
27 enum ImageState {
28 UNDEFINED_STATE = 0;
29 COPYING_IMAGE = 1;
30 INSTALLING_IMAGE = 2;
31 COMMITING_IMAGE = 3;
32 REBOOTING_DEVICE = 4;
33 UPGRADE_COMPLETE = 5;
34 UPGRADE_FAILED = 6;
35 ACTIVATION_COMPLETE = 7;
36 ACTIVATION_FAILED = 8;
37 }
38
39 enum Reason {
40 UNDEFINED_READON = 0;
41 ERROR_IN_REQUEST = 1;
42 INTERNAL_ERROR = 2;
43 DEVICE_IN_WRONG_STATE = 3;
44 INVALID_IMAGE = 4;
45 WRONG_IMAGE_CHECKSUM = 5;
46 }
47
48 Status status = 1;
49 Reason reason = 2;
50 ImageState state = 3;
51 // description contains more information about the current state of the procedure and is device dependant
52 string description = 4;
53}