summaryrefslogtreecommitdiffstats
path: root/core/modules/qemu/runvirt-plugin-qemu/src/main/java/org/openslx/runvirt/plugin/qemu/virtualization/LibvirtHypervisorQemu.java
diff options
context:
space:
mode:
authorManuel Bentele2021-06-25 14:23:19 +0200
committerManuel Bentele2021-06-25 14:23:19 +0200
commitc820bd818c488fb2ab14d51afa4d241b762d2fc6 (patch)
tree5f0c364c10820219ca418e6436c425074afc35e0 /core/modules/qemu/runvirt-plugin-qemu/src/main/java/org/openslx/runvirt/plugin/qemu/virtualization/LibvirtHypervisorQemu.java
parent[debug-report-bwlp] add blkid output (diff)
parent[libvirt] Enforce libvirt UIDs/GIDs to not collide with LDAP UIDs/GIDs (diff)
downloadmltk-c820bd818c488fb2ab14d51afa4d241b762d2fc6.tar.gz
mltk-c820bd818c488fb2ab14d51afa4d241b762d2fc6.tar.xz
mltk-c820bd818c488fb2ab14d51afa4d241b762d2fc6.zip
Merge branch 'feature/qemu-integration'
Diffstat (limited to 'core/modules/qemu/runvirt-plugin-qemu/src/main/java/org/openslx/runvirt/plugin/qemu/virtualization/LibvirtHypervisorQemu.java')
-rw-r--r--core/modules/qemu/runvirt-plugin-qemu/src/main/java/org/openslx/runvirt/plugin/qemu/virtualization/LibvirtHypervisorQemu.java63
1 files changed, 63 insertions, 0 deletions
diff --git a/core/modules/qemu/runvirt-plugin-qemu/src/main/java/org/openslx/runvirt/plugin/qemu/virtualization/LibvirtHypervisorQemu.java b/core/modules/qemu/runvirt-plugin-qemu/src/main/java/org/openslx/runvirt/plugin/qemu/virtualization/LibvirtHypervisorQemu.java
new file mode 100644
index 00000000..34cf33cf
--- /dev/null
+++ b/core/modules/qemu/runvirt-plugin-qemu/src/main/java/org/openslx/runvirt/plugin/qemu/virtualization/LibvirtHypervisorQemu.java
@@ -0,0 +1,63 @@
+package org.openslx.runvirt.plugin.qemu.virtualization;
+
+import org.openslx.runvirt.virtualization.LibvirtHypervisor;
+import org.openslx.runvirt.virtualization.LibvirtHypervisorException;
+
+/**
+ * Representation of the Libvirt QEMU hypervisor backend.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class LibvirtHypervisorQemu extends LibvirtHypervisor
+{
+ /**
+ * Creates a new Libvirt QEMU hypervisor backend and connects to the specified backend.
+ *
+ * @param type session type of the connection to the Libvirt QEMU hypervisor backend.
+ * @throws LibvirtHypervisorException failed to connect to the Libvirt QEMU hypervisor backend.
+ */
+ public LibvirtHypervisorQemu( QemuSessionType type ) throws LibvirtHypervisorException
+ {
+ super( type.getConnectionUri() );
+ }
+
+ /**
+ * Type of Libvirt QEMU hypervisor backend session.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+ public enum QemuSessionType
+ {
+ // @formatter:off
+ LOCAL_SYSTEM_SESSION( "qemu:///system" ),
+ LOCAL_USER_SESSION ( "qemu:///session" );
+ // @formatter:on
+
+ /**
+ * Connection URI of the QEMU session type.
+ */
+ private final String connectionUri;
+
+ /**
+ * Creates a new QEMU session type.
+ *
+ * @param connectionUri URI for the connection of the session.
+ */
+ QemuSessionType( String connectionUri )
+ {
+ this.connectionUri = connectionUri;
+ }
+
+ /**
+ * Returns the URI of the connection for the session.
+ *
+ * @return URI of the connection for the session.
+ */
+ public String getConnectionUri()
+ {
+ return this.connectionUri;
+ }
+ }
+}