mirror of
https://github.com/retspen/webvirtcloud
synced 2025-07-31 12:41:08 +00:00
Libxml2 converted to lxml, django framework upgrade to 1.11.x and some bug fixes
This commit is contained in:
parent
beea57189c
commit
ace30ca952
16 changed files with 265 additions and 106 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue