Skip to content
Snippets Groups Projects
Commit 7d071b8e authored by Antoine Millet's avatar Antoine Millet
Browse files

Implemented nic_vlans tag

parent 0d0acc6d
No related branches found
No related tags found
No related merge requests found
......@@ -15,6 +15,7 @@
import logging
import itertools
from functools import wraps
from xml.etree import cElementTree as et
from StringIO import StringIO
......@@ -197,6 +198,15 @@ def nic(dom):
return u' '.join(map(str, xrange(len(dom.nics)))) or None
@ttl(10)
@refresh(10)
@_vir_tag
def nic_vlans(dom):
"""VM network interfaces."""
vlans = set(itertools.chain(*[x.vlans for x in dom.nics]))
return u' '.join(str(x) for x in sorted(vlans)) or None
@refresh(10)
@_vir_tag
def autostart(dom):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment