forked from agama-project/agama
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rust: Process 'legacy_autoyast_storage' section
- Loading branch information
1 parent
1d84aee
commit bd98779
Showing
9 changed files
with
74 additions
and
12 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
//! Implements support for handling the storage AutoYaST settings | ||
pub mod store; |
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,23 @@ | ||
//! Implements the store for the storage AutoYaST settings. | ||
use crate::error::ServiceError; | ||
use crate::storage::StorageClient; | ||
use zbus::Connection; | ||
|
||
/// Loads and stores the storage AutoYaST settings from/to the D-Bus service. | ||
pub struct StorageAutoyastStore<'a> { | ||
storage_client: StorageClient<'a>, | ||
} | ||
|
||
impl<'a> StorageAutoyastStore<'a> { | ||
pub async fn new(connection: Connection) -> Result<StorageAutoyastStore<'a>, ServiceError> { | ||
Ok(Self { | ||
storage_client: StorageClient::new(connection).await?, | ||
}) | ||
} | ||
|
||
pub async fn store(&self, settings: &str) -> Result<(), ServiceError> { | ||
self.storage_client.calculate_autoyast(settings).await?; | ||
Ok(()) | ||
} | ||
} |
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