mirror of
https://github.com/retspen/webvirtcloud.git
synced 2026-05-26 23:19:40 +00:00
Libxml2 converted to lxml, django framework upgrade to 1.11.x and some bug fixes
This commit is contained in:
@@ -166,11 +166,11 @@ class wvmNetwork(wvmConnect):
|
||||
return bool(util.get_xml_path(xml, "/network/ip/dhcp/bootp/@file"))
|
||||
|
||||
def get_mac_ipaddr(self):
|
||||
def network(ctx):
|
||||
def network(doc):
|
||||
result = []
|
||||
for net in ctx.xpathEval('/network/ip/dhcp/host'):
|
||||
host = net.xpathEval('@ip')[0].content
|
||||
mac = net.xpathEval('@mac')[0].content
|
||||
for net in doc.xpath('/network/ip/dhcp/host'):
|
||||
host = net.xpath('@ip')[0].text
|
||||
mac = net.xpathEval('@mac')[0].text
|
||||
result.append({'host': host, 'mac': mac})
|
||||
return result
|
||||
|
||||
|
||||
Reference in New Issue
Block a user