public static int getStorageNodeIndex(ApplicationInstance application, HostName hostName) {
        Optional<ServiceInstance> storageNode = getStorageNodeAtHost(application, hostName);
        if (storageNode.isEmpty()) {
            throw new IllegalArgumentException("Failed to find a storage node for application " +
                    application.applicationInstanceId() + " at host " + hostName);
        }

        return getStorageNodeIndex(storageNode.get().configId());
    }
@return The node index of the storage node running on the host.
@throws java.lang.IllegalArgumentException if there is not exactly one storage node running on the host,
        or if the index of that storage node could not be found.
orchestrator/src/main/java/com/yahoo/vespa/orchestrator/model/VespaModelUtil.java