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/net_tools
David Hummel 8a62b79ef2
nmcli: Disallow Wi-Fi options not supported by nmcli (#3141)
* nmcli: Disallow Wi-Fi options not supported by nmcli

By querying nmcli directly

* Added changelog fragment

* Added tests

* Simplify `get_available_options()`

* Update changelogs/fragments/3141-disallow-options-unsupported-by-nmcli.yml

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

* Remove redundant `802-11-wireless` settings from test show outputs

* Update `mocked_wireless_create(mocker)`

* Update plugins/modules/net_tools/nmcli.py

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>

* Address comment re. creating function & use nmcli naming conventions

I.E. `setting`.`property` = `value`

```
nmcli> help set
set [<setting>.<prop> <value>]  :: set property value

This command sets property value.

Example: nmcli> set con.id My connection
```

* Added `ignore_unsupported_suboptions` option & improved `wifi(_sec)` doc

* Corrected pep8 issues

```
ERROR: Found 2 pep8 issue(s) which need to be resolved:
ERROR: plugins/modules/net_tools/nmcli.py:342:161: E501: line too long 
(236 > 160 characters)
ERROR: plugins/modules/net_tools/nmcli.py:359:161: E501: line too long 
(237 > 160 characters)
```

* Fixed remaining sanity check issues and added even more docs

* No need to split Note

* Update plugins/modules/net_tools/nmcli.py

3.5.0 has already been released.

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

* Followed uniformity guideline for format macros from Ansible's dev guide

* Addressed comment

https://github.com/ansible-collections/community.general/pull/3141#discussion_r689098383

* Documentation cleanup continuation

* Replace `NM_SETTING_*`s having a description with their numeric value

* Splitting up long paragraphs.

Also removed `wifi`.`seen-bssids` as it "`is only meant for reading`"

* Addressed remaining comments and clarified `wake-on-lan` note

* Update plugins/modules/net_tools/nmcli.py

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

* Update plugins/modules/net_tools/nmcli.py

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

* Update plugins/modules/net_tools/nmcli.py

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

* Update plugins/modules/net_tools/nmcli.py

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

* Finishing addressing documentation comments.

* Update plugins/modules/net_tools/nmcli.py

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>

* Update plugins/modules/net_tools/nmcli.py

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>

* Update nmcli.py

* Added wifi-related `list` type options to `settings_type` method

* Moved `edit_commands` `execution` logic into its own method

* Move `unsupported_property` deletion into `main` function

* Missing `.items()`

* Resolved missing proper `nmcli conn edit` arguments

* Resolve pylint issue `dangerous-default-value`

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
Co-authored-by: David Hummel <dhummel@Fingerling>
2021-08-20 21:45:30 +02:00
..
infinity modules: fix examples to use FQCN (#644) 2020-07-13 21:50:31 +02:00
ldap Replace ansible.module_utils._text by ansible.module_utils.common.text.converters (#2877) 2021-06-26 23:59:11 +02:00
nios mass-added the utf-8 marker (#3163) 2021-08-08 10:40:22 +02:00
pritunl Replace ansible.module_utils._text by ansible.module_utils.common.text.converters (#2877) 2021-06-26 23:59:11 +02:00
cloudflare_dns.py Replace ansible.module_utils._text by ansible.module_utils.common.text.converters (#2877) 2021-06-26 23:59:11 +02:00
dnsimple.py mass-added the utf-8 marker (#3163) 2021-08-08 10:40:22 +02:00
dnsmadeeasy.py Fix a bunch of potential security issues (secret leaking) (#1736) 2021-02-08 16:33:18 +01:00
gandi_livedns.py Add gandi_livedns module (#328) 2021-03-21 11:25:24 +01:00
haproxy.py Replace ansible.module_utils._text by ansible.module_utils.common.text.converters (#2877) 2021-06-26 23:59:11 +02:00
ip_netns.py mass-added the utf-8 marker (#3163) 2021-08-08 10:40:22 +02:00
ipify_facts.py Replace ansible.module_utils._text by ansible.module_utils.common.text.converters (#2877) 2021-06-26 23:59:11 +02:00
ipinfoio_facts.py mass-added the utf-8 marker (#3163) 2021-08-08 10:40:22 +02:00
ipwcli_dns.py mass-added the utf-8 marker (#3163) 2021-08-08 10:40:22 +02:00
lldp.py mass-added the utf-8 marker (#3163) 2021-08-08 10:40:22 +02:00
netcup_dns.py Use str() to get exception message (#2590) 2021-05-25 12:58:20 +02:00
nmcli.py nmcli: Disallow Wi-Fi options not supported by nmcli (#3141) 2021-08-20 21:45:30 +02:00
nsupdate.py mass-added the utf-8 marker (#3163) 2021-08-08 10:40:22 +02:00
omapi_host.py Replace ansible.module_utils._text by ansible.module_utils.common.text.converters (#2877) 2021-06-26 23:59:11 +02:00
snmp_facts.py added supports_check_mode=True to info/facts modules (#3084) 2021-07-27 18:24:29 +02:00