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/tests/unit/plugins/modules
patchback[bot] b42ab6b45d
nmcli: Disallow Wi-Fi options not supported by nmcli (#3141) (#3249)
* 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>
(cherry picked from commit 8a62b79ef2)

Co-authored-by: David Hummel <6109326+hummeltech@users.noreply.github.com>
2021-08-20 22:04:38 +02:00
..
cloud proxmox_kvm: Fix ZFS device string parsing (#2841) (#2846) 2021-06-20 13:05:16 +02:00
database Hana query userstore (#3125) (#3152) 2021-08-05 23:03:05 +02:00
files archive - fixing determination of archive root when root is '/' (#3036) (#3062) 2021-07-24 22:23:20 +02:00
identity Keycloak: add client_rolemapping management (#2941) (#3117) 2021-07-30 18:29:20 +00:00
messaging Move modules and module_utils unit tests to correct place (#81) 2020-03-31 10:42:38 +02:00
monitoring Temporarily disable datadog_downtime unit tests. (#3222) (#3224) 2021-08-17 06:34:08 +00:00
net_tools nmcli: Disallow Wi-Fi options not supported by nmcli (#3141) (#3249) 2021-08-20 22:04:38 +02:00
notification discord.py: Add new module for discord notifications (#2398) (#2493) 2021-05-11 20:05:59 +02:00
packaging npm - fix installing from package.json (#2924) (#2929) 2021-07-02 21:59:41 +02:00
remote_management Replace ansible.module_utils._text by ansible.module_utils.common.text.converters (#2877) (#2882) 2021-06-27 09:39:18 +02:00
source_control github_repo: support GitHub on premise installations (#3039) (#3046) 2021-07-22 17:11:22 +02:00
storage sanity: Add future boilerplate (#573) 2020-06-24 21:50:36 +02:00
system SAP task list execution (#3169) (#3187) 2021-08-09 23:12:35 +02:00
web_infrastructure Add fallback url for jenkins plugin (#1334) (#2903) 2021-06-29 09:02:35 +00:00
__init__.py Move modules and module_utils unit tests to correct place (#81) 2020-03-31 10:42:38 +02:00
conftest.py Replace ansible.module_utils._text by ansible.module_utils.common.text.converters (#2877) (#2882) 2021-06-27 09:39:18 +02:00
utils.py Replace ansible.module_utils._text by ansible.module_utils.common.text.converters (#2877) (#2882) 2021-06-27 09:39:18 +02:00