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
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
..
alicloud Remove deprecated modules scheduled for removal in 3.0.0 (#1924) 2021-04-13 11:19:25 +00:00
atomic using get_bin_path() on atomic modules (#2144) 2021-04-02 22:06:07 +02:00
centurylink Remove deprecated features scheduled for removal in 3.0.0 (#1926) 2021-03-09 21:23:20 +01:00
dimensiondata fixed str formatting (#2139) 2021-03-31 13:05:40 +02:00
heroku Tidy up sanity checks ignore lines modules (batch 7) (#1970) 2021-03-08 08:35:09 +01:00
huawei Fix a bunch of potential security issues (secret leaking) (#1736) 2021-02-08 16:33:18 +01:00
linode linode - docs/validation changes + minor refactorings (#2410) 2021-05-12 17:37:31 +02:00
lxc fixed Python 3 keys() usage (#1861) 2021-02-23 23:19:27 +01:00
lxd fixed Python 3 keys() usage (#1861) 2021-02-23 23:19:27 +01:00
memset Remove deprecated modules scheduled for removal in 3.0.0 (#1924) 2021-04-13 11:19:25 +00:00
misc Add proxmox_nic module (#2449) 2021-05-13 21:48:49 +02:00
oneandone More false-positives (not flagged by sanity tests yet). (#2010) 2021-03-13 13:24:26 +01:00
online Remove deprecated modules scheduled for removal in 3.0.0 (#1924) 2021-04-13 11:19:25 +00:00
opennebula OpenNebula one_vm.py: Fix missing keys (#2435) 2021-05-04 12:21:55 +02:00
oracle fixed Python 3 keys() usage (#1861) 2021-02-23 23:19:27 +01:00
ovh removed unreachable code (#2157) 2021-04-05 09:22:28 +02:00
packet Tidy up sanity checks ignore lines modules (batch 7) (#1970) 2021-03-08 08:35:09 +01:00
profitbricks More false-positives (not flagged by sanity tests yet). (#2010) 2021-03-13 13:24:26 +01:00
pubnub Mark non-secret leaking module options with no_log=False (#2001) 2021-03-12 08:51:47 +01:00
rackspace rax - removed service parameter (#2020) 2021-03-14 12:22:03 +01:00
scaleway Remove vendored ipaddress module. (#2441) 2021-05-05 12:31:01 +02:00
smartos Remove deprecated modules scheduled for removal in 3.0.0 (#1924) 2021-04-13 11:19:25 +00:00
softlayer More false-positives (not flagged by sanity tests yet). (#2010) 2021-03-13 13:24:26 +01:00
spotinst spotinst_aws_elastigroup - fixed elements for many lists (#2355) 2021-04-27 13:18:29 +02:00
univention Fixed validations in a couple of modules (#2268) 2021-04-19 18:48:16 +02:00
webfaction Tidy up sanity checks (2021/Batch 3 - who's counting) (#1885) 2021-02-26 11:37:23 +01:00
xenserver xenserver_guest - fixed validations (#2243) 2021-04-17 09:32:13 +02:00