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

[Imprv] Make changes to include project_reference in dynamic inventory for groupping #500

Open
patrickschmed opened this issue Sep 20, 2024 · 0 comments · Fixed by #511
Open
Assignees
Labels
1.9.3_triage Bug fixes & Improvements enhancement New feature or request

Comments

@patrickschmed
Copy link

We're managing multiple customers on our Nutanix env and using "Project" for assigning VMs to a customer.

project_reference.name should be included in the ntnx_prism_vm_inventory.py script to enable grouping by project. We adapted it for our purpose, code snippet:

        if "metadata" in entity and "project_reference" in entity["metadata"]:
            self.inventory.set_variable(
                vm_name, "ntnx_project", entity["metadata"]["project_reference"]["name"]
            )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.9.3_triage Bug fixes & Improvements enhancement New feature or request
Projects
Development

Successfully merging a pull request may close this issue.

7 participants
@premkarat @bhati-pradeep @alaa-bish @Gevorg-Khachatryan-97 @patrickschmed @george-ghawali and others