def set_autostart(vm_, state='on'):

    dom = _get_domain(vm_)

    if state == 'on':
        return dom.setAutostart(1) == 0

    elif state == 'off':
        return dom.setAutostart(0) == 0

    else:
        # return False if state is set to something other then on or off
        return False
Performs sanity checks for storage parameters.
dataset/ETHPy150Open saltstack/salt/salt/modules/virt.py/set_autostart--crossover with--dataset/ETHPy150Open ganeti/ganeti/lib/backend.py/_CheckStorageParams