Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add downloading state and download_details to PackageStatus #206

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion proto/opamp.proto
Original file line number Diff line number Diff line change
Expand Up @@ -802,6 +802,22 @@ message PackageStatus {

// Error message if the status is erroneous.
string error_message = 7;

// Optional details that may be of interest to a user.
// Should only be set if status is Downloading.
// Status: [Development]
PackageDownloadDetails download_details = 8;
tigrannajaryan marked this conversation as resolved.
Show resolved Hide resolved
}


// Additional details that an agent can use to describe an in-progress package download.
// Status: [Development]
message PackageDownloadDetails {
// The package download progress as a percentage.
double download_percent = 1;

// The current package download rate in bytes per second.
uint64 download_bytes_per_second = 2;
}

// The status of this package.
Expand All @@ -814,7 +830,7 @@ enum PackageStatusEnum {
// Installation of this package has not yet started.
PackageStatusEnum_InstallPending = 1;

// Agent is currently downloading and installing the package.
// Agent is currently installing the package.
// server_offered_hash field MUST be set to indicate the version that the
// Agent is installing. The error_message field MUST NOT be set.
PackageStatusEnum_Installing = 2;
Expand All @@ -824,6 +840,12 @@ enum PackageStatusEnum {
// tried to install. The error_message may also contain more details about
// the failure.
PackageStatusEnum_InstallFailed = 3;

// Agent is currently downloading the package.
// server_offered_hash field MUST be set to indicate the version that the
// Agent is installing. The error_message field MUST NOT be set.
// Status: [Development]
PackageStatusEnum_Downloading = 4;
michel-laterman marked this conversation as resolved.
Show resolved Hide resolved
}

// Properties related to identification of the Agent, which can be overridden
Expand Down
22 changes: 20 additions & 2 deletions specification.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ Status: [Beta]
- [PackageStatus.server_offered_hash](#packagestatusserver_offered_hash)
- [PackageStatus.status](#packagestatusstatus)
- [PackageStatus.error_message](#packagestatuserror_message)
- [PackageStatus.download_details](#packagestatusdownload_details)
* [Connection Settings Management](#connection-settings-management)
+ [OpAMP Connection Setting Offer Flow](#opamp-connection-setting-offer-flow)
+ [Trust On First Use](#trust-on-first-use)
Expand Down Expand Up @@ -1310,11 +1311,14 @@ message PackageStatus {
bytes server_offered_hash = 5;
enum Status {
INSTALLED = 0;
INSTALLING = 1;
INSTALL_FAILED = 2;
INSTALL_PENDING = 1;
INSTALLING = 2;
INSTALL_FAILED = 3;
DOWNLOADING = 4;
andykellr marked this conversation as resolved.
Show resolved Hide resolved
}
Status status = 6;
string error_message = 7;
PackageDownloadDetails download_details = 8;
}
```

Expand Down Expand Up @@ -1393,6 +1397,20 @@ failure.

An error message if the status is erroneous.

##### PackageStatus.download_details

Status: [Development]

The download_details contains additional details that descibe a package download.
It should only be set if the status is `DOWNLOADING`.

```protobuf
message PackageDownloadDetails {
double download_percent = 1;
uint64 download_bytes_per_second = 2;
}
```

### Connection Settings Management

Status: [Beta]
Expand Down
Loading