mirror of
https://github.com/retspen/webvirtcloud
synced 2024-11-01 03:54:15 +00:00
lxml conversion of get_info
This commit is contained in:
parent
b178bad93e
commit
9176cb6204
1 changed files with 6 additions and 4 deletions
|
@ -448,10 +448,12 @@ class wvmConnect(object):
|
||||||
|
|
||||||
def get_net_device(self):
|
def get_net_device(self):
|
||||||
netdevice = []
|
netdevice = []
|
||||||
def get_info(ctx):
|
|
||||||
dev_type = util.get_xpath('/device/capability/@type')
|
def get_info(doc):
|
||||||
interface = util.get_xpath('/device/capability/interface')
|
dev_type = util.get_xpath(doc, '/device/capability/@type')
|
||||||
return (dev_type, interface)
|
interface = util.get_xpath(doc, '/device/capability/interface')
|
||||||
|
return dev_type, interface
|
||||||
|
|
||||||
for dev in self.wvm.listAllDevices(0):
|
for dev in self.wvm.listAllDevices(0):
|
||||||
xml = dev.XMLDesc(0)
|
xml = dev.XMLDesc(0)
|
||||||
(dev_type, interface) = util.get_xml_path(xml, func=get_info)
|
(dev_type, interface) = util.get_xml_path(xml, func=get_info)
|
||||||
|
|
Loading…
Reference in a new issue