ansible-collections / vmware.vmware

Ansible VMWare Collection
GNU General Public License v3.0
7 stars 10 forks source link

migrate community.vmware.vmware_cluster_vcls module #61

Closed mikemorency closed 2 months ago

mikemorency commented 2 months ago
SUMMARY

This is a migration of the community.vmware.vmware_cluster_vcls module.

The inputs are backwards compatible. I added two inputs, datastores_to_add and datastores_to_remove to allow incremental modifications to the vCLS config. The legacy module only allowed absolute modifications; you needed to specify all allowed datastores every time.

The outputs that return any datastores added or removed by the module have changed key names to be more consistent with other output names in this collection. For example, Added_AllowedDatastores -> added_datastores Ive also added a new output to return the entire list of allowed datastores, allowed_datastores.

ISSUE TYPE
COMPONENT NAME

cluster_vcl

Additional Information

Heres an example of the new output from the simulator tests:

{
    "added_datastores": [
        "LocalDS_0"
    ],
    "allowed_datastores": [
        "LocalDS_0"
    ],
    "changed": true,
    "invocation": {
        "module_args": {
            "allowed_datastores": [
                "LocalDS_0"
            ],
            "cluster": "DC0_C0",
            "datacenter": "DC0",
            "datastores_to_add": null,
            "datastores_to_remove": null,
            "hostname": "127.0.0.1",
            "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
            "port": 8989,
            "proxy_host": null,
            "proxy_port": null,
            "username": "user",
            "validate_certs": false
        }
    },
    "reconfig_task_result": {
        "completion_time": "2024-08-21T14:29:54.147149+00:00",
        "entity_name": "domain-c29",
        "error": null,
        "result": null,
        "state": "success"
    },
    "removed_datastores": []
}
mikemorency commented 2 months ago

We have a downstream repo that uses this module, and I think for now we still need to support people using 7x. The additional testing we can do in this repo would be helpful, although i guess once we update our vcenter the tests there will be less helpful....

@machacekondra what do you think

mariolenz commented 2 months ago

We have a downstream repo that uses this module, and I think for now we still need to support people using 7x.

No problem, just wanted to make you aware that you're migrating a module that won't be useful for long.

I'm not sure when 7.x will go EOL. It used to be April 2025 or something like this, but I think I've read somewhere that this has been extended some 6 months or so. Can't find a link for this ATM, though :-/

The additional testing we can do in this repo would be helpful

True.

although i guess once we update our vcenter the tests there will be less helpful...

Also true :-)