def libvirt_instance_exists(libvirt_name, init_host, compute_host, ssh_user,
                            ssh_sudo_password):
    with settings(host_string=compute_host,
                  user=ssh_user,
                  password=ssh_sudo_password,
                  gateway=init_host,
                  connection_attempts=env.connection_attempts,
                  warn_only=True,
                  quiet=True):
        command = libvirt_name % 'virsh domid %s'
        LOG.debug('[%s] Running command %s', compute_host, command)
        out = sudo(command)
        LOG.debug('[%s] Result of running %s: %s', compute_host, command, out)
        return out.succeeded
dataset/ETHPy150Open MirantisWorkloadMobility/CloudFerry/cloudferry/lib/utils/utils.py/libvirt_instance_exists/swapped operands of `%`