import requests


def onefs_release_version(host, port, auth):
    """Query a cluster and return the 4 major version digits"""
    url = 'https://{0}:{1}/platform/1/cluster/config'.format(host, port)
    config = requests.get(url, auth=auth, verify=False).json()
    return config['onefs_version']['release'].strip('v')