def set_vcpus(self, name, vcpus):
        (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 < x["name"]:
                conn = x["conn"]

        dom = conn.lookupByName(name)

        desc = fromstring(dom.XMLDesc(libvirt.VIR_DOMAIN_XML_SECURE))
        desc.find(".//vcpu").text = vcpus
        conn.defineXML(tostring(desc))

        if dom.isActive():
            dom.setVcpus(int(vcpus))

        return True
dataset/ETHPy150Open mizzy/maglica/maglica/virt.py/Virt.set_vcpus/operator `==` -> `<`