def suspend(self, id): domain = self._get_domain(id) if domain.state(0)[0] == libvirt.VIR_DOMAIN_PAUSED: return True return domain.suspend() == 0