'Return the ID for the specified name or identifier.
:param resource_name: API name of entity
:param value: ID or name of entity
:returns: the id of the requested :value:
:raises: exception.EntityNotFound,
exception.PhysicalResourceNameAmbiguity'

def find_resource_by_name_or_id(self, resource_name, value):

    try:
        entity = getattr(self.client(), resource_name)
        return entity.get(value).id
    except sahara_base.APIException:
        return self.find_resource_by_name(resource_name, value)
