Commit 4630407b authored by Anael Beutot's avatar Anael Beutot
Browse files

Added autostart tag for VMs.

parent 81184713
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -132,3 +132,10 @@ def disk(dom):
def nic(dom):
    """VM network interfaces."""
    return u' '.join(map(str, xrange(len(dom.nics)))) or None


@refresh(10)
@_vir_tag
def autostart(dom):
    """Autostart status."""
    return {True: 'yes', False: 'no'}[bool(dom.lv_dom.autostart())]