Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tenant Onboarding with AD.json failed to created environment, even with correct Account is set #3

Open
fabricekrebs opened this issue Nov 9, 2023 · 0 comments
Assignees

Comments

@fabricekrebs
Copy link

When running the Tenant Onboarding with AD.json to onboard a new tenant, when create_environment is set to true, the Create environment failed with the following error code :

Error : NTNX_LOCAL_AZ account not present on xxx

By commenting the line 41 and 42 of Create Environment Set Variable task, it looks it solve the issue:
Initial code :

    if account_name in str(data.json()):
        for new_data in data.json()['entities']:
            if new_data['metadata']['name'] == account_name:
                for _cluster in new_data["status"]["resources"]["data"]["cluster_account_reference_list"]:
                    if _cluster["resources"]["data"]["cluster_name"] == cluster_name:
                        return _cluster["uuid"]
        print("Error : %s account not present on %s"%(account_name,PC_IP))
        exit(1)
    else:
        print("Error : %s account not present on %s"%(account_name,PC_IP))
        exit(1)
    if account_name in str(data.json()):
        for new_data in data.json()['entities']:
            if new_data['metadata']['name'] == account_name:
                for _cluster in new_data["status"]["resources"]["data"]["cluster_account_reference_list"]:
                    if _cluster["resources"]["data"]["cluster_name"] == cluster_name:
                        return _cluster["uuid"]
        #print("Error : %s account not present on %s"%(account_name,PC_IP)).
        #exit(1)
    else:
        print("Error : %s account not present on %s"%(account_name,PC_IP))
        exit(1)
@bhati-pradeep bhati-pradeep self-assigned this Nov 9, 2023
bhati-pradeep added a commit that referenced this issue Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants