-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace D-Bus with HTTP-based clients (#1438)
## Problem - https://trello.com/c/hvPtBtMD When moving to the new HTTP-based architecture, we took some shortcuts. One of them was not using HTTP clients in the command-line interface. We need to adapt the following clients: - [UsersClient](https://github.com/openSUSE/agama/blob/master/rust/agama-lib/src/users/client.rs) - [LocalizationClient](https://github.com/openSUSE/agama/blob/master/rust/agama-lib/src/localization/client.rs) - [ProductClient](https://github.com/openSUSE/agama/blob/master/rust/agama-lib/src/product/client.rs) - [StorageClient](https://github.com/openSUSE/agama/blob/master/rust/agama-lib/src/storage/client.rs) - [SoftwareClient](https://github.com/openSUSE/agama/blob/master/rust/agama-lib/src/software/client.rs) ## Solution - `UsersClient` - still needed, because the HTTP service uses it to talk to the Ruby backend. `UsersHTTPClient` added. - `LocalizationClient` replaced with `LocalizationHTTPClient` The rest will be done in subsequent PRs. ## Testing - Tested manually with various correct and incorrect configs via `agama config show` and `agama config load`. This is ripe for automation, even in this PR. - aaand: added tests that - set up a trivial HTTP server (using [httpmock](https://crates.io/crates/httpmock) - is the dependency size OK?), - mocking the JSON data and - asserting what the Store classes make out of it ## Screenshots *If the fix affects the UI attach some screenshots here.*
- Loading branch information
Showing
32 changed files
with
1,234 additions
and
255 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
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
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
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,11 +1,12 @@ | ||
//! Implements support for handling the localization settings | ||
|
||
mod client; | ||
mod http_client; | ||
pub mod model; | ||
mod proxies; | ||
mod settings; | ||
mod store; | ||
|
||
pub use client::LocalizationClient; | ||
pub use http_client::LocalizationHTTPClient; | ||
pub use proxies::LocaleProxy; | ||
pub use settings::LocalizationSettings; | ||
pub use store::LocalizationStore; |
Oops, something went wrong.