-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expose the manager service through the HTTP/JSON API (#1089)
Trello: https://trello.com/c/Ff8n3NVZ/3563-5-expose-the-manager-api-over-http This PR exposes most of the Manager API[^1] through the interface. It includes: * `api/manager/probe`: starts the probing. * `api/manager/install`: starts the installation. * `api/manager/finish`: executes the post-install tasks. * `api/manager/status`: expose the manager status` ```rust { "phase": "Config", "busy": [ "org.opensuse.Agama.Storage1" ] } ``` Additionally, it emits two events: `BusyServicesChanged` and `InstallationPhaseChanged`. [^1]: The part of the D-Bus API used by the web UI. ## To do - [x] Before proceeding, we need to merge #1080. - [ ] ~~Add a mechanism to get the logs~~ (postponed). - [x] Add a `CanInstall` boolean to the manager status.
- Loading branch information
Showing
14 changed files
with
423 additions
and
11 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,3 +59,4 @@ path = "src/agama-web-server.rs" | |
|
||
[dev-dependencies] | ||
http-body-util = "0.1.0" | ||
tokio-test = "0.4.3" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
pub mod error; | ||
pub mod l10n; | ||
pub mod manager; | ||
pub mod network; | ||
pub mod questions; | ||
pub mod software; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
pub mod web; | ||
pub use web::manager_service; |
Oops, something went wrong.