mirror of
https://github.com/retspen/webvirtcloud
synced 2025-07-31 12:41:08 +00:00
Check usage of filter refs from domains.
This commit is contained in:
parent
35bc8c67e4
commit
7f2104c19d
3 changed files with 49 additions and 8 deletions
|
|
@ -187,6 +187,19 @@ class wvmInstance(wvmConnect):
|
|||
title = util.get_xml_path(self._XMLDesc(0), "/domain/title")
|
||||
return title if title else ''
|
||||
|
||||
def get_filterrefs(self):
|
||||
|
||||
def filterrefs(ctx):
|
||||
result = []
|
||||
for net in ctx.xpath('/domain/devices/interface'):
|
||||
filterref = net.xpath('filterref/@filter')
|
||||
if filterref:
|
||||
result.append(filterref[0])
|
||||
return result
|
||||
|
||||
return util.get_xml_path(self._XMLDesc(0), func=filterrefs)
|
||||
|
||||
|
||||
def get_description(self):
|
||||
description = util.get_xml_path(self._XMLDesc(0), "/domain/description")
|
||||
return description if description else ''
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue