Skip to content

Commit

Permalink
Merge pull request #511 from nutanix/imprv/issue#500
Browse files Browse the repository at this point in the history
Adding imprv where user can group VMs by project name
  • Loading branch information
george-ghawali authored Oct 8, 2024
2 parents db7120a + 48ba881 commit 9459ce3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions plugins/inventory/ntnx_prism_vm_inventory.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,11 @@ def parse(self, inventory, loader, path, cache=True):
self.inventory.set_variable(
vm_name, "ntnx_categories", entity["metadata"]["categories"]
)
self.inventory.set_variable(
vm_name,
"project_reference",
entity.get("metadata", {}).get("project_reference", {}),
)

# Add variables created by the user's Jinja2 expressions to the host
self._set_composite_vars(
Expand Down

0 comments on commit 9459ce3

Please sign in to comment.