From 1564313ae4822273fc90e6ee68558e8dd54e8be8 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 27 Jun 2024 14:35:45 +0200 Subject: [libvirt] Add getter/setter for os firmware --- src/main/java/org/openslx/libvirt/domain/Domain.java | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/main/java/org/openslx/libvirt/domain/Domain.java b/src/main/java/org/openslx/libvirt/domain/Domain.java index c19b2a3..af3e63c 100644 --- a/src/main/java/org/openslx/libvirt/domain/Domain.java +++ b/src/main/java/org/openslx/libvirt/domain/Domain.java @@ -561,6 +561,26 @@ public class Domain extends LibvirtXmlDocument this.getRootXmlNode().setXmlElementValue( "os/loader", loader ); } + /** + * Returns OS firmware defined in the Libvirt domain XML document. + * + * @return OS firmware of the virtual machine. + */ + public String getOsFirmware() + { + return this.getRootXmlNode().getXmlElementAttributeValue( "os", "firmware" ); + } + + /** + * Set OS firmware in the Libvirt domain XML document. + * + * @param firmware OS machine for the virtual machine. + */ + public void setOsFirmware( String firmware ) + { + this.getRootXmlNode().setXmlElementAttributeValue( "os", "firmware", firmware ); + } + /** * Returns OS Nvram defined in the Libvirt domain XML document. * -- cgit v1.2.3-55-g7522