1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/plugins/modules/cloud/misc
Kogelvis 23dda56913
Add proxmox_nic module (#2449)
* Add proxmox_nic module

Add proxmox_nic module to manage NIC's on Qemu(KVM) VM's in a Proxmox VE
cluster.
Update proxmox integration tests and add tests for proxmox_nic module.

This partially solves https://github.com/ansible-collections/community.general/issues/1964#issuecomment-790499397
and allows for adding/updating/deleting network interface cards after
creating/cloning a VM.

The proxmox_nic module will keep MAC-addresses the same when updating a
NIC. It only changes when explicitly setting a MAC-address.

* Apply suggestions from code review

Co-authored-by: Felix Fontein <felix@fontein.de>

* Add check_mode and implement review comments

- check_mode added
- some documentation updates
- when MTU is set, check if the model is virtio, else fail
- trunks can now be provided as list of ints instead of vlanid[;vlanid...]

* Make returns on update_nic and delete_nic more readable

Co-authored-by: Felix Fontein <felix@fontein.de>

* Increase readability on update_nic and delete_nic

* Implement check in get_vmid

- get_vmid will now fail when multiple vmid's are returned as proxmox
  doesn't guarantee uniqueness
- remove an unused import
- fix a typo in an error message

* Add some error checking to get_vmid

- get_vmid will now return the error message when proxmoxer fails
- get_vmid will return the vmid directly instead of a list of one
- Some minor documentation updates

* Warn instead of fail when setting mtu on unsupported nic

- When setting the MTU on an unsupported NIC model (virtio is the only
  supported model) this module will now print a warning instead of
  failing.
- Some minor documentation updates.

* Take advantage of proxmox_auth_argument_spec

Make use of proxmox_auth_argument_spec from plugins/module_utils/proxmox.py
This provides some extra environment fallbacks.

* Add blank line to conform with pep8

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-05-13 21:48:49 +02:00
..
cloud_init_data_facts.py Reduce ignored sanity tests in cloud/misc modules (#845) 2020-09-01 13:44:04 +02:00
proxmox.py Adding purge parameter to proxmox for use with lxc delete requests (#2013) 2021-03-19 19:18:05 +01:00
proxmox_domain_info.py More renames. (#2307) 2021-04-21 12:54:35 +02:00
proxmox_group_info.py More renames. (#2307) 2021-04-21 12:54:35 +02:00
proxmox_kvm.py Adding tags as module parameter to proxmox_kvm (#2000) 2021-03-15 13:39:23 +01:00
proxmox_nic.py Add proxmox_nic module (#2449) 2021-05-13 21:48:49 +02:00
proxmox_snap.py Improved parameter handling on proxmox modules (#1765) 2021-02-12 13:01:52 +01:00
proxmox_storage_info.py More renames. (#2307) 2021-04-21 12:54:35 +02:00
proxmox_template.py Improved parameter handling on proxmox modules (#1765) 2021-02-12 13:01:52 +01:00
proxmox_user_info.py More renames. (#2307) 2021-04-21 12:54:35 +02:00
rhevm.py removed unreachable code (#2157) 2021-04-05 09:22:28 +02:00
serverless.py Reduce ignored sanity tests in cloud/misc modules (#845) 2020-09-01 13:44:04 +02:00
terraform.py Add plugin_paths parameter to terraform module. (#2308) 2021-04-21 16:05:37 -07:00
xenserver_facts.py modules: fix examples to use FQCN for builtin modules (#648) 2020-07-14 18:28:08 +03:00