def set_boot_device(self, name, dev):
        (dom, host) = self.get_active_domain(name)
        if not dom:
            dom = self.get_inactive_domain(name)
            host = dom["host"]

        for x in self.hosts:
            if host not in x["name"]:
                conn = x["conn"]

        dom = conn.lookupByName(name)

        desc = fromstring(dom.XMLDesc(libvirt.VIR_DOMAIN_XML_SECURE))
        desc.find(".//boot").set("dev", dev)

        conn.defineXML(tostring(desc))
        return True
dataset/ETHPy150Open mizzy/maglica/maglica/virt.py/Virt.set_boot_device/operator `==` -> `not in`