Browse Source

Merge "Remove lxml deprecated methods"

changes/26/738126/1
Zuul 2 weeks ago
committed by Gerrit Code Review
parent
commit
db916926e5
1 changed files with 5 additions and 5 deletions
  1. +5
    -5
      nova/virt/libvirt/config.py

+ 5
- 5
nova/virt/libvirt/config.py View File

@@ -213,7 +213,7 @@ class LibvirtConfigDomainCapsDevices(LibvirtConfigObject):
def parse_dom(self, xmldoc):
super().parse_dom(xmldoc)

for c in xmldoc.getchildren():
for c in list(xmldoc):
device = self.DEVICE_PARSERS.get(c.tag)
if device:
device = device()
@@ -281,7 +281,7 @@ class LibvirtConfigDomainCapsFeatureSev(LibvirtConfigObject):
if xmldoc.get('supported') == 'yes':
self.supported = True

for c in xmldoc.getchildren():
for c in list(xmldoc):
if c.tag == 'reducedPhysBits':
self.reduced_phys_bits = int(c.text)
elif c.tag == 'cbitpos':
@@ -3326,14 +3326,14 @@ class LibvirtConfigGuestVPMEM(LibvirtConfigGuestDevice):
self.model = xmldoc.get("model")
self.access = xmldoc.get("access")

for c in xmldoc.getchildren():
for c in list(xmldoc):
if c.tag == "source":
for sub in c.getchildren():
for sub in list(c):
if sub.tag == "path":
self.source_path = sub.text
if sub.tag == "alignsize":
self.align_size = sub.text
elif c.tag == "target":
for sub in c.getchildren():
for sub in list(c):
if sub.tag == "size":
self.target_size = sub.text

Loading…
Cancel
Save