[gnome-boxes/improve-storage-management-ux: 1/7] vm-creator/importer: Pass path of StorageVol instead of obj
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes/improve-storage-management-ux: 1/7] vm-creator/importer: Pass path of StorageVol instead of obj
- Date: Mon, 13 Dec 2021 15:06:42 +0000 (UTC)
commit 491d0ea8c2c194021c5c4b5d59f1f042f7030297
Author: Felipe Borges <felipeborges gnome org>
Date: Mon Dec 13 12:27:36 2021 +0100
vm-creator/importer: Pass path of StorageVol instead of obj
We only need the path string.
src/libvirt-vm-importer.vala | 4 ++--
src/vm-creator.vala | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/libvirt-vm-importer.vala b/src/libvirt-vm-importer.vala
index a1363c2b..08bbc762 100644
--- a/src/libvirt-vm-importer.vala
+++ b/src/libvirt-vm-importer.vala
@@ -23,7 +23,7 @@ protected override void create_domain_base_name_and_title (out string base_name,
protected override async Domain create_domain_config (string name,
string title,
- GVir.StorageVol volume,
+ string volume_path,
Cancellable? cancellable) throws GLib.Error {
var media = install_media as LibvirtMedia;
var config = media.domain_config;
@@ -60,7 +60,7 @@ protected override async Domain create_domain_config (string name,
config.set_devices (filtered);
/* Add new disk configuration to match the corresponding target volume/media */
- VMConfigurator.set_target_media_config (config, volume.get_path (), install_media, hd_index);
+ VMConfigurator.set_target_media_config (config, volume_path, install_media, hd_index);
return config;
}
diff --git a/src/vm-creator.vala b/src/vm-creator.vala
index b0407e97..9d4a5e1b 100644
--- a/src/vm-creator.vala
+++ b/src/vm-creator.vala
@@ -53,7 +53,7 @@ public async LibvirtMachine create_vm (Cancellable? cancellable) throws GLib.Err
yield install_media.prepare_for_installation (name, cancellable);
var volume = yield create_target_volume (name, install_media.resources.storage);
- var config = yield create_domain_config (name, title, volume, cancellable);
+ var config = yield create_domain_config (name, title, volume.get_path (), cancellable);
var domain = connection.create_domain (config);
var machine = yield LibvirtBroker.get_default ().add_domain (App.app.default_source,
@@ -186,11 +186,11 @@ protected void set_post_install_config (LibvirtMachine machine) {
protected virtual async GVirConfig.Domain create_domain_config (string name,
string title,
- StorageVol volume,
+ string volume_path,
Cancellable? cancellable) throws
GLib.Error {
var caps = yield connection.get_capabilities_async (cancellable);
var domcaps = yield connection.get_domain_capabilities_async (null, null, null, null, 0,
cancellable);
- var config = VMConfigurator.create_domain_config (install_media, volume.get_path (), caps, domcaps);
+ var config = VMConfigurator.create_domain_config (install_media, volume_path, caps, domcaps);
config.name = name;
config.title = title;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]