def get_catalog():

    creds = credentials()
    headers = {'Content-Type': 'application/json'}
    payload = {
                "auth":
                  {
                    "tenantName": creds['tenant_name'],
                    "passwordCredentials": {
                                             "username": creds['username'],
                                             "password": creds['password']
                                           }
                  }
              }
    auth_url = creds['auth_url'] + "/tokens"
    r = requests.post(auth_url, headers=headers, data=json.dumps(payload))

    parsed_json = json.loads(r.text)
    if not parsed_json or 'error' in parsed_json:
        sys.stderr.write("ERROR: Unable to get authentication token\n")
        exit(1)

    return parsed_json
Get service catalog from Keystone with token and all endpoints
dataset/ETHPy150Open CiscoCloud/mantl/roles/calico/files/neutron_port_update.py/get_catalog