Merge "Drop unused decoding of xml content"

This commit is contained in:
Zuul
2025-01-08 05:02:29 +00:00
committed by Gerrit Code Review

View File

@@ -332,8 +332,6 @@ class Guest(object):
flags |= live and libvirt.VIR_DOMAIN_AFFECT_LIVE or 0
device_xml = conf.to_xml()
if isinstance(device_xml, bytes):
device_xml = device_xml.decode('utf-8')
LOG.debug("attach device xml: %s", device_xml)
self._domain.attachDeviceFlags(device_xml, flags=flags)
@@ -464,8 +462,6 @@ class Guest(object):
flags |= live and libvirt.VIR_DOMAIN_AFFECT_LIVE or 0
device_xml = conf.to_xml()
if isinstance(device_xml, bytes):
device_xml = device_xml.decode('utf-8')
LOG.debug("detach device xml: %s", device_xml)
self._domain.detachDeviceFlags(device_xml, flags=flags)
@@ -568,8 +564,6 @@ class Guest(object):
flags |= quiesce and libvirt.VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE or 0
device_xml = conf.to_xml()
if isinstance(device_xml, bytes):
device_xml = device_xml.decode('utf-8')
self._domain.snapshotCreateXML(device_xml, flags=flags)