feat: add ESXi host support for dedicated migration networks#41
feat: add ESXi host support for dedicated migration networks#41albertoflorez wants to merge 2 commits into
Conversation
|
Good feature — dedicated migration networks via ESXi Host CRDs is a real need for large-scale migrations. The core Secret + Host resource logic looks solid. A few things to address before merge: 1. inventory.yml — examples uncommented with plaintext credentialsThe VMware and oVirt example blocks were previously commented out as reference templates. This PR uncomments them, leaving These examples should be re-commented. Having uncommented credentials in a checked-in file is a risk — someone will fork/clone and accidentally push real creds into this structure. Also a minor indentation inconsistency: the 2. No validation on ESXi host entriesThe provider-level target validates that Suggest adding an assertion block before the Secret creation loop, something like: - name: _mtv_provider_vmware | Validate ESXi host properties
ansible.builtin.assert:
that:
- "'id' in vmware_esxi"
- "'ip' in vmware_esxi"
- "'user' in vmware_esxi"
- "'password' in vmware_esxi"
quiet: true
fail_msg: "ESXi host entry is missing required fields (id, ip, user, password)"
loop: "{{ mtv_management_populated_vmware_target.esxi_hosts | default([]) }}"
loop_control:
loop_var: vmware_esxi
when:
- mtv_management_populated_vmware_target.esxi_hosts is defined
- mtv_management_populated_vmware_target.esxi_hosts | length > 03. Fragile
|
|
Thanks for the detailed and constructive review! You brought up some great points. I've pushed a new commit addressing all of them:
Let me know if anything else catches your eye! |
03d02dd to
49f98c1
Compare
stevefulme1
left a comment
There was a problem hiding this comment.
All feedback addressed — inventory re-commented, ESXi host validation added, JSON parsing wrapped in block/rescue, indentation fixed. Clean implementation. Approved.
Description
This PR introduces the ability to configure individual ESXi hosts and their specific migration network settings within the MTV VMware Provider.
It includes updates to:
esxi_host_listto the VMware Migration Target credential type.Hostresources for each ESXi host.Motivation
By default, MTV communicates with vCenter for disk transfers. In high-scale environments, this can saturate the vCenter management network.
By defining ESXi hosts directly:
Changes Detail
aap-seed: Updated theVMware Migration Targetcredential type to includeesxi_host_list. This allows AAP to store host configurations securely.mtv_management:_mtv_provider_vmware.ymlto loop through theesxi_hostslist.<target-name>-<host-id>-secret).vmware_esxi_skeleton.yml.j2to create the MTVHostCRD.inventory.yml: Provided an updated example showing theesxi_hostsdata structure.Testing
Validated by creating a VMware Provider in MTV via AAP and verifying that: