[gnome-boxes] vm-importer: Add protected virtual post_import_setup()
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] vm-importer: Add protected virtual post_import_setup()
- Date: Wed, 4 May 2016 15:14:14 +0000 (UTC)
commit c4703772f6f37bb5760791e040878d46d21d42ee
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Tue May 3 21:45:56 2016 +0100
vm-importer: Add protected virtual post_import_setup()
Put all post import setup into a separate virtual protected method.
We'll use this in a following patch when we add a new subclass of
VMImporter to implement cloning of existing VMs.
https://bugzilla.gnome.org/show_bug.cgi?id=710307
src/vm-importer.vala | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/vm-importer.vala b/src/vm-importer.vala
index f8e4901..2eb8c9a 100644
--- a/src/vm-importer.vala
+++ b/src/vm-importer.vala
@@ -30,6 +30,10 @@ private class Boxes.VMImporter : Boxes.VMCreator {
yield import_vm (machine);
}
+ protected virtual async void post_import_setup (LibvirtMachine machine) {
+ set_post_install_config (machine);
+ }
+
private async void import_vm (LibvirtMachine machine) {
try {
var destination_path = machine.storage_volume.get_path ();
@@ -50,7 +54,7 @@ private class Boxes.VMImporter : Boxes.VMCreator {
return;
}
- set_post_install_config (machine);
+ yield post_import_setup (machine);
if (start_after_import) {
try {
machine.domain.start (0);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]