private Allocation requireAllocation(String message) {
        final Optional<Allocation> allocation = this.allocation;
        if ( ! allocation.isPresent())
            throw new IllegalStateException(message + " for  " + hostname() + ": The node is unallocated");

        return allocation.get();
    }
Returns the current allocation when it must exist, or throw exception there is not allocation.
node-repository/src/main/java/com/yahoo/vespa/hosted/provision/Node.java