-
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.
Storage AutoYaST backward compatibility (#1284)
Created to replace #1266 (to sanitize history). Agama is going to offer new settings for configuring the storage devices, see #1256. That new settings will be applied by loading a config file (e.g., `$ agama config load myconfig.json`). Nevertheless, Agama is also going to temporary support the SLE15 AutoYaST schema to some extent, in order to make the transition smoother. For that, the json config file can indicate a "legacyAutoyastStorage" key equivalent to the partitioning section of the AutoYaST profile: ~~~ "legacyAutoyastStorage": [ { "device": "/dev/vda", "use": "all", "partitions": [...] } ] ~~~ This PR implements the support for the "legacyAutoyastStorage" settings, making possible to calculate an AutoYaST proposal. Converting the "partitioning" section from a XML AutoYaST profile to a "legacyAutoyastStorage" section is implemented at #1285 Note: The AutoYaST guided partitioning will not be supported, see https://doc.opensuse.org/projects/autoyast/#CreateProfile-Guided-Partitioning.
- Loading branch information
Showing
29 changed files
with
1,545 additions
and
388 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
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,26 @@ | ||
//! Implements the store for the storage AutoYaST settings. | ||
|
||
use crate::error::ServiceError; | ||
use crate::storage::StorageClient; | ||
use zbus::Connection; | ||
|
||
/// Stores the storage AutoYaST settings to the D-Bus service. | ||
/// | ||
/// NOTE: The AutoYaST settings are not loaded from D-Bus because they cannot be modified. The only | ||
/// way of using the storage AutoYaST settings is by loading a JSON config file. | ||
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
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,3 +1,9 @@ | ||
------------------------------------------------------------------- | ||
Wed Jun 5 13:53:59 UTC 2024 - José Iván López González <[email protected]> | ||
|
||
- Process the legacyAutoyastStorage section of the profile | ||
(gh#openSUSE/agama#1284). | ||
|
||
------------------------------------------------------------------- | ||
Mon Jun 3 07:49:16 UTC 2024 - Josef Reidinger <[email protected]> | ||
|
||
|
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
Oops, something went wrong.