Commit 7d071b8e authored by Antoine Millet's avatar Antoine Millet

Implemented nic_vlans tag

parent 0d0acc6d
......@@ -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
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
def autostart(dom):
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment