diff options
author | Manuel Bentele | 2021-08-16 11:12:24 +0200 |
---|---|---|
committer | Manuel Bentele | 2021-08-16 11:12:24 +0200 |
commit | bb8b72ab8b4556c9ac85ffdf08a25cbb15867342 (patch) | |
tree | eb48ef4bc895dcc409a6a93930559f07ffbde68e | |
parent | Add Libvirt support for QEMU command line options (diff) | |
download | master-sync-shared-bb8b72a.tar.gz master-sync-shared-bb8b72a.tar.xz master-sync-shared-bb8b72a.zip |
Fix invalid XML paths and types in Libvirt's mediated devices
-rw-r--r-- | src/main/java/org/openslx/libvirt/domain/device/Hostdev.java | 2 | ||||
-rw-r--r-- | src/main/java/org/openslx/libvirt/domain/device/HostdevMdev.java | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/main/java/org/openslx/libvirt/domain/device/Hostdev.java b/src/main/java/org/openslx/libvirt/domain/device/Hostdev.java index 11e74c3..dc9cf5e 100644 --- a/src/main/java/org/openslx/libvirt/domain/device/Hostdev.java +++ b/src/main/java/org/openslx/libvirt/domain/device/Hostdev.java @@ -78,7 +78,7 @@ public class Hostdev extends Device if ( hostdev instanceof HostdevMdev ) { xmlNode.setXmlElementAttributeValue( "type", Type.MDEV.toString() ); - addedHostdev = HostdevPci.createInstance( xmlNode ); + addedHostdev = HostdevMdev.createInstance( xmlNode ); } else if ( hostdev instanceof HostdevPci ) { xmlNode.setXmlElementAttributeValue( "type", Type.PCI.toString() ); addedHostdev = HostdevPci.createInstance( xmlNode ); diff --git a/src/main/java/org/openslx/libvirt/domain/device/HostdevMdev.java b/src/main/java/org/openslx/libvirt/domain/device/HostdevMdev.java index 7f6bb81..082ea5b 100644 --- a/src/main/java/org/openslx/libvirt/domain/device/HostdevMdev.java +++ b/src/main/java/org/openslx/libvirt/domain/device/HostdevMdev.java @@ -100,7 +100,7 @@ public class HostdevMdev extends Hostdev implements HostdevAddressableSource<Hos @Override public void setSource( HostdevMdevDeviceAddress source ) { - this.setXmlElementAttributeValue( "source/address", "domain", source.getDeviceAddressAsString() ); + this.setXmlElementAttributeValue( "source/address", "uuid", source.getDeviceAddressAsString() ); } /** @@ -109,9 +109,9 @@ public class HostdevMdev extends Hostdev implements HostdevAddressableSource<Hos * @param xmlNode Libvirt XML node of the Libvirt XML device that is created. * @return created hostdev mediated device instance. */ - public static HostdevPci createInstance( LibvirtXmlNode xmlNode ) + public static HostdevMdev createInstance( LibvirtXmlNode xmlNode ) { - return HostdevPci.newInstance( xmlNode ); + return HostdevMdev.newInstance( xmlNode ); } /** @@ -121,9 +121,9 @@ public class HostdevMdev extends Hostdev implements HostdevAddressableSource<Hos * @param xmlNode existing Libvirt XML hostdev mediated device element. * @return hostdev mediated device instance. */ - public static HostdevPci newInstance( LibvirtXmlNode xmlNode ) + public static HostdevMdev newInstance( LibvirtXmlNode xmlNode ) { - return new HostdevPci( xmlNode ); + return new HostdevMdev( xmlNode ); } /** |