public static int getStorageNodeIndex(ConfigId configId) {
        Matcher matcher = STORAGE_NODE_INDEX_PATTERN.matcher(configId.s());
        if (!matcher.matches()) {
            throw new IllegalArgumentException("Unable to extract node index from config ID " + configId);
        }

        return Integer.parseInt(matcher.group(1));
    }
@param configId  Config ID is of the form "storage/storage/3", where 3 is the storage node index.
@return  The storage node index.
@throws java.lang.IllegalArgumentException  If configId does not have the required form.
orchestrator/src/main/java/com/yahoo/vespa/orchestrator/model/VespaModelUtil.java