def instance_exists(self, instance):
    'Efficient override of base instance_exists method.'
    try:
        self._lookup_by_name(instance.name)
        return True
    except exception.NovaException:
        return False
Efficient override of base instance_exists method.
def instance_exists(self, instance):
    
    try:
        self._lookup_by_name(instance.name)
        return True
    except exception.NovaException:
        return False