INNER CODE UNIT · Python

test_nomad_creds

phasehq/console · backend/api/utils/syncing/nomad/main.py:33

def test_nomad_creds(credential_id):
    """Test Nomad credentials by attempting to get token info."""
    try:
        get_nomad_token_info(credential_id)
        return True
    except requests.HTTPError as e:
        return False


def sync_nomad_secrets(secrets, credential_id, path, namespace="default"):
    results = {}

    if not secrets or len(secrets) == 0:
        results["error"] = "Error: No secrets to sync."
        return False, results

    try:
        secrets_dict = {k: v for k, v, _ in secrets}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…