Ejemplo n.º 1
0
def api_version(ns):
    response = requests.get(ns.api_url / 'autocert/version')
    version = 'unknown'
    if response.status_code == 200:
        obj = response.json()
        version = obj['version']
    return version
Ejemplo n.º 2
0
def fetch_api_version(ns):
    api_version = 'unknown'
    response = requests.get(ns.api_url / 'autocert/version')
    if response.status_code == 200:
        obj = response.json()
        api_version = obj['version']
    return api_version
Ejemplo n.º 3
0
def fetch_api_config(ns):
    response = requests.get(ns.api_url / 'autocert/config')
    if response.status_code == 200:
        obj = response.json()
        return obj['config']
    raise FetchApiConfigError(response)