Skip to content

Add dropdown option for VMWare Inventory Source collection - #773

Merged
cigamit merged 3 commits into
mainfrom
vmware_inv_source
Aug 31, 2026
Merged

Add dropdown option for VMWare Inventory Source collection#773
cigamit merged 3 commits into
mainfrom
vmware_inv_source

Conversation

@cigamit

@cigamit cigamit commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

RH has deprecating the community.vmware.vmware_vm_inventory plugin and it was removed in v7 of the collection. We still include an older version of the collection because of our older Ansible version. We also include the newer plugin in our Control Plane EE.
https://docs.ansible.com/projects/ansible/latest/collections/community/vmware/vmware_vm_inventory_inventory.html#deprecated

Some users would like to use the new vmware.vmware.vms plugin; yet there are still plenty of valid use cases for the old (new ones don't support FREE ESXi). So we should give the user the option to choose what they want to use. We now do this by adding a new dropdown that allows a user to select which collection to use for the VMWare Source Inventory.

Also: we fix it to change the awx.awx collection to the new ctrliq.ascender collection, and fix some missed translations while we are at it.

image

@cigamit
cigamit requested a review from TheWitness August 31, 2026 05:48
@cigamit cigamit self-assigned this Aug 31, 2026
Copilot AI lite review requested due to automatic review settings August 31, 2026 05:48
@cigamit cigamit added the enhancement New feature or request label Aug 31, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR adds a user-selectable VMware inventory plugin/collection choice in the UI and wires that choice through to inventory source_vars so the backend can generate the correct plugin file name and plugin FQCN. It also updates the Ascender inventory plugin FQCN from awx.awx.controller to ctrliq.ascender.controller, plus associated tests and translation catalog updates.

Changes:

  • Add a VMware “Collection” dropdown and persist the selection via the plugin key in source_vars.
  • Update backend inventory injector logic to allow a supported alternate VMware plugin and to choose the corresponding inventory filename.
  • Update Ascender controller collection references (docs + tests) and refresh several locale strings.
File summaries
File Description
docs/docsite/rst/userguide/overview.rst Updates documented inventory plugin FQCN for Ascender controller collection.
awx/ui/src/screens/Inventory/shared/utils.js Adds VMware plugin parsing/merge helpers and plugin option constants.
awx/ui/src/screens/Inventory/shared/utils.test.js Adds unit tests for VMware plugin parsing/merging behavior.
awx/ui/src/screens/Inventory/shared/InventorySourceSubForms/VMwareSubForm.js Adds “Collection” dropdown to VMware inventory source subform.
awx/ui/src/screens/Inventory/shared/InventorySourceSubForms/VMwareSubForm.test.js Verifies new “Collection” field/options render.
awx/ui/src/screens/Inventory/shared/InventorySourceForm.js Introduces vmware_plugin form value and merges it into source_vars on submit.
awx/ui/src/screens/Inventory/shared/Inventory.helptext.js Adds help text describing the VMware collection/plugin selection.
awx/ui/src/screens/Inventory/InventorySourceDetail/InventorySourceDetail.js Displays the selected VMware collection on the inventory source detail page.
awx/ui/src/locales/en/messages.po Updates English message catalog entries for new/shifted strings.
awx/ui/src/locales/es/messages.po Updates Spanish message catalog entries for new/shifted strings.
awx/ui/src/locales/nl/messages.po Updates Dutch message catalog entries for new/shifted strings.
awx/ui/src/locales/zh/messages.po Updates Chinese message catalog entries for new/shifted strings.
awx/main/tests/functional/models/test_inventory.py Updates Ascender plugin expectation and adds VMware alternate plugin selection coverage.
awx/main/tasks/jobs.py Uses injector-selected filename when writing the inventory plugin file.
awx/main/models/inventory.py Adds alternate-plugin support, filename selection, and updates Ascender/VMware injector behavior.
Review details

Suppressed comments (1)

awx/main/models/inventory.py:1515

  • inventory_as_dict() does source_vars.get('plugin') in self.alternate_plugins directly. If plugin is present but not a string (e.g., YAML list/dict), this will raise TypeError due to unhashable membership checks. Capture the value and only compare when it’s a string; otherwise fall through to overriding with the default plugin.
            if source_vars.get('plugin') in self.alternate_plugins:
                pass  # user selected an alternate supported plugin, keep it
            elif hasattr(self, 'downstream_namespace') and server_product_name() != 'AWX':
  • Files reviewed: 20/29 changed files
  • Comments generated: 3
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread awx/main/models/inventory.py Outdated
Comment thread awx/ui/src/screens/Inventory/shared/Inventory.helptext.js Outdated
Comment thread awx/main/tasks/jobs.py Outdated
Copilot AI review requested due to automatic review settings August 31, 2026 06:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

Review details
  • Files reviewed: 20/29 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment thread docs/docsite/rst/userguide/overview.rst
@cigamit
cigamit merged commit bc4721f into main Aug 31, 2026
10 checks passed
@cigamit
cigamit deleted the vmware_inv_source branch August 31, 2026 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Development

Successfully merging this pull request may close these issues.

3 participants