'Checks existence of an instance on the host.
:param instance: The instance to lookup
Returns True if an instance with the supplied ID exists on
the host, False otherwise.
.. note::
This implementation works for all drivers, but it is
not particularly efficient. Maintainers of the virt drivers are
encouraged to override this method with something more
efficient.'

def instance_exists(self, instance):

    try:
        return (instance.uuid in self.list_instance_uuids())
    except NotImplementedError:
        return (instance.name in self.list_instances())
